REST API - create

vstats acq specs: create

Create a new acquisition specification record. Warning: This operation 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.

Request:

HTTP request

POST https://{server}/api/stats/acq-specs
{
    "endpoints"[
        "obj-103",
        "obj-103"
    ],
    "counters"{
        "cid_mid"{
            "mid""obj-103",
            "cid""obj-103"
        },
        "set_id""obj-103"
    },
    "resources"[
        {
            "predicate""EQUAL",
            "scheme""string",
            "type""string",
            "key""string",
            "id_value""string"
        },
        {
            "predicate""EQUAL",
            "scheme""string",
            "type""string",
            "key""string",
            "id_value""string"
        }
    ],
    "interval"1,
    "expiration"1,
    "memo_""string"
}

Body Parameters:

Name Type Description
bold = required
- create_spec Specification for the acquisition of stats data.
-.counters counter_spec Designates the counter(s) to be sampled. 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.

-.counters.cid_mid cid_mid Counter and optional meatadata identifier. 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 set_id field will be used.

-.counters.cid_mid.cid string Counter Id. CID is a string with rather strong semantic consistency across deployments and versions. If two CIDs are identical it implies the corresponding counters are the same. 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.

-.counters.cid_mid.mid string MID is a 64-bit integer with strong consistency. Given a particular CID=cid, if two MIDs are the same, then the corresponding counter-metadata objects are same. 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 field is unset vStats will use default for the counter metadata as obtained from the provider.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.

-.counters.set_id string Counter set identifier. 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 cid_mid field will be used.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.CounterSet. 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.CounterSet.

-.resources rsrc_id[] A set of resource identifiers representing a single resource to be monitored. 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.

-.endpoints string[] A set of endpoint identifiers, each representing an endpoint to which stats data is to be pushed. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. If unset, there are no endpoints to configure.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vstats.model.Endpoint. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vstats.model.Endpoint.

-.interval long Desired sampling rate in seconds. 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. If unset default of 10s will be used.

-.expiration long Expiration time for this acquisition specification in Unix UTC number of seconds (since epoch). 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 field is unset or 0, default expiration duration is 100 minutes.

-.memo_ string Consumer provided text about this acquisition specification. 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. If unset default empty string will be used.

Response:

HTTP Status Code: 201

Response Body Structure:

"obj-103"

Headers:

None

Type:

Name Type Description
bold = required
- string Identifier of the newly created acquisition specification.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 invalid_argument if acq_spec contain any errors.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user does not have sufficient privileges.