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.
Create a new Asset Download Event Search
The maximum number of items to return in the result set.
- Productionhttps://api-v2.dash.app/asset-download-event-searches
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": {}
}'Success
The specified page of [AssetDownloadEvent] resources which match the search criterion
The total number of [AssetDownloadEvent] resources which match the search criterion
{ "totalResults": 3, "results": [ { … }, { … }, { … } ], "aggregations": [] }