Add Stats

Add Stats

In this case, the adapter instance used for pushing data will default to vRealizeOpsMgrAPI. It is recommended (though not required) to use this API when the resource was created using the API POST /api/resources/{id}/adapters/{adapterInstanceId}. Otherwise an additional adapter instance might be created.

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

The Identifier of the resource object

Query Parameters
boolean
disableAnalyticsProcessing
Optional
Constraints: default: false

Whether the current data set goes through Analytics processing (Threshold checking, Alert generation) or not. Defaults to false. But when set to true will result in no evaluation of Alerts but the data gets stored.


Request Body

The stats for the Resource

stat-contents of type(s) application/json
Required

Show optional properties

{
    "stat-content": [
        {
            "statKey": "string",
            "timestamps": [
                {}
            ]
        }
    ]
}
"{\n  \"stat-content\" : [ {\n    \"statKey\" : \"cpu|demandGhz\",\n    \"timestamps\" : [ 1119844280663, 1119844280693, 1119844280713 ],\n    \"data\" : [ 0.2, 0.3, 0.4 ]\n  }, {\n    \"statKey\" : \"mem|overload\",\n    \"timestamps\" : [ 1119844280663, 1119844280693, 1119844280713, 1119844280718 ],\n    \"data\" : [ 93.0, 95.0, 97.0, 99.0 ]\n  } ]\n}"
array of object
stat-content
Required

Collection of stat contents

Authentication
This operation uses the following authentication methods.
Responses
200

The stats are added successfully

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"stat-content":["object"]}' https://{api_host}/suite-api/api/resources/{id}/stats