Get Stats Of Resource

Get Stats Of Resource

NOTE: Unless a time range is explicitly set, the method returns statKeys which have received data in the last 24 hours.

Request
URI
GET
https://{api_host}/suite-api/api/resources/{id}/stats
COPY
Path Parameters
string
id
Required

The Identifier of the resource object

Query Parameters
string of array
resourceId
Optional

Array of Resource ids for which the stats should be fetched

string of array
statKey
Optional

Array of stat keys for which the stats should be returned

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

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
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
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
intervalQuantifier
Optional
Constraints: minimum: 1

Number for the interval type

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
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 (does not include instanced stats)

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
wrapStatValues
Optional

Indicates whether stat values should be wrapped for application/xml response content type.
This flag is false by default and not needed for application/json response.
If set to true "statValues" will be returned instead of "values" for all content types.


Authentication
This operation uses the following authentication methods.
Responses
200

Object, containing a map of List of Stat objects keyed by each resource UUID

Returns stats-of-resources of type(s) application/json
"{\n  \"values\" : [ {\n    \"resourceId\" : \"d45975d2-e041-4fed-b16d-851e47aef446\",\n    \"stat-list\" : {\n      \"stat\" : [ {\n        \"timestamps\" : [ 1744473856412, 1744473866412 ],\n        \"statKey\" : {\n          \"key\" : \"stat|key1\"\n        },\n        \"rollUpType\" : \"NONE\",\n        \"intervalUnit\" : {\n          \"quantifier\" : 5,\n          \"intervalType\" : \"MINUTES\"\n        },\n        \"data\" : [ 1.0, 2.0 ],\n        \"dtTimestamps\" : [ 1744473856412, 1744473866412, 1744473876412 ],\n        \"minThresholdData\" : [ 0.5, 1.0 ],\n        \"maxThresholdData\" : [ 1.5, 3.0 ],\n        \"smoothValues\" : [ 1.5, 1.5 ]\n      } ]\n    }\n  } ]\n}"
array of object
values
Optional

Collection of resource-stat objects


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/suite-api/api/resources/{id}/stats