Skip to content

Files

Import files from cloud storage
POST/v5/files/cloud_imports
List files
GET/v5/files
Update a file
PATCH/v5/files/{file_id}
Get file metadata
GET/v5/files/{file_id}
Delete a file
DELETE/v5/files/{file_id}
ModelsExpand Collapse
SGPFile object { id, created_at, created_by, 7 more }
id: string

The unique identifier of the entity.

created_at: string

The date and time when the entity was created in ISO format.

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
filename: string
md5_checksum: string
mime_type: string
size: number
duration_seconds: optional number
object: optional "file"
tags: optional map[unknown]
FileImportFromCloudResponse object { results }
results: array of object { file, status }

Results for each file import attempt

file: SGPFile { id, created_at, created_by, 7 more } or object { filename, mime_type, object }

The file object (full File for success, minimal _FailedFile for failures)

One of the following:
SGPFile object { id, created_at, created_by, 7 more }
id: string

The unique identifier of the entity.

created_at: string

The date and time when the entity was created in ISO format.

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
filename: string
md5_checksum: string
mime_type: string
size: number
duration_seconds: optional number
object: optional "file"
tags: optional map[unknown]
_FailedFile object { filename, mime_type, object }

Minimal file representation for failed uploads containing only essential information.

filename: string

The original filename from the request

mime_type: string

The original MIME type from the request

object: optional "failed_file"
status: "SUCCESS" or "FAILED_FILE_DOES_NOT_EXIST" or "FAILED_INVALID_PERMISSIONS" or "FAILED_UNKNOWN_ERROR"

The status of the upload attempt

One of the following:
"SUCCESS"
"FAILED_FILE_DOES_NOT_EXIST"
"FAILED_INVALID_PERMISSIONS"
"FAILED_UNKNOWN_ERROR"
FileDeleteResponse object { id, deleted, object }
id: string
deleted: boolean
object: optional "file"

FilesContent

Download file content
GET/v5/files/{file_id}/content
ModelsExpand Collapse
ContentRetrieveResponse = unknown