Mutations
Upload and delete assets in your Raster libraries.
Mutations change data in Raster. Every mutation requires an API key with
Write access to the target library, and is sent as a POST request to
https://api.raster.app/.
uploadAssets
Uploads up to 20 files to a library in a single request.
Parameters
Prop
Type
Returns
Prop
Type
Example
mutation {
uploadAssets(
organizationId: "monogram-labs"
libraryId: "barcelona"
files: [$file1, $file2]
email: "user@example.com"
) {
responseText
assets {
id
name
filename
contentType
created
tags
status
progress
}
}
}Each file's type and size is validated before upload. The request verifies your
API key and Write access to the library first, and fails with an
UNAUTHORIZED error if the key is not permitted.
deleteAssets
Deletes one or more assets from a library in a single request.
Parameters
Prop
Type
Returns
Prop
Type
Example
mutation {
deleteAssets(
organizationId: "monogram-labs"
libraryId: "barcelona"
assets: ["asset-123", "asset-456"]
) {
success
message
ids
}
}All asset IDs must belong to the specified library, and every asset is confirmed to exist before any deletion runs. A request that references an unknown asset, or a key without Write access, fails without deleting anything.