Gets information of all the tags that are available in the Inventory.
Resource Information
Response formats | JSON |
Requires authentication? | Yes |
Rate limited? | All API calls are automatically rate limited to a maximum of 10 calls per second. |
Request Syntax
GET /v2/inventory/cmc/tags
GET /v2/inventory/cmc/tags/{tag_name}
URI Request Parameters
The request uses the following URI parameters:
Parameter | Required? | Description |
tag_name | Optional | The name of the tag whose information you want. If you do not specify a tag name, information about all the tags is returned. |
Request Headers
Authenticate the API by completing the following steps:
- Set your client ID value in the X-CMC-Client-Id header in every request.
- Set the client secret value in the X-CMC-Client-Secret header in every request.
To form the CMC API full URL, append the relative path of the endpoint you want to use to the Base URL.
Example: https://<portal-url>/api/public/v2/inventory/cmc/tags/{tag_name}
Response Body
This request does not have a response body.
Response Syntax and Description
To review the response schema and for information about the parameters, see the Response schema and parameter description for api/public/v2/inventory/cmc/tags topic.
Errors
The following errors are the common errors for this API:
BadRequestException
The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
HTTP Status Code: 400
UnauthorizedException
The request is denied because the caller has insufficient permissions.
HTTP Status Code: 401
NotFoundException
The requested resource is not found. Make sure that the request URI is correct.
HTTP Status Code: 404
TooManyRequestsException
The request has reached its throttling limit. Retry after the specified time.
HTTP Status Code: 429
Sample Request
Review the following examples to understand how the API request and response work.
Request for all tags
GET /api/public/v2/inventory/cmc/tags HTTP/1.1
Host: xxxxxxxxxxxx.powercmc.com
x-cmc-client-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
x-cmc-client-secret: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Sample Response
{
"Tags": [
{
"ID": "tag_PowerHAStandard_1688371882874",
"Name": "PowerHA Standard",
"Reserved": true,
"Systems": [],
"Partitions": [
{
"UUID": "XXXXXXXX-CXXX-XXXX-XXXX-XXXXXXXXXXXX",
"ID": "78",
"Name": "78-9009-22A*XXXXXXX",
"State": "running",
"AssociatedSystemUUID": "XXXXXXXX-CXXX-XXXX-XXXX-XXXXXXXXXXXX",
"OSType": "AIX",
"OSVersion": "Unknown"
}
]
},
{
"ID": "tag_Test_1718025488753",
"Name": "Test2",
"Systems": [
{
"UUID": "XXXXXXXX-CXXX-XXXX-XXXX-XXXXXXXXXXXX",
"MTMS": {
"MachineType": "9XX9",
"Model": "22A",
"SerialNumber": "XXXXXX"
},
"Name": "9009-XXX*XXXXXXXX",
"State": "operating",
"ManagingHMCs": [
{
"HmcName": "VXXXX-XXX-XXX",
"State": "Active"
}
]
}
],
"Partitions": [
{
"UUID": "XXXXXXXX-CXXX-XXXX-XXXX-XXXXXXXXXXXXC",
"ID": "78",
"Name": "78-9009-22A*XXXXXXX",
"State": "running",
"AssociatedSystemUUID": "XXXXXXXX-CXXX-XXXX-XXXX-XXXXXXXXXXXX",
"OSType": "AIX",
"OSVersion": "Unknown"
}
]
}
]
}
Comments
0 comments
Please sign in to leave a comment.