Day Files
Ask
List day files
GET/v1/teams/{teamId}/days/{dayId}/filesLists files attached to a day.
Required scopes: day_file:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
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[].dayId | string:uuid |
data[].fileName | string |
data[].contentType | string |
data[].sizeBytes | integer |
data[].visibility | object |
data[].visibility.groupIds | string:uuid[] |
data[].visibility.userIds | string:uuid[] |
data[].id | string:uuid |
data[].orgId | string:uuid |
data[].isDeleted | boolean |
data[].version | integerCurrent day file aggregate version. |
data[].createdAt | string:date-timeISO 8601 timestamp when the day file was created. |
data[].createdBy | stringUser identifier that created the day file. |
data[].updatedAt | string:date-timeISO 8601 timestamp when the day file was last updated. |
data[].updatedBy | stringUser identifier that last updated the day file. |
data[].deletedAt | string:date-timeISO 8601 timestamp when the day file was deleted. |
data[].cursor | integerLatest event-ledger cursor projected into this day file 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. |
Upload a day file
POST/v1/teams/{teamId}/days/{dayId}/filesUploads one file attachment for a day and accepts a command to create the day file record. Send the request as multipart/form-data with the binary file in the file field. Optional text fields are id, fileName, and visibility. Direct uploads are capped at 10 MB.
Required scopes: day_file: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 (multipart/form-data)
filerequired | stringRequired multipart/form-data file part. Send the binary upload in a form field named file. |
|---|---|
id | string:uuidOptional caller-supplied day file ID. RoadOps generates one when omitted. |
fileName | stringOptional multipart/form-data text field named fileName. Defaults to the uploaded file name. |
visibility | stringOptional multipart/form-data text field named visibility. The value must be a JSON string matching the RoadOps visibility object. |
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 file
GET/v1/teams/{teamId}/days/{dayId}/files/{fileId}Returns one day file by ID.
Required scopes: day_file:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
path.fileIdrequired | string:uuidDay file identifier. |
Response 200
data | object |
|---|---|
data.dayId | string:uuid |
data.fileName | string |
data.contentType | string |
data.sizeBytes | integer |
data.visibility | object |
data.visibility.groupIds | string:uuid[] |
data.visibility.userIds | string:uuid[] |
data.id | string:uuid |
data.orgId | string:uuid |
data.isDeleted | boolean |
data.version | integerCurrent day file aggregate version. |
data.createdAt | string:date-timeISO 8601 timestamp when the day file was created. |
data.createdBy | stringUser identifier that created the day file. |
data.updatedAt | string:date-timeISO 8601 timestamp when the day file was last updated. |
data.updatedBy | stringUser identifier that last updated the day file. |
data.deletedAt | string:date-timeISO 8601 timestamp when the day file was deleted. |
data.cursor | integerLatest event-ledger cursor projected into this day file record. |
meta | object |
meta.cursor | integerHighest record cursor represented by this response. |
Update a day file
PATCH/v1/teams/{teamId}/days/{dayId}/files/{fileId}Accepts a command to update day file metadata. File replacement is not supported; delete and upload a new file instead.
Required scopes: day_file:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
path.fileIdrequired | string:uuidDay file 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 | objectDay file fields to update. |
updates.visibility | object | nullUpdated visibility, or null to clear custom visibility. |
updates.visibility.groupIds | string:uuid[] |
updates.visibility.userIds | string:uuid[] |
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 file
DELETE/v1/teams/{teamId}/days/{dayId}/files/{fileId}Accepts a command to delete a day file and remove the stored object.
Required scopes: day_file:write
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
path.fileIdrequired | string:uuidDay file 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. |
Download a day file
GET/v1/teams/{teamId}/days/{dayId}/files/{fileId}/downloadRedirects to a short-lived signed URL that downloads the file directly. Follow the redirect or read the Location response header.
Required scopes: day_file:read
Parameters
path.teamIdrequired | string:uuidTeam identifier. |
|---|---|
path.dayIdrequired | string:uuidDay identifier. |
path.fileIdrequired | string:uuidDay file identifier. |