Returns CMC performance usage data for the partitions of the managed systems.
Important: The versions v1 and v2 have the same response syntax. The information explained in this document uses the latest version v2. To use version v1 of this API, replace v2 by v1.
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
- For all partitions of a particular managed system:
GET v2/cm/usage/ManagedSystem/{ms-uuid}/Partition - For a particular partition of a particular managed system:
GET v2/cm/usage/ManagedSystem/{ms-uuid}/Partition/{lpar-uuid}
URI Request Parameters
The request uses the following URI parameters:
Important: Consider the following conditions, while specifying the frequency for the StartTS and EndTS parameters:
- For Minute frequency a maximum of 60 minutes data can be queried
- For 5Minute frequency a maximum of 2 hours data can be queried
- For 2Hour frequency a maximum of 1 day data can be queried
- For Daily frequency a maximum of 30 days data can be queried
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://<base-url>/api/public/v2/cm/usage/ManagedSystem/{ms-uuid}/Partition/{lpar-uuid}
Request body
This request does not have a request body.
Response Syntax and Description
To review the response schema and for information about the parameters, see Response schema and parameter description for ManagedSystems Partition.
Errors
The following errors are the common errors for this API:
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
UnauthorizedException
The request is denied because the caller has insufficient permissions.
HTTP Status Code: 401
Sample Request
Sample request for all partitions of a managed system
GET /api/public/v2/cm/usage/ManagedSystem/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Partition?Frequency=2Hour&StartTS=2023-09-07T07:00:00Z&EndTS=2023-09-07T11:00:00Z 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 request for a particular partition of the managed system
GET /api/public/v2/cm/usage/ManagedSystem/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Partition/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?Frequency=2Hour&StartTS=2023-09-07T07:00:00Z&EndTS=2023-09-07T11:00:00Z 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
{
"Partitions": [
{
"Name": "xxxxxxxx",
"ID": "31",
"State": "running",
"OSType": "AIX",
"OSVersion": "xxxxxxxx",
"PartitionType": "AIX",
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Tags": [
{
"Name": "Test"
}
],
"Usage": {
"CoreUsage": {
"Average": 0.01,
"Min": 0.01,
"Max": 0.01
},
"MemoryUsage": {
"Average": 2048,
"Min": 2048,
"Max": 2048
},
"NetworkUsage": {
"SentBytes": {
"Average": 11,
"Min": 11,
"Max": 11
},
"ReceivedBytes": {
"Average": 1070,
"Min": 1070,
"Max": 1070
},
"SentPackets": {
"Average": 0,
"Min": 0,
"Max": 0
},
"ReceivedPackets": {
"Average": 18,
"Min": 18,
"Max": 18
}
},
"StorageUsage": {
"ReadBytes": {
"Average": 0,
"Min": 0,
"Max": 0
},
"WriteBytes": {
"Average": 665,
"Min": 665,
"Max": 665
},
"NumOfReads": {
"Average": 0,
"Min": 0,
"Max": 0
},
"NumOfWrites": {
"Average": 1,
"Min": 1,
"Max": 1
},
"NPIVUsage": {
"ReadBytes": {
"Average": 0,
"Min": 0,
"Max": 0
},
"WriteBytes": {
"Average": 0,
"Min": 0,
"Max": 0
},
"NumOfReads": {
"Average": 0,
"Min": 0,
"Max": 0
},
"NumOfWrites": {
"Average": 0,
"Min": 0,
"Max": 0
}
},
"VirtualSCSIUsage": {
"ReadBytes": {
"Average": 0,
"Min": 0,
"Max": 0
},
"WriteBytes": {
"Average": 665,
"Min": 665,
"Max": 665
},
"NumOfReads": {
"Average": 0,
"Min": 0,
"Max": 0
},
"NumOfWrites": {
"Average": 1,
"Min": 1,
"Max": 1
}
}
},
"Frequency": "2Hour",
"Usage": [
{
"StartTime": "2023-09-07T07:55:00Z",
"CoreUsage": 0.01,
"MemoryUsage": 2048,
"NetworkUsage": {
"SentBytes": 11,
"ReceivedBytes": 1070,
"SentPackets": 0,
"ReceivedPackets": 18
},
"StorageUsage": {
"ReadBytes": 0,
"WriteBytes": 665,
"NumOfReads": 0,
"NumOfWrites": 1,
"NPIVUsage": {
"ReadBytes": 0,
"WriteBytes": 0,
"NumOfReads": 0,
"NumOfWrites": 0
},
"VirtualSCSIUsage": {
"ReadBytes": 0,
"WriteBytes": 665,
"NumOfReads": 0,
"NumOfWrites": 1
}
}
}
]
}
}
]
}
Comments
0 comments
Please sign in to leave a comment.