vstats data: query data points
Returns vstats.data.data_points_result matching the filter parameters.
/vstats/data/dp?types=VM&types=VCPU
/vstats/data/dp?rsrcs=type.HOST=host-16&rsrcs=type.VM=vm-31
Request:
HTTP request
GET https://{server}/api/stats/data/dp
?start={42}
&end={42}
&cid={obj-103}
&metric={obj-103}
&types={value-1}
&types={value-2}
&rsrcs={value-1}
&rsrcs={value-2}
&order={value}
&page={value}
?start={42}
&end={42}
&cid={obj-103}
&metric={obj-103}
&types={value-1}
&types={value-2}
&rsrcs={value-1}
&rsrcs={value-2}
&order={value}
&page={value}
Query Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
start | long | Start of a time window (included), timestamp in seconds UTC. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the result will not be limited by start time. |
end | long | End of a time window (excluded), timestamp in seconds UTC. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the result will not be limited by end time. |
cid | string | Counter ID. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the result will not be filtered by counter.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vstats.model.Counter . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vstats.model.Counter . |
metric | string | Metric name. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the result will not be filtered by metric name.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vstats.model.Metric . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vstats.model.Metric . |
types | string[] | List of Resource types. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the result will not be filtered by resource types.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vstats.model.RsrcType . When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vstats.model.RsrcType . |
resources | string[] | Resources to include in the query. Each resource is specified through a composite string that follows the following format. resource type specifies the type of resource for example scheme is an optional element to disambiguate the resource as needed for example to differentiate managed object id from resource id is the unique resource identifier value for example: Example values include: |
order | string | Directs the server to order the returned data. Passing a value of DEFAULT will apply default ordering of the results that makes them easier for consumption. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When this parameter is unset the server will not order the result, save computational time and therefore the API will operate faster. |
page | string | Used to retrieve paged data for larger result sets. The value of this token is generated by server and returned as next field in the result of query_data_points operations. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. When unset the first page of results will be returned. |
Response:
HTTP Status Code: 200
Response Body Structure:
{
"next" : "string",
"data_points" : [
{
"val" : 1.5,
"mid" : "obj-103",
"rid" : "string",
"cid" : "obj-103",
"ts" : 1
},
{
"val" : 1.5,
"mid" : "obj-103",
"rid" : "string",
"cid" : "obj-103",
"ts" : 1
}
]
}
"next" : "string",
"data_points" : [
{
"val" : 1.5,
"mid" : "obj-103",
"rid" : "string",
"cid" : "obj-103",
"ts" : 1
},
{
"val" : 1.5,
"mid" : "obj-103",
"rid" : "string",
"cid" : "obj-103",
"ts" : 1
}
]
}
Headers:
NoneType:
Name | Type | Description |
---|---|---|
bold = required | ||
- | data_points_result | Data points matching the filter. |
-.data_points | data_point[] | List of DataPoints received. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. |
-.data_points[].cid | string | Counter Id. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vstats.model.Counter . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vstats.model.Counter . |
-.data_points[].mid | string | CounterMetadata Id. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vstats.model.CounterMetadata . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vstats.model.CounterMetadata . |
-.data_points[].rid | string | Resource Id. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. |
-.data_points[].ts | long | Timestamp for the data point. format: 64-bit integer. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. |
-.data_points[].val | double | Stat value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. |
-.next | string | The next field is a token used to retrieve paged data for larger result sets. This is opaque token generated by the server. It is to be sent in the vstats.data.filter_spec.page field to issue a subsequent call to the query operation for retrieving results that did not fit the current page. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. Optional. set when there are more results to retrieve. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
400 | invalid_argument | if any of the specified parameters are invalid. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user does not have sufficient privileges. |