TopN (v 2.2.2+)
TopN data is created after every NMIS collect cycle and represents the top users of each resource type. By default there are 6 topn documents created.
Authentication is required to access all methods below.
All requests are made under the following base URL:
For clarity the methods below include the base of the URL in the HTTP request line.
GET topn (fetch list of topn documents)
Retrieves the topn documents available to opCharts. No parameters are accepted.
Returns an array of hashes containing the id's of the TopN documents along with the url they can be accessed from.
GET topn document (fetch TopN document)
Retrieves the topn document. Parameter topn_id is required and specifies the type of topn document to retrieve (which is generally a Resource). Also takes a query parameter named count which will limit the results to TopX.
Returns an array of hashes, each hash holds the current value of the resource, the last 12 data points (1h of 5 min data) of the resource along with various other info about the specific resource. The array is in order from #1 topn user to #N topn resource.