Queries
Read assets, libraries, and tags from your Raster organization.
Queries read data from Raster. Every query requires an API key with at least
Read access to the libraries it touches, and is sent as a POST request to
https://api.raster.app/.
assets
Retrieves a paginated list of assets from a library.
Parameters
Prop
Type
Returns
An array of asset objects:
Prop
Type
Example
query {
assets(
organizationId: "monogram-labs"
libraryId: "barcelona"
page: 1
pageSize: 20
tags: ["landscape", "nature"]
) {
id
name
type
url
tags
}
}The request verifies your API key and library access before fetching. If the key
is not authorized for the library, the query fails with an UNAUTHORIZED error.
libraries
Retrieves a paginated list of libraries in an organization.
Parameters
Prop
Type
Returns
An array of library objects:
Prop
Type
Example
query {
libraries(organizationId: "monogram-labs", page: 1, pageSize: 10) {
id
name
assetsCount
trashCount
tags {
id
count
type
}
}
}tags
Retrieves the tags used in a library, sorted by usage count (descending).
Parameters
Prop
Type
Returns
An array of tag objects:
Prop
Type
Example
query {
tags(organizationId: "monogram-labs", libraryId: "barcelona", limit: 10) {
id
count
type
}
}Tag IDs that begin with * have that character stripped in the response. If tag
retrieval fails internally, the error is logged and an empty result is returned
rather than failing the request.
photos (deprecated)
Deprecated. Use assets instead. photos is kept only for
backward compatibility and may be removed in a future release.
Retrieves a list of assets from a library. Unlike assets, it always returns a
fixed page size of 500 items.
Parameters
Prop
Type
Returns
An array of photo objects with id, name, url, createdAt, updatedAt,
and a metadata object.
Example
query {
photos(organizationId: "monogram-labs", libraryId: "barcelona", page: 0) {
id
name
url
createdAt
updatedAt
metadata
}
}