The API enables you to retrieve the details of a Chargeback attribute.
The syntax for calling this method is:
GET <Base_Url>/attribute/{attributeId}
A sample API call is as follows:
GET https://123.123.123.123/vCenter-CB/api/attribute/1
To call this API, you should be authenticated but do not need any special privileges.
If the operation is successful, the API returns an XML response with the following details.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
---|---|---|---|---|
Attributes/Attribute |
|
1 |
1 |
Represents the attributes of the entity |
Attributes/Attribute/@id |
xs:int |
1 |
1 |
ID of the attribute. |
Attributes/Attribute/Name |
xs:string |
1 |
1 |
Name of the attribute. |
Attributes/Attribute/Description |
xs:string |
1 |
1 |
Description provided for the attribute. |
Attributes/Attribute/Source |
|
0 |
1 |
Represents the source of the attribute. If the <Source> element is empty then the attribute has been defined locally in vCenter Chargeback Manager. If it is a vCenter Server attribute, then it has been synchronized from vCenter Server. |
Attributes/Attribute/Source/vCenter Server |
|
0 |
1 |
Represents the vCenter Server from which the attribute has been synchronized. |
Attributes/Attribute/Source/vCenter Server/@id |
xs:int |
1 |
1 |
ID of the vCenter Server. |
Attributes/Attribute/Source/vCenter Server/Name |
xs:value |
1 |
1 |
Name of the vCenter Server. |
A sample response is provided here.
The following table explains the error codes returned by the API.
Error Code |
Description |
VCB_ERR_INVALID_LOCAL_ATTRIBUTE_ID |
vCenter Chargeback Manager defined attribute with the specified ID does not exist. |