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
- Staginghttps://api-v2.dashstaging.app/asset-download-event-searches
- MATCH_ALL
- FIELD_EQUALS
- FIELD_IN_RANGE
- AND
- OR
- NOT
- Search downloads by user id
- Search downloads by user email and asset id
- Search downloads by multiple asset ids
- Search downloads within date range
- Aggregate all downloads by date
- Aggregate portal downloads by portal
- Aggregate account user downloads by user id
- Aggregate account user downloads by user id and asset id
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
- ACCOUNT_USER
- SHARE_USER
- PORTAL_USER
- UNKNOWN
- Results with paged events without aggregations
- Results with paged events with aggregations
- Results without paged events with terms bucket aggregations
- Results without paged events with multiple terms bucket aggregations
- Results without paged events with date histogram bucket aggregations
- No results
{ "totalResults": 3, "results": [ { … }, { … }, { … } ], "aggregations": [] }