Generate pre-signed download URLs for multiple files
POST/api/v1/storage/batch-generate-download-urls
Generates download URLs in a batch. Inspect each result’s success === true and match by fileId; order is not guaranteed. Per-file errors can be returned independently, but malformed requests, authentication and request-level backend failures can still fail the whole call. URLs remain sensitive bearer credentials.
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
- 200
Per-file download URL results returned
Resolve existing file IDs together; inspect each result separately.
Section ID: DOC-CP-files-data-api-batchGenerateDownloadUrls#example-storage-batchGenerateDownloadUrls-request
Request example
{
"fileIds": [
"0123456789abcdef0123456789abcdef"
],
"expiresSeconds": 900
}
Guide request for Show several attachments on the case. Replace example resource identifiers with your own authorized values.
Section ID: DOC-CP-files-data-api-batchGenerateDownloadUrls#example-cookbook-core-platform-files-data-files-05-request
Request example
{
"fileIds": [
"a1b2c3d4e5f60718293a4b5c6d7e8f90",
"b2c3d4e5f60718293a4b5c6d7e8f901a"
],
"expiresSeconds": 3600
}
Illustrative response shape; omitted default fields and actual outcomes depend on the operation.
Section ID: DOC-CP-files-data-api-batchGenerateDownloadUrls#example-storage-batchGenerateDownloadUrls-response
Response example
{
"results": [
{
"fileId": "example_123",
"url": "https://example.com/resource",
"success": true,
"error": "example",
"contentType": "Example text"
}
]
}
Illustrative response for Show several attachments on the case. Replace example resource identifiers with your own authorized values.
Section ID: DOC-CP-files-data-api-batchGenerateDownloadUrls#example-cookbook-core-platform-files-data-files-json-04-response
Response example
{
"results": [
{
"fileId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"url": "https://storage.googleapis.com/bucket/...",
"success": true,
"contentType": "video/mp4"
},
{
"fileId": "b2c3d4e5f60718293a4b5c6d7e8f901a",
"error": "file not found"
}
]
}
Document ID: DOC-CP-files-data-api-batchGenerateDownloadUrls. Section identities and revisions.
| Section | Stable reference |
|---|---|
| Generate pre-signed download URLs for multiple files | DOC-CP-files-data-api-batchGenerateDownloadUrls#overview |
| Request | DOC-CP-files-data-api-batchGenerateDownloadUrls#request |
| Responses | DOC-CP-files-data-api-batchGenerateDownloadUrls#responses |