create_upload_token
Make an upload token: a short-lived credential to give a browser, such as a recording page, so it uploads assets with upload_asset’s REST route without ever holding your API key. It only records assets whose names start with its prefix, up to max_size, in one project, and never replaces an existing asset. It lasts 15 minutes unless expires_in says otherwise.
REST: POST /v1/upload-tokens
delete_asset
Delete an asset by name. Documents that use it can’t render it anymore.
REST: DELETE /v1/assets/{name} · destructive, idempotent
get_asset
Get an asset by name: its size, type, hash, what it was made from, and a download URL that expires.
REST: GET /v1/assets/{name} · read-only
get_import
Get an import from import_asset: running, succeeded with the asset it made, or failed with why.
REST: GET /v1/imports/{import_id} · read-only
import_asset
Make an asset from a file on the web: Rendermate downloads it from the URL, up to 5 GB, and records it under the name. Use it instead of upload_asset when the file has a URL. It answers with a running import; call get_import until its status is succeeded (with the asset) or failed (with why). A taken name is refused unless overwrite is set.
REST: POST /v1/imports · destructive
Replace an asset already at this name. Without it, a name that’s taken is refused with
asset.name_taken, and so is one taken while the file downloads.An http(s) URL on the public internet that Rendermate downloads the file from, up to 5 GB.
list_assets
List the workspace’s assets like a directory: the files and folders under a prefix.
REST: GET /v1/assets · read-only
Folds names under the prefix into subfolders at this separator:
/ (the default) lists one folder’s files and subfolders; empty lists every name under the prefix.move_asset
Rename an asset, or move a folder (both names ending in /) with everything in it. Documents that use the old names don’t follow.
REST: POST /v1/assets/move · destructive
sync_assets
Make a folder of assets match a local folder in one call: give every file’s path, SHA-256 and size. Files the workspace has are recorded at once; you get an upload to make for each of the others, then call again to record them. A file over 100 MiB gets a multipart upload: PUT each part, keep each part’s ETag, and in the next call give that file multipart (its upload_id and every part’s part_number and etag).
REST: POST /v1/assets/sync · destructive
upload_asset
Upload a file you have locally as an asset. Give its name, SHA-256 and size; if the workspace already has that content, it’s recorded without uploading. Otherwise you get an upload to make (method, URL, headers): make it, then call upload_asset again with the same arguments to record the asset. A file over 100 MiB gets a multipart upload instead: PUT each part to its URL, keep the ETag header each PUT returns, then call upload_asset again with the same arguments plus multipart (its upload_id and every part’s part_number and etag). For a file still being written, such as a recording, leave out the SHA-256 and size: you get a multipart upload to PUT parts to as the file grows, every part but the last part_size bytes; call again with multipart (its upload_id and from, the next part’s number) for more part URLs, and finish with the SHA-256, the size and every part’s ETag. For a file on the web, use import_asset.
REST: PUT /v1/assets/{name}
The multipart upload an earlier request answered with. With
sha256 and size, it finishes it once every part is up; without them, it asks for more part URLs of an upload of unknown size.The path to record it under, such as
launch/intro.mp4. Folders are made by naming them.The file’s SHA-256, lowercase hex. Leave it and
size out while the file is still being written, such as a recording, to upload it in parts as it grows.