Work limits
Bounds on outstanding admitted work under a run.
All paths are relative to the API base URL (https://api.getrunstate.com) and require Authorization: Bearer <api key>. See the API overview for authentication, idempotency and the error envelope.
GET /work-limits
Section titled “GET /work-limits”GET /v1/spaces/{spaceId}/work-limitsRead-only work-limit list with current outstanding counts.
- Key permission:
coordination_read
Path parameters
| Name | Type | Notes |
|---|---|---|
spaceId |
string (uuid) | required |
Responses
| Status | Meaning |
|---|---|
200 |
Work limits |
curl -X GET "$RUNSTATE_BASE_URL/v1/spaces/$RUNSTATE_SPACE_ID/work-limits" \ -H "Authorization: Bearer $RUNSTATE_API_KEY"POST /work-limits
Section titled “POST /work-limits”POST /v1/spaces/{spaceId}/work-limitsConfigure an outstanding-work bound.
- Key permission:
resource_config - Idempotency-Key header: required
- TypeScript SDK:
rs.workLimits.ensure() - Python SDK:
rs.work_limits.ensure()
Path parameters
| Name | Type | Notes |
|---|---|---|
spaceId |
string (uuid) | required |
Request body (JSON)
| Field | Type | Required | Notes |
|---|---|---|---|
name |
string | yes | |
scopeId |
string (uuid) | yes | |
maxOutstanding |
integer | yes | min 1 |
Responses
| Status | Meaning |
|---|---|
201 |
Created work limit |
409 |
Error envelope {"error":{"code","message","requestId"}} |
curl -X POST "$RUNSTATE_BASE_URL/v1/spaces/$RUNSTATE_SPACE_ID/work-limits" \ -H "Authorization: Bearer $RUNSTATE_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"name":"<name>","scopeId":"<run id>","maxOutstanding":1}'