Get file metadata
POST/api/v1/storage/get-file-metadata
Retrieves a file's tracked metadata without downloading its content.
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: Build a searchable document library
Request
Responses
- 200
File metadata returned
Read metadata for an existing file returned by upload or listing.
Section ID: DOC-CP-files-data-api-getFileMetadata#example-storage-getFileMetadata-request
Request example
{
"fileId": "0123456789abcdef0123456789abcdef"
}
Guide request for Open the selected document’s details. Replace example resource identifiers with your own authorized values.
Section ID: DOC-CP-files-data-api-getFileMetadata#example-cookbook-core-platform-files-data-managing-03-request
Request example
{
"fileId": "a1b2c3d4e5f60718293a4b5c6d7e8f90"
}
Illustrative response shape; omitted default fields and actual outcomes depend on the operation.
Section ID: DOC-CP-files-data-api-getFileMetadata#example-storage-getFileMetadata-response
Response example
{
"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
}
}
Document ID: DOC-CP-files-data-api-getFileMetadata. Section identities and revisions.
| Section | Stable reference |
|---|---|
| Get file metadata | DOC-CP-files-data-api-getFileMetadata#overview |
| Request | DOC-CP-files-data-api-getFileMetadata#request |
| Responses | DOC-CP-files-data-api-getFileMetadata#responses |