Metric API Section

The API endpoints for testing are in the swagger documentation under the "asset uri" section.  The endpoints are as follows:

GET /downloads/logs - get the metrics download entries from the database

POST /downloads/logs - Add an entry to the metrics download table

GET /downloads/logs/{downloadId} - get a specific download metrics entry

GET /downloads/logs/{downloadId}/assetContent - get the asset content of the download

GET /downloads/logs/{downloadId}/assetMaster - get the asset master of the download

GET /downloads/logs takes the following parameters

fetchLimitinteger($int32)(query)Maximun number of entries to fetch. Default value : 100
fetchOffsetinteger($int64)(query)Number of rows to skip before returning values. Default value : 0
fromDatestring($date-time)(query)Oldest request date/time to return.
toDatestring($date-time)(query)Newest request date/time to return.
requestedByarray[string](query)Usernames requested by.
sortOptionarray[string](query)Fields to sort on (one or more of date, requestor, assetName, contentUse, filePath).
contentUsestring(query)One of (source, mezzanine, proxy, editProxy, thumbnailVideo, tempDownload, thumbnail, liveStream)

POST /

downloads

/

logs

takes the following parameters

requestDatestring($date-time)(query)
usernamestring(query)
assetContentIdstring(query)
contentUsestring(query)
activityTypestring

If the user posting the activity is not an admin and tries to post a download entry for another user they will get

a 403 Forbidden error.  They are allowed to post an entry for themselves.  This mechanism is there in case we need to post a download event from the UI.

Any downloads through workflow or the UI should automatically result in a download entry being generated automatically.  Any downloads that don't result in an event being written to this table will need to be modified.

See attached workflow downloadAsset.xml for a workflow that will allow downloading any asset by selecting an asset and running the workflow.