Skip to content

Asset Download Events

An Asset Download Event Search allows you to search and aggregate over Asset Download Events

Criteria can be constructed based on exact or ranged comparison of the queryable event fields listed in the request schema below. Some fields like USER_TYPE and DOWNLOAD_TYPE have a fixed set of possible values which can be determined from the response scheme below.

The logical operators AND, OR and NOT are provided to support complex queries based on multiple fields.

A list of sorts can also be provided to control the order in the which the results are returned.

Only the ids of referenced resources such as Portal and Asset are provided in the response, which can then be used to GET the full resources.

Aggregations operations can also be performed on the events described by the criteria, in order to, for example

  • Search across all downloads and count the number of downloads for each asset
  • Search downloads for a specific user and count the number of downloads per month

Note, an Asset Download Event Search will only allow you to page to 10,000 but values returned in any aggregations and the totalResults property will be correct.

Search for asset download events

Request

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
criterionobjectrequired
sortsArray of objectsrequired

Sorts to be applied to the search in order of precedence

Default:[]
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-download-event-searches \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": 0,
    "pageSize": 100,
    "criterion": {
      "type": "FIELD_EQUALS",
      "field": "USER_ID",
      "value": "162c8739-b830-4d2f-b241-97951734a04e"
    },
    "sorts": [
      {
        "field": "DATE_TIME",
        "order": "DESC"
      }
    ],
    "aggregations": {}
  }'

Responses

Success

Bodyapplication/json
resultsArray of objectsrequired

The specified page of [AssetDownloadEvent] resources which match the search criterion

totalResultsintegerrequired

The total number of [AssetDownloadEvent] resources which match the search criterion

Example:15
aggregationsobjectrequired

A map of the aggregations requested keyed on the user provided key in the request

Response
{ "totalResults": 3, "results": [ {}, {}, {} ], "aggregations": [] }