Days
Ask
List days
GET/v1/teams/{teamId}/daysLists day records for a team.
Required scopes: day:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
query.startDate | string:dateOptional inclusive start date filter in YYYY-MM-DD format. |
query.endDate | string:dateOptional inclusive end date filter in YYYY-MM-DD format. |
query.includeHistorical | booleanSet to true to include historical days when no startDate or endDate is provided. Defaults to false. |
query.limit | integerMaximum number of records to return. Defaults to 50 and is capped at 200. |
query.cursor | stringCursor returned by page.nextCursor from the previous list response. |
Response 200
data | object[] |
|---|---|
data[].id | string:uuidDay identifier. |
data[].orgId | string:uuidTeam identifier. |
data[].name | stringDay display name. |
data[].date | stringCalendar date for the day in YYYY-MM-DD format. |
data[].timezone | objectIANA timezone for the day. |
data[].location | stringOptional city, venue, or location label. |
data[].color | stringHex color reference for the day label, formatted as #RRGGBB. |
data[].visibility | objectOptional visibility rules for the day. |
data[].visibility.groupIds | string:uuid[] |
data[].visibility.userIds | string:uuid[] |
data[].latitude | numberLatitude in decimal degrees. |
data[].longitude | numberLongitude in decimal degrees. |
data[].isDeleted | booleanSoft-delete flag. |
data[].version | integerCurrent day aggregate version. |
data[].cursor | integerLatest event-ledger cursor projected into this day record. |
page | object |
page.limit | integerMaximum number of records returned in this page. |
page.nextCursor | string | nullCursor to pass as the next request's cursor query parameter, or null when there are no more results. |
meta | object |
meta.cursor | number | nullHighest record cursor represented by this response. |
Create a day
POST/v1/teams/{teamId}/daysAccepts a command to create a day.
Required scopes: day:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Request body (application/json)
namerequired | stringDay display name. |
|---|---|
daterequired | stringCalendar date for the day in YYYY-MM-DD format. |
timezonerequired | objectIANA timezone for the day. |
location | stringOptional city, venue, or location label. |
color | stringHex color reference for the day label, formatted as #RRGGBB. |
visibility | objectOptional visibility rules for the day. |
visibility.groupIds | string:uuid[] |
visibility.userIds | string:uuid[] |
latitude | numberLatitude in decimal degrees. |
longitude | numberLongitude in decimal degrees. |
id | string:uuidOptional caller-supplied day ID. RoadOps generates one when omitted. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerEvent-ledger cursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative URL to refetch the affected resource. |
Retrieve a day
GET/v1/teams/{teamId}/days/{dayId}Returns a single day record by ID.
Required scopes: day:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
Response 200
data | object |
|---|---|
data.id | string:uuidDay identifier. |
data.orgId | string:uuidTeam identifier. |
data.name | stringDay display name. |
data.date | stringCalendar date for the day in YYYY-MM-DD format. |
data.timezone | objectIANA timezone for the day. |
data.location | stringOptional city, venue, or location label. |
data.color | stringHex color reference for the day label, formatted as #RRGGBB. |
data.visibility | objectOptional visibility rules for the day. |
data.visibility.groupIds | string:uuid[] |
data.visibility.userIds | string:uuid[] |
data.latitude | numberLatitude in decimal degrees. |
data.longitude | numberLongitude in decimal degrees. |
data.isDeleted | booleanSoft-delete flag. |
data.version | integerCurrent day aggregate version. |
data.cursor | integerLatest event-ledger cursor projected into this day record. |
meta | object |
meta.cursor | integerHighest record cursor represented by this response. |
Update a day
PATCH/v1/teams/{teamId}/days/{dayId}Accepts a command to update a day.
Required scopes: day:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Request body (application/json)
expectedVersion | integerOptional aggregate version guard. |
|---|---|
updatesrequired | object |
updates.name | stringUpdated day display name. |
updates.timezone | objectUpdated IANA timezone identifier. |
updates.location | string | nullUpdated city, venue, or location label, or null to clear it. |
updates.color | string | nullUpdated hex color reference for the day label, or null to clear it. |
updates.visibility | object | nullUpdated visibility rules or null to clear them. |
updates.visibility.groupIds | string:uuid[] |
updates.visibility.userIds | string:uuid[] |
updates.latitude | number | nullUpdated latitude in decimal degrees, or null to clear it. |
updates.longitude | number | nullUpdated longitude in decimal degrees, or null to clear it. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerEvent-ledger cursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative URL to refetch the affected resource. |
Delete a day
DELETE/v1/teams/{teamId}/days/{dayId}Accepts a command to delete a day.
Required scopes: day:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
header.Idempotency-Key | string:uuidOptional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request. |
Response 202
commandId | string:uuidCommand identifier accepted into the RoadOps command ledger. |
|---|---|
resourceId | string:uuidIdentifier of the resource targeted by the command. |
resourceType | stringResource type targeted by the command. |
status | "applied"Command dispatch status. |
aggregateVersion | integerAggregate version produced by the accepted command. |
cursor | integerEvent-ledger cursor for the accepted update. Refetch until returned records reach this cursor. |
links | object |
links.refetch | stringRelative URL to refetch the affected resource. |