Skip to main content

Find Recent Images

Get the most recently uploaded images:
{
  "filter": {
    "type": { "like": "image/%" },
    "status": { "eq": "active" }
  },
  "sort": [{ "field": "createdAt", "order": "desc" }],
  "limit": 50
}

Find Large Videos

Find video files larger than 10MB:
{
  "filter": {
    "type": { "like": "video/%" },
    "size": { "gt": 10000000 }
  },
  "sort": [{ "field": "size", "order": "desc" }]
}

Find Assets by Multiple Tags

Find assets that have both “hero” and “homepage” tags:
{
  "filter": {
    "tags": { "all": ["hero", "homepage"] },
    "status": { "eq": "active" }
  }
}

Find Assets by Any Tag

Find assets that have either “hero” or “banner” tags:
{
  "filter": {
    "tags": { "any": ["hero", "banner"] },
    "status": { "eq": "active" }
  }
}

Find Assets in Date Range

Find assets created in Q1 2024:
{
  "filter": {
    "createdAt": {
      "gte": "2024-01-01T00:00:00Z",
      "lte": "2024-03-31T23:59:59Z"
    }
  },
  "sort": [{ "field": "createdAt", "order": "asc" }]
}

Find Assets by Name Pattern

Find all assets with names starting with “banner-”:
{
  "filter": {
    "name": { "like": "banner-%" }
  },
  "sort": [{ "field": "name", "order": "asc" }]
}

Find Small Icons

Find SVG icons under 50KB:
{
  "filter": {
    "type": { "eq": "image/svg+xml" },
    "size": { "lt": 50000 },
    "tags": { "any": ["icon"] }
  }
}

Find Unused Assets

Find assets not tagged with any product category:
{
  "filter": {
    "tags": { "nin": ["product", "hero", "featured"] },
    "status": { "eq": "active" }
  },
  "sort": [{ "field": "updatedAt", "order": "asc" }]
}

Pagination Example

Fetch page 3 of results with 25 items per page:
{
  "filter": {
    "type": { "like": "image/%" }
  },
  "sort": [{ "field": "createdAt", "order": "desc" }],
  "page": 3,
  "limit": 25
}

Combined Query Parameters and Body

Using URL parameters for common filters and body for complex conditions:
POST /v1/organizations/org123/projects/proj456/assets/search?status=active&sort=createdAt:desc
{
  "filter": {
    "type": { "in": ["image/jpeg", "image/png", "image/webp"] },
    "size": { "lt": 2000000 },
    "tags": { "any": ["product", "thumbnail"] }
  },
  "limit": 100
}