Files
FilesResource
Methods
Upload a file's bytes directly and create a file record.
Send the file as multipart/form-data in the file field; the request body
carries the raw bytes, unlike cloud_imports which only references blobs that
already exist in cloud storage. The upload is rejected if it exceeds 25 MB;
larger or direct-to-storage uploads use a separate upload flow. Content is
deduplicated by checksum and MIME type, so uploading bytes identical to an
existing file reuses the already-stored object instead of storing a second
copy. Returns the created file's metadata.
Register files that already exist in cloud blob storage as file records, in one batch.
Unlike upload, this transfers no bytes: each entry references an existing object by its container/bucket, filepath, filename, and MIME type, and only a metadata record pointing at that object is created. Files are imported independently and the response reports a per-file status. The response is 200 when every import succeeds and 207 when results are mixed, with each result marked SUCCESS or a failure reason (file does not exist, invalid permissions, or unknown error). Failed entries carry only the submitted filename and MIME type rather than a full file record.
List the account's files with pagination.
Optionally filter by filename (case-insensitive partial match). Results
are scoped to the files the caller is authorized to read. Files marked hidden
(internal or service-owned artifacts) are excluded from this listing but
remain retrievable by id. Returns file metadata only, not content.
Update a file's mutable metadata by id.
Only the file's tags can be modified; filename, content, size, and other
attributes are immutable through this endpoint. The supplied tags replace the
file's existing tags. Returns the updated file metadata.
Retrieve a single file's metadata by id.
Returns the file record (id, filename, MIME type, size, tags, and related fields) but not the file's bytes; use the content endpoint to download the bytes.
Delete a file by id, removing its database record.
This is a hard delete: the file's row is removed from the database, not soft-archived. The underlying stored object is deleted only when no other file record still references the same stored content (identical checksum and MIME type); when another record shares the blob, the blob is retained. If the id refers to an incomplete multipart upload placeholder, its staged parts are aborted instead. Returns a confirmation carrying the deleted file's id.
Domain types
Content
FilesResource.ContentResource
Methods
Download the raw bytes of a file by id.
Streams the stored object's content back directly (not a redirect or signed URL), with the response Content-Type set to the file's stored MIME type. Use the metadata endpoint for size, filename, and other attributes.
Domain types