Get Top N Stats Of Resources Using GET

Get Top N Stats Of Resources Using GET

Get the Top-N stats data for one or more Resources and a set of StatKeys

Request
URI
GET
https://{api_host}/api/resources/stats/topn
COPY
Query Parameters
integer
begin
Optional

The beginning date as a long value of the range of stats to return Value measures the number of milliseconds since January 1, 1970 00:00:00 UTC NOTE: If not provided, 24 hour rearward of ending date is used

boolean
currentOnly
Optional

Indicates whether to report only "current" stat values, i.e. skip the stat-s that haven't published any value during recent collection cycles.

boolean
dt
Optional

Indicates that the requested stats are based on some dynamic threshold. Defaults to false which indicates that stats are not based on dynamic threshold.

integer
end
Optional

The ending date as a long value of the range of stats to return Long value is number of milliseconds since January 1, 1970 00:00:00 UTC NOTE: The ending date must not be less than the beginning date. If not provided, current time as UTC milliseconds is used

string
groupBy
Optional

The type of grouping, if not set defaults to ResourceStatGroupBy.RESOURCE

Possible values are : RESOURCE, STATKEY,
integer
intervalQuantifier
Optional

Number for the interval type

string
intervalType
Optional

Interval type requested by the user (e.g: Days, Weeks, Months etc.)

Possible values are : HOURS, MINUTES, SECONDS, DAYS, WEEKS, MONTHS, YEARS,
integer
latestMaxSamples
Optional

The maximum number of samples to return when querying latest. When processing the get latest stats query if it is omitted a value of 1 is assumed. A query for the latest samples is not compatible with specifying the RollUpType value.

boolean
metrics
Optional

Indicates whether specified statKey-s of query should be forcibly treated as metrics

string of array
resourceId
Optional

Array of Resource ids for which the stats should be fetched

string
rollUpType
Optional

Rollup Type requested by the user (e.g.: AVG, MIN, MAX etc.)

Possible values are : SUM, AVG, MIN, MAX, NONE, LATEST, COUNT,
string
sortOrder
Optional

The type of sorting, if not set defaults to ResourceStatSort.ASCENDING

Possible values are : ASCENDING, DESCENDING,
string of array
statKey
Optional

Array of stat keys for which the stats should be returned

integer
topN
Required

The number of results. Keep in mind if a grouping contains multiple items (eg: grouped by resource, with 4 metrics for the grouping resource) then returning the group with 4 metrics counts as 4 topN entries. If there are not enough remaining open topN entries to return an entire group within the topN then the entire group is not returned. *


Authentication
This operation uses the following authentication methods.
Responses
200

TopN data keyed by each Resource identifier

Returns ResourceStatGroupList of type(s) application/json
{
    "groupBy": "string",
    "resourceStatGroups": [
        {
            "groupKey": "string",
            "links": [
                {
                    "description": "string",
                    "href": "string",
                    "name": "string",
                    "rel": "string"
                }
            ],
            "resourceStats": [
                {
                    "links": [
                        {
                            "description": "string",
                            "href": "string",
                            "name": "string",
                            "rel": "string"
                        }
                    ],
                    "resourceId": "string",
                    "stat": {
                        "data": [
                            "number"
                        ],
                        "dtTimestamps": [
                            0
                        ],
                        "intervalUnit": {
                            "intervalType": "string",
                            "quantifier": 0
                        },
                        "links": [
                            {
                                "description": "string",
                                "href": "string",
                                "name": "string",
                                "rel": "string"
                            }
                        ],
                        "maxThresholdData": [
                            "number"
                        ],
                        "minThresholdData": [
                            "number"
                        ],
                        "rollUpType": "string",
                        "smoothValues": [
                            "number"
                        ],
                        "statKey": {
                            "key": "string"
                        },
                        "timestamps": [
                            0
                        ],
                        "values": [
                            "string"
                        ]
                    }
                }
            ]
        }
    ],
    "sortOrder": "string"
}
string
groupBy
Optional

groupBy

Possible values are : RESOURCE, STATKEY,
resourceStatGroups
Optional

resourceStatGroups

string
sortOrder
Optional

sortOrder

Possible values are : ASCENDING, DESCENDING,

Resources Operations
POST
Add Group Type Using POST
POST
Add Stats For Resources Using POST
POST
Add Stats For Resources Using Push Adapter Kind Using POST
POST
Create Custom Group Using POST
POST
Create Custom Profile Using POST
POST
Create Resource Using Adapter Instance Using POST
POST
Create Resource Using Adapter Kind Using POST
DELETE
Delete Custom Group Using DELETE
DELETE
Delete Custom Profile Using DELETE
DELETE
Delete Group Type Using DELETE
DELETE
Delete Resources Using DELETE
GET
Get Custom Group Members Using GET
GET
Get Custom Groups Using GET
GET
Get Custom Group Using GET
GET
Get Custom Profiles Using GET
GET
Get Custom Profile Using GET
GET
Get Group Types Using GET
GET
Get Latest Stats Of Resources Using GET
POST
Get Matching Resources Using POST
GET
Get Resource Properties List Using GET
POST
Get Resources Relationships Using POST
GET
Get Resources Using GET
GET
Get Stat Keys Of Resources Using GET
POST
Get Stats And DT For Resources Using POST
POST
Get Stats For Resources Using POST
GET
Get Stats Of Resources Using GET
GET
Get Top N Stats Of Resources Using GET
PUT
Mark Resources As Being Maintained Using PUT
PUT
Modify Custom Group Using PUT
PUT
Modify Custom Profile Using PUT
POST
Query Latest Properties Of Resources Using POST
POST
Query Latest Stats Of Resources Using POST
PUT
Start Monitoring Resources Using PUT
PUT
Stop Monitoring Resources Using PUT
DELETE
Unmark Resources As Being Maintained Using DELETE
PUT
Update Resource Using PUT