GET /api/v1/search/
Full-text and metadata search across assets (canonical). Combines exact filters (`tags`, `mimeType`, `metadata.<key>`, `tamsFlowId`, `tamsTimerange`) with free-text `q`, all ANDed, paginated.
The single canonical search endpoint. Combines an exact-filter tier (tags, mimeType, metadata.<key>, tamsFlowId, tamsTimerange) with a free-text tier (q, matched case-insensitively over name and description). All filters are ANDed; omit them all to list every asset and collection in the workspace. Both assets AND collections are searched (issue #561): a collection matches on its name/description/tags and its open custom bag (via metadata.<key>). Asset-only filters (mimeType, tamsFlowId, tamsTimerange) never match a collection. Asset hits and collection hits are returned in separate arrays and each carries a type discriminator ('asset' | 'collection') so they are unambiguously distinguishable. mimeType filters on the extracted container format and accepts either a container token (mp4) or a common media MIME type (video/mp4), which is resolved onto the container family it names (issue #822). Results are paginated via page/pageSize and returned as { assets, collections, total, collectionTotal, page }. The exact-filter tier also carries status (exact lifecycle match, asset-only) and an inclusive created-at range from/to (issue #833); both are applied to the whole matched set before pagination, so they narrow total and every page rather than the page in hand. Results are ALWAYS CURRENT and there is no reindex step (issue #929): this endpoint reads the stored assets and collections per request rather than consulting a separately maintained index, so an edit made through PATCH /api/v1/assets/{id} or PATCH /api/v1/collections/{id} — a rename included — is reflected by the next search with nothing called in between. An asset hit that is archived additionally carries the derived read-only retention window (issue #1034) — archivedAt/purgeAfter/retentionMs, identical in shape and meaning to the member on GET /api/v1/assets/{id} — so ?status=archived answers "when may this be purged?" without a second call. The member is absent on every non-archived hit.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | optional | Case-insensitive free-text query matched against the asset title (the canonical name field, persisted at descriptive.title) and description. Matches title whether the client set it through the ingest title field or the legacy name alias (issue #347). |
tags | query | string | optional | |
mimeType | query | string | optional | Container-format filter, matched against the probe-extracted technicalMetadata.containerFormat. Accepts either a bare container token (mp4, mov, webm, matroska) or a common media MIME type (video/mp4), which is resolved onto the ffprobe container family it names — so video/mp4 matches an asset stored as mov,mp4,m4a (issue #822). Matching is case-insensitive and per family token. A MIME-shaped value that neither maps to a container family nor names a content type this API accepts on upload can never match any asset, and is rejected with 400 unsupported_mime_type rather than silently returning an empty result set. |
status | query | string (uploading, processing, ready, failed, archived) | optional | Exact-match lifecycle status filter, identical in accepted values and match semantics to GET /api/v1/assets/?status=. Applied independently of q, so the same status answers the same asset set with or without a free-text term. Asset-only: supplying it excludes all collection hits, since a collection has no lifecycle status. |
from | query | string | optional | Inclusive lower bound on the asset creation timestamp (createdAt). Accepts a calendar date (YYYY-MM-DD, interpreted as the first instant of that UTC day) or a full ISO 8601 date-time. Applied across the whole result set, not just the returned page. |
to | query | string | optional | Inclusive upper bound on the asset creation timestamp (createdAt). Accepts a calendar date (YYYY-MM-DD, interpreted as the LAST instant of that UTC day, so the named day is included) or a full ISO 8601 date-time. Applied across the whole result set, not just the returned page. |
tamsFlowId | query | string | optional | |
tamsTimerange | query | string | optional | |
page | query | integer | optional | |
pageSize | query | integer | optional |
Response
{
"assets": [
{
"id": "string",
"name": "string",
"status": "string",
"statusHistory": [
{
"at": null,
"from": null,
"to": null,
"reason": null
}
],
"createdAt": "string",
"updatedAt": "string",
"type": "asset",
"description": "string",
"parentId": "string",
"objectKey": "string",
"technicalMetadata": {
"codec": "string",
"width": 0,
"height": 0,
"durationSeconds": 0,
"bitrateBps": 0,
"containerFormat": "string",
"audioTracks": [],
"extractedAt": "string",
"frameRate": 0,
"startTimecode": "string"
},
"technicalMetadataError": "string"
}
],
"collections": [
{
"type": "collection",
"id": "string",
"name": "string",
"createdAt": "string",
"updatedAt": "string",
"description": "string",
"tags": [
"string"
],
"custom": {}
}
],
"total": 0,
"collectionTotal": 0,
"page": 0
}