The Assets API provides a flexible unified search approach that supports both simple query parameters and advanced filtering through request bodies.
Quick Reference
| Method | Use Case |
|---|
| GET with query params | Simple filtering by single values |
| POST with body | Complex filtering with operators |
| Combined | Mix both for flexibility |
Query Parameters (GET)
When using the GET method, apply filters through URL query parameters:
GET /v1/organizations/:organizationId/projects/:projectId/assets?type=image/jpeg&tag=hero&sort=createdAt:desc
| Parameter | Type | Description |
|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20) |
type | string | Filter by MIME type |
tag | string | Filter by tag ID (can be repeated) |
status | string | Filter by status (active or deleted) |
search | string | Search term for name/description |
sort | string | Sort field and direction (e.g., name:asc) |
from | string | Created date range start (ISO format) |
to | string | Created date range end (ISO format) |
Sort Fields
The following fields are optimized for sorting:
| Field | Description | Example |
|---|
name | Sort by resource name | sort=name:asc |
createdAt | Sort by creation date | sort=createdAt:desc |
updatedAt | Sort by last modification (default) | sort=updatedAt:desc |
type | Sort by asset type | sort=type:asc |
When no sort is specified, resources are sorted by updatedAt:desc by default.