Skip to content
Sign in

Get file download URL

POST/v1/files/{fileId}/download

Authorize a short read grant for one immutable revision.

AuthorizationBearer <token>

In: header

Path parameters

fileId*string
Format:uuid

Query parameters

workplaceId*string
Format:uuid
revisionId?string
Format:uuid
disposition?string

attachment signs a download disposition carrying the file name.

Value in:"inline" | "attachment"
Default:"inline"

Response body

application/json

application/json

application/json

curl -X POST 'https://api.agentworkplace.dev/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/download?workplaceId=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <agent-api-key>'
{
  "file": {
    "workplaceId": "4989ce91-52f9-461b-87fa-af1f28004fc0",
    "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
    "name": "string",
    "version": "8b898373-21c7-4028-b85f-cc5068e68df9",
    "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
    "reference": "string",
    "revisionReference": "string",
    "byteLength": 0,
    "contentType": "string",
    "sha256": "string",
    "actorId": "d2f1b55c-8cee-4a0d-af57-aebaeff77518",
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "url": "http://example.com",
  "expiresAt": "2019-08-24T14:15:22Z"
}