Skip to main content

Generate a pre-signed download URL

POST 

/api/v1/storage/generate-download-url

Generates a time-limited pre-signed URL for downloading a file directly from the storage backend.

The following access conditions are preserved as declared intent and are not implemented by generated code: Accepted storage owner context, Storage owner actor routing.

Use this in a guide: Add file attachments to a support request

Request​

Responses​

Download URL generated

Request a short-lived download URL for an existing file.​

Section ID: DOC-CP-files-data-api-generateDownloadUrl#example-storage-generateDownloadUrl-request

Request example

{
"fileId": "0123456789abcdef0123456789abcdef",
"expiresSeconds": 900
}

Guide request for Let the customer reopen the attachment. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-CP-files-data-api-generateDownloadUrl#example-cookbook-core-platform-files-data-files-04-request

Request example

{
"fileId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"expiresSeconds": 3600
}

Guide request for Let the customer reopen the attachment. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-CP-files-data-api-generateDownloadUrl#example-cookbook-core-platform-files-data-files-json-03-request

Request example

{
"fileId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"responseContentDisposition": "attachment; filename=my-video.mp4"
}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-CP-files-data-api-generateDownloadUrl#example-storage-generateDownloadUrl-response

Response example

{
"url": "https://example.com/resource",
"file": {
"fileId": "example_123",
"name": "example",
"path": "documents/example.txt",
"folderPath": "documents/example.txt",
"sizeBytes": "1",
"contentType": "Example text",
"uploadedAt": "example",
"modifiedAt": "example",
"metadata": {},
"tags": [
"example"
],
"description": "example",
"storageRef": {
"bucket": "example",
"key": "example_123",
"provider": "STORAGE_PROVIDER_GCS"
},
"checksum": "example",
"version": 1
}
}

Illustrative response for Let the customer reopen the attachment. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-CP-files-data-api-generateDownloadUrl#example-cookbook-core-platform-files-data-files-json-02-response

Response example

{
"url": "https://storage.googleapis.com/bucket/...",
"file": {
"name": "video.mp4",
"path": "/media/video.mp4",
"sizeBytes": "52428800",
"contentType": "video/mp4"
}
}

Document ID: DOC-CP-files-data-api-generateDownloadUrl. Section identities and revisions.

SectionStable reference
Generate a pre-signed download URLDOC-CP-files-data-api-generateDownloadUrl#overview
RequestDOC-CP-files-data-api-generateDownloadUrl#request
ResponsesDOC-CP-files-data-api-generateDownloadUrl#responses