Loading TOC...

GET /manage/v2/usage-report

Summary

Returns a usage report. A report in the zip format is a full report; reports in the other formats are summaries. You can return a report for a specific number of previous-days, or for a specific time period, as specified by the start-date and end-date parameters. If is an error to specify both a start-date and previous-days. If no reporting period is specified, the default is the previous 90 days.

URL Parameters
format The format of the data in the response body. Allowed values: zip, csv, json or xml (default).
previous-days The number of previous days for which to report usage.
start-date A timestamp that identifies the beginning of the reporting period (in the form of dateTime).
end-date A timestamp that identifies the beginning of the reporting period (in the form of dateTime). If you specify a start-date but no end-date, the end-date is set to the current date.
Request Headers
Accept The desired MIME type of the data in the response body. If the format parameter is present, it takes precedence over this header. Supported values: application/xml (default), application/json, text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic server returns status code 200 (OK) and the response body contains the requested data. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage-admin

Example


http://localhost:8002/manage/v2/usage-report

==>  Returns a usage report for the last 90 days. 
    

Comments

  • Sample output taken from a single-node Mac: <usage-report xmlns="http://marklogic.com/manage"> <meter> <start-time>2016-08-04T21:34:12.351598+08:00</start-time> <end-time>2016-08-04T23:13:47.133819+08:00</end-time> <cluster-name>wedge-cluster</cluster-name> <host-name>wedge.gateway.2wire.net</host-name> <group-name>Default</group-name> <cluster-name>wedge-cluster</cluster-name> <host-name>wedge.gateway.2wire.net</host-name> <group-name>Default</group-name> <architecture>x86_64</architecture> <platform>macosx</platform> <license-key>xxxx-xxxx-xxxx</license-key> <cpus>1</cpus> <cores>4</cores> <core-threads>4</core-threads> <edition>Enterprise Edition</edition> <host-size>3824</host-size> <host-large-data-size>0</host-large-data-size> <memory-size>8192</memory-size> </meter> </usage-report>
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy