Assets
Retrieve and filter assets stored in your Builder Space. Use these operations to query media by type, folder, and other attributes to support content delivery and management workflows.
Assets refer to media content uploaded to Builder. For more details on assets, see Asset Library.
Get all assets
To get all assets from your Builder Space, use the following query.
Query
Response
Sort assets
Use the following query to sort your assets by a particular key, such as the asset's name.
Query
Response
Filter assets by type
To filter assets by media type (such as images, videos, or specific formats), use the type field. Note that this corresponds to the MIME type of the asset.
Query
Response
Common asset types:
image/jpeg: jpeg images
image/png: png images
image/svg+xml: svg images
image/gif: gif images
image/webp: webp images
video/mp4: mp4 videos
application/pdf: pdf documents
Filter assets by folder
To filter assets by folder, use the folders field with the folder ID. Assets can belong to multiple folders, so folders is an array field.
Query
Response
Filter assets by type and folder
You can combine multiple filters to get more specific results. For example, to get all SVG images from a specific folder:
Query
Response
Using variables for dynamic queries
Query
Available query operators
$eq: equal
$ne: not equal
$in: in array
$nin: not in array
$exists: field exists
$regex: regular expression match
Example with multiple operators:
This query returns jpeg or png images that have "logo" in their name and belong to at least one folder.
What's next
Continue to explore the Admin API documentation or use the GraphQL Explorer to try out these queries with your own Space and Organization. Then, visit the Admin API GraphQL Schema for more details on how to modify your queries.