Skip to content

Get a duty arrangement

GET
/v1/rotations/{rotationId}/duty-arrangements/{arrangementId}
curl --request GET \
--url https://api.roundrobinbot.eu/v1/rotations/example/duty-arrangements/example \
--header 'Authorization: Bearer <token>'

Requires read:oncall. Returns the arrangement, its current capabilities and the rotation ETag. A cancelled arrangement remains readable by identifier. An arrangement outside this rotation is not found.

rotationId
required
string

The rotation identifier.

arrangementId
required
string

The arrangement identifier.

OK

Media typeapplication/json

One arrangement and its current permitted actions.

object
arrangement
required

The requested arrangement, including a cancelled arrangement when addressed by identifier.

object
id
required

The arrangement identifier.

string
rotationId
required

The rotation identifier.

string
cellId
required

The identifier of the lane in a window.

string
userId
required

The assigned person’s Slack user identifier.

string
from
required

The inclusive UTC start.

string format: date-time
to
required

The exclusive UTC end.

string format: date-time
revision
required

The arrangement revision used when changing or ending it.

integer format: int64
state
required

active or cancelled. An active record can describe an interval that has already ended.

string
kind
required

directAssignment, acceptedCover or swapLeg. Direct-assignment writes change or end only directAssignment.

string
phase
required

upcoming, running or ended, from from and to at the time the response is built.

string
changesAtUtc
required

The next instant at which phase changes, or null once it has ended.

null | string format: date-time
origin
One of:
null
originalSnapshot
One of:
null
turnSelection
One of:
null
capability
required

The caller’s current change and end capabilities.

object
canChange
required

Whether the caller can change the direct assignment, subject to write validation.

boolean
canEnd
required

Whether the caller can end the remaining direct assignment.

boolean
reason
required

A refusal code when the actions are unavailable; otherwise null.

null | string
reasonCode
required

The same word as reason; otherwise null.

null | string
Examplegenerated
{
"arrangement": {
"id": "example",
"rotationId": "example",
"cellId": "example",
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"revision": 1,
"state": "example",
"kind": "example",
"phase": "example",
"changesAtUtc": "2026-04-15T12:00:00Z",
"origin": {
"userIds": [
"example"
],
"complete": true
},
"originalSnapshot": {
"asOfUtc": "2026-04-15T12:00:00Z",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"complete": true,
"segments": [
{
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"userIds": [
"example"
],
"resolved": true
}
]
},
"turnSelection": {
"kind": "example",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z"
}
},
"capability": {
"canChange": true,
"canEnd": true,
"reason": "example",
"reasonCode": "example"
}
}