Elvis 6 REST API - log usage stats

What does it do?

Logs an entry in the stats database for usage statistics about assets. A record will be added to the "usage_log" table.

Most information in the "usage_log" table is automatically filled based on the currently authenticated user and the specified assetId: log_date, user_name, user_groups, client_type, remote_addr, remote_host, action_type, asset_id, asset_path, asset_type, asset_domain, details.

POST requests only

This REST API only accepts POST requests, not GET requests. Also, the POST request needs to include a cross-site request forgery (csrf) token.

The csrf token is a unique code which, by including it in the request, also makes the POST request unique and therefore much more secure.

The csrf token is obtained by first logging in to Elvis Server through a POST request. The response that is received will include the csrf token which can then be used in subsequent POST requests as a http header: