REST API - get

vstats counter sets: get

Returns information about a specific counter set. 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

GET https://{server}/api/stats/counter-sets/{counterSet}

Response:

HTTP Status Code: 200

Response Body Structure:

{
    "counters"[
        {
            "mid""obj-103",
            "cid""obj-103"
        },
        {
            "mid""obj-103",
            "cid""obj-103"
        }
    ],
    "user_info"{
        "description"{
            "args"[
                "string",
                "string"
            ],
            "default_message""string",
            "localized""string",
            "id""string",
            "params"{
                "<string>"{
                    "dt""2015-01-01T22:13:05.651Z",
                    "s""string",
                    "d"1.5,
                    "precision"1,
                    "format""SHORT_DATE",
                    "i"1,
                    "l"{
                        "id""string",
                        "params"{
                            "<string>"{
                                "dt""2015-01-01T22:13:05.651Z",
                                "s""string",
                                "d"1.5,
                                "precision"1,
                                "format""SHORT_DATE",
                                "i"1,
                                "l"{
                                    "id""string",
                                    "params"{}
                                }
                            }
                        }
                    }
                }
            }
        },
        "label"{
            "args"[
                "string",
                "string"
            ],
            "default_message""string",
            "localized""string",
            "id""string",
            "params"{
                "<string>"{
                    "dt""2015-01-01T22:13:05.651Z",
                    "s""string",
                    "d"1.5,
                    "precision"1,
                    "format""SHORT_DATE",
                    "i"1,
                    "l"{
                        "id""string",
                        "params"{
                            "<string>"{
                                "dt""2015-01-01T22:13:05.651Z",
                                "s""string",
                                "d"1.5,
                                "precision"1,
                                "format""SHORT_DATE",
                                "i"1,
                                "l"{
                                    "id""string",
                                    "params"{}
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "id""string"
}

Headers:

None

Type:

Name Type Description
bold = required
- info Information about the desired CounterSet.
-.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.

-.counters cid_mid[] List of Counter CidMids. 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 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[].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.

-.user_info user_info Human legible localizable conter set description. 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. In future versions it may be possible to have custom counter sets that lack localizable descriptions.

-.user_info.label localizable_message Short label. 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.

-.user_info.label.id string Unique identifier of the localizable string or message template.

This identifier is typically used to retrieve a locale-specific string or message template from a message catalog.

-.user_info.label.default_message string The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog.

-.user_info.label.args string[] Positional arguments to be substituted into the message template. This list will be empty if the message uses named arguments or has no arguments.

-.user_info.label.params object Named arguments to be substituted into the message template. This attribute was added in vSphere API 7.0.0.0.

Optional. Unset means that the message template requires no arguments or positional arguments are used.

-.user_info.label.localized string Localized string value as per request requirements. This attribute was added in vSphere API 7.0.0.0.

Optional. when the client has not requested specific locale the implementation may not populate this field to conserve resources.

-.user_info.description localizable_message Detailed description of the object. 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.

-.user_info.description.id string Unique identifier of the localizable string or message template.

This identifier is typically used to retrieve a locale-specific string or message template from a message catalog.

-.user_info.description.default_message string The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog.

-.user_info.description.args string[] Positional arguments to be substituted into the message template. This list will be empty if the message uses named arguments or has no arguments.

-.user_info.description.params object Named arguments to be substituted into the message template. This attribute was added in vSphere API 7.0.0.0.

Optional. Unset means that the message template requires no arguments or positional arguments are used.

-.user_info.description.localized string Localized string value as per request requirements. This attribute was added in vSphere API 7.0.0.0.

Optional. when the client has not requested specific locale the implementation may not populate this field to conserve resources.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 invalid_argument if counter_set is invalid.
404 not_found if the requested counter set could not be located.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user does not have sufficient privileges.