RoadOpsDeveloper

Day Files

Ask

List day files

GET/v1/teams/{teamId}/days/{dayId}/files

Lists files attached to a day.

Required scopes: day_file:read

Parameters

path.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

query.limitinteger

Maximum number of records to return. Defaults to 50 and is capped at 200.

query.cursorstring

Cursor returned by page.nextCursor from the previous list response.

Response 200

dataobject[]
data[].dayIdstring:uuid
data[].fileNamestring
data[].contentTypestring
data[].sizeBytesinteger
data[].visibilityobject
data[].visibility.groupIdsstring:uuid[]
data[].visibility.userIdsstring:uuid[]
data[].idstring:uuid
data[].orgIdstring:uuid
data[].isDeletedboolean
data[].versioninteger

Current day file aggregate version.

data[].createdAtstring:date-time

ISO 8601 timestamp when the day file was created.

data[].createdBystring

User identifier that created the day file.

data[].updatedAtstring:date-time

ISO 8601 timestamp when the day file was last updated.

data[].updatedBystring

User identifier that last updated the day file.

data[].deletedAtstring:date-time

ISO 8601 timestamp when the day file was deleted.

data[].cursorinteger

Latest event-ledger cursor projected into this day file record.

pageobject
page.limitinteger

Maximum number of records returned in this page.

page.nextCursorstring | null

Cursor to pass as the next request's cursor query parameter, or null when there are no more results.

metaobject
meta.cursornumber | null

Highest record cursor represented by this response.

Upload a day file

POST/v1/teams/{teamId}/days/{dayId}/files

Uploads 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.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Request body (multipart/form-data)

filerequiredstring

Required multipart/form-data file part. Send the binary upload in a form field named file.

idstring:uuid

Optional caller-supplied day file ID. RoadOps generates one when omitted.

fileNamestring

Optional multipart/form-data text field named fileName. Defaults to the uploaded file name.

visibilitystring

Optional multipart/form-data text field named visibility. The value must be a JSON string matching the RoadOps visibility object.

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative 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.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

path.fileIdrequiredstring:uuid

Day file identifier.

Response 200

dataobject
data.dayIdstring:uuid
data.fileNamestring
data.contentTypestring
data.sizeBytesinteger
data.visibilityobject
data.visibility.groupIdsstring:uuid[]
data.visibility.userIdsstring:uuid[]
data.idstring:uuid
data.orgIdstring:uuid
data.isDeletedboolean
data.versioninteger

Current day file aggregate version.

data.createdAtstring:date-time

ISO 8601 timestamp when the day file was created.

data.createdBystring

User identifier that created the day file.

data.updatedAtstring:date-time

ISO 8601 timestamp when the day file was last updated.

data.updatedBystring

User identifier that last updated the day file.

data.deletedAtstring:date-time

ISO 8601 timestamp when the day file was deleted.

data.cursorinteger

Latest event-ledger cursor projected into this day file record.

metaobject
meta.cursorinteger

Highest 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.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

path.fileIdrequiredstring:uuid

Day file identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Request body (application/json)

expectedVersioninteger

Optional aggregate version guard.

updatesrequiredobject

Day file fields to update.

updates.visibilityobject | null

Updated visibility, or null to clear custom visibility.

updates.visibility.groupIdsstring:uuid[]
updates.visibility.userIdsstring:uuid[]

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative 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.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

path.fileIdrequiredstring:uuid

Day file identifier.

header.Idempotency-Keystring:uuid

Optional caller-generated UUID used to make mutation retries safe. Reuse the same UUID only when retrying the same request.

Response 202

commandIdstring:uuid

Command identifier accepted into the RoadOps command ledger.

resourceIdstring:uuid

Identifier of the resource targeted by the command.

resourceTypestring

Resource type targeted by the command.

status"applied"

Command dispatch status.

aggregateVersioninteger

Aggregate version produced by the accepted command.

cursorinteger

Event-ledger cursor for the accepted update. Refetch until returned records reach this cursor.

linksobject
links.refetchstring

Relative URL to refetch the affected resource.

Download a day file

GET/v1/teams/{teamId}/days/{dayId}/files/{fileId}/download

Redirects 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.teamIdrequiredstring:uuid

Team identifier.

path.dayIdrequiredstring:uuid

Day identifier.

path.fileIdrequiredstring:uuid

Day file identifier.