REST API - get

vcenter namespace management stats time series: get

Gather statistical values for a cluster, namespace, or pod.

Request:

HTTP request

GET https://{server}/api/vcenter/namespace-management/stats/time-series

?obj_type={value}
&pod-namespace={obj-103}
&pod_name={value}
&namespace={obj-103}
&cluster={obj-103}
&start={value}
&end={value}

Query Parameters:

Name Type Description
bold = required
obj_type string Type of statistics object that the request is operating on.

Type of statistics object that this request is operating on. Value is one of:
CLUSTER: The CLUSTER object type is used when specifying a vSphere cluster.
NAMESPACE: The NAMESPACE object type is used to specify a namespace.
POD: The POD object type is used to specify an individual pod within a namespace.

namespace string The namespace that the pod is running in.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

pod_name string The name of the pod itself.

namespace string Namespace name for queries for a namespace.

Optional. It is only relevant when obj_type has value NAMESPACE. This field is optional and it is only relevant when the value of obj_type is NAMESPACE.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

cluster string Cluster identifier for queries for a cluster.

Optional. It is only relevant when obj_type has value CLUSTER. This field is optional and it is only relevant when the value of obj_type is CLUSTER.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.

start long UNIX timestamp value indicating when the requested series of statistical samples should begin. https://en.wikipedia.org/wiki/Unix_time

end long UNIX timestamp value indicating when the requested series of statistical samples should end. https://en.wikipedia.org/wiki/Unix_time

Response:

HTTP Status Code: 200

Response Body Structure:

[
    {
        "values"[
            1,
            1
        ],
        "time_stamps"[
            1,
            1
        ],
        "counter""string"
    },
    {
        "values"[
            1,
            1
        ],
        "time_stamps"[
            1,
            1
        ],
        "counter""string"
    }
]

Headers:

None

Type:

Name Type Description
bold = required
- time_series[] A list of TimeSeries values for each counter specified in the request.
-[].counter string Counter identifier.

-[].time_stamps long[] Sequence of UNIX timestamp values at which statistical values were sampled. https://en.wikipedia.org/wiki/Unix_time

-[].values long[] Sequence of sampled values corresponding to the timestamps in tss.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 invalid_argument if the start time in vcenter.namespace_management.stats.time_series.spec.start is invalid, or the end time in vcenter.namespace_management.stats.time_series.spec.end is invalid.
404 not_found if the specified cluster in vcenter.namespace_management.stats.time_series.spec.cluster or the namespace in vcenter.namespace_management.stats.time_series.spec.namespace or vcenter.namespace_management.stats.time_series.spec.pod does not exist.
400 unsupported if the specified cluster in vcenter.namespace_management.stats.time_series.spec.cluster is not enabled for Namespaces.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user does not have System.Read privilege.