Skip to content

Search for assets

Request

A standard AssetSearch will only allow you to page to 10,000 results regardless of the value returned in the totalResults property.

If you need to be able to process more than 10,000 results consider an AssetScrollSearch instead.

Security
bearerToken
Bodyapplication/jsonrequired
fromintegerrequired

The item number to begin the result set from

Default:0
Example:0
pageSizeinteger, [ 0 .. 1000 ]required

The maximum number of items to return in the result set.

Default:100
Example:100
criterionanyrequired
sortsArray of objectsrequired

Sorts to be applied to the search in order of precedence

actionstring

Specifies the context in which the search is being run. For example if you only want to return Asset resources that the search User has permission to delete then set the action to be SEARCH_FOR_DELETE.

Default:"SEARCH_FOR_VIEW"
Enum:"SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_PENDING_APPROVAL""SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_LIVE""SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_BINNED""SEARCH_FOR_DELETE""SEARCH_FOR_EDIT""SEARCH_FOR_PROMOTE_TO_LIVE""SEARCH_FOR_SEND_FOR_APPROVAL""SEARCH_FOR_VIEW"
Example:"SEARCH_FOR_VIEW"
aggregationsobject

A map of requested aggregations. The results will be returned in a map with the same provided keys.

curl -i -X POST \
  https://api-v2.dash.app/asset-searches \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": 0,
    "pageSize": 100,
    "criterion": {
      "type": "FIELD_EQUALS",
      "value": "a32fe863-0a1d-4b54-990a-b094139cf81c",
      "field": {
        "type": "FIELD",
        "fieldId": "a52b5315-15b8-417f-b742-d6902108bac1"
      }
    },
    "sorts": []
  }'

Responses

Success

Bodyapplication/json
resultsArray of objectsrequired

The requested page of Asset resources which match the search criterion

totalResultsintegerrequired

The total number of Asset resources which match the search criterion

Example:1337
aggregationsobject

A map of the aggregations requested keyed on the keys provided by the user in the request.

Response
{ "results": [ {} ], "totalResults": 1337, "aggregations": { "property1": {}, "property2": {} } }