Skip to content

Create a saved search

Request

Create a new SavedSearch resource.

Security
bearerToken
Bodyapplication/jsonrequired
namestringrequired

Name of the SavedSearch

Example:"My favourite search"
emailUserOnNewUploadsbooleanrequired

Whether to email the creator when a new upload matches the saved search criterion

Example:true
criterionanyrequired
sortsArray of objectsrequired

Sorts to be applied to the search in order of precedence

curl -i -X POST \
  https://api-v2.dash.app/saved-searches \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My favourite search",
    "emailUserOnNewUploads": true,
    "criterion": {
      "type": "FIELD_EQUALS",
      "value": "Folder",
      "field": {
        "type": "FIXED",
        "fieldName": "STAGED_BY"
      },
      "includeDescendants": true,
      "boost": null
    },
    "sorts": [
      {
        "field": {
          "type": "FIXED",
          "fieldName": "STAGED_BY"
        },
        "order": "ASC"
      }
    ]
  }'

Responses

Success

Bodyapplication/json
idstringrequired

The unique ID of the SavedSearch

Example:"1627573b-1273-441e-90d1-505d1f8ab47c"
accountIdstringrequired

The unique ID of the Account the SavedSearch belongs to

Example:"cfb665ca-ce35-4418-b9d5-70ee815db4bd"
creatorIdstringrequired

The ID of the User who created the SavedSearch

Example:"google-oauth2|110955770826801837334"
namestringrequired

Name of the SavedSearch

Example:"My favourite search"
emailUserOnNewUploadsbooleanrequired

Whether to email the creator when a new upload matches the saved search criterion

Example:true
criterionanyrequired
sortsArray of objectsrequired

Sorts to be applied to the search in order of precedence

Response
{ "id": "1627573b-1273-441e-90d1-505d1f8ab47c", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "creatorId": "google-oauth2|110955770826801837334", "name": "My favourite search", "emailUserOnNewUploads": true, "criterion": { "type": "FIELD_EQUALS", "value": "Folder", "field": {}, "includeDescendants": true, "boost": null }, "sorts": [ {} ] }