Add Stats For Resources

Add Stats For Resources

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 resources were 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/stats
COPY
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 Resources and their Stats

resources-stat-contents of type(s) application/json
Required
"{\n  \"resource-stat-content\" : [ {\n    \"id\" : \"9df9b270-cb9f-4edf-a6d6-cec96f74537d\",\n    \"stat-contents\" : [ {\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  }, {\n    \"id\" : \"08c3bb30-6af8-41e4-aa54-eaa4a081bb0a\",\n    \"stat-contents\" : [ {\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  } ]\n}"
array of object
resource-stat-content
Optional

Collection of Resources and the associated Stats

Authentication
This operation uses the following authentication methods.
Responses
200

The stats are added to resources successfully

Operation doesn't return any data structure

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