Skip to main content
Saved Searches allow projects to maintain a collection of common search criteria for content and assets. These searches are globally available within the project, and users can mark their frequently used searches as favorites.

Permission Requirements

Saved searches inherit permissions from content and assets. Users need read permissions on either resource type to view and execute searches, and update permissions to create or modify searches.

The SavedSearch Object

id
string
Unique identifier (UUID)
name
string
Display name of the saved search
description
string
Optional description
type
string
Search type: content or asset. Determines what resources this search queries.
folderId
string
Parent folder ID (null for root). If set, the folder’s type must match this search’s type.
filter
object
Search filter criteria using standard filter operators
sort
object[]
Sort criteria array
favorites
string[]
User IDs who have favorited this search
metadata
object
Additional metadata including lastUsed timestamp and useCount
createdAt
string
Creation timestamp (ISO 8601 format)
updatedAt
string
Last update timestamp (ISO 8601 format)

Example Object

{
  "id": "ss123",
  "name": "Draft Articles",
  "description": "All draft articles in the system",
  "type": "content",
  "folderId": "folder789",
  "filter": {
    "type": {
      "eq": "article"
    },
    "status": {
      "eq": "draft"
    }
  },
  "sort": [
    { "field": "updatedAt", "order": "desc" }
  ],
  "favorites": ["user123", "user456"],
  "metadata": {
    "lastUsed": "2024-03-21T15:30:00Z",
    "useCount": 42
  },
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-21T15:30:00Z"
}
Saved searches use the same filter structure as the direct search capabilities in the Content and Assets endpoints. The key differences are that saved searches:
  1. Store the search criteria for reuse
  2. Can be shared across users within a project
  3. Track usage statistics
  4. Allow favoriting for quick access
The search filter syntax and operators are identical to those used in direct Content and Assets search endpoints:
// Direct Content Search:
POST /v1/organizations/:orgId/projects/:projectId/content
{
  "filter": { "status": { "eq": "published" } }
}

// Equivalent Saved Search:
// 1. Create saved search
POST /v1/organizations/:orgId/projects/:projectId/saved-searches
{
  "name": "Published Content",
  "type": "content",
  "filter": { "status": { "eq": "published" } }
}

// 2. Execute saved search
POST /v1/organizations/:orgId/projects/:projectId/saved-searches/ss123/execute

Filter Operators

Saved searches support all standard filter operators:
OperatorDescriptionExample
eqEquals{ "status": { "eq": "draft" } }
neqNot equals{ "status": { "neq": "deleted" } }
inIn array{ "type": { "in": ["article", "page"] } }
containsString contains{ "name": { "contains": "intro" } }
gteGreater than or equal{ "createdAt": { "gte": "2024-01-01" } }
lteLess than or equal{ "createdAt": { "lte": "2024-12-31" } }

Sort Options

Sort criteria specify how results are ordered:
{
  "sort": [
    { "field": "updatedAt", "order": "desc" },
    { "field": "name", "order": "asc" }
  ]
}
Supported fields vary by search type:
  • Content: name, createdAt, updatedAt, status
  • Asset: name, createdAt, updatedAt, type, size