Gets usage information about the EP 2.0 pools.
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/ep/usage/pools
URI Request Parameters
The request uses the following URI parameters:
| Parameter | Required? | Description |
| pool_name | Optional | The pool name. The available pool names are returned if you do not specify a pool name. |
| StartTS | Yes | Zero offset format (yyyy-MM-ddTHH:mm:ssZ) |
| EndTS | Yes | Zero offset format (yyyy-MM-ddTHH:mm:ssZ) |
| Frequency | Yes | One of:
|
Important: There are limitations on what frequency you can use with StartTS and EndTS:
- Minute, for a maximum of 60 minutes
- Hourly, for a maximum of a week of time
- Daily, for a maximum of six months duration
- Weekly, for a maximum of two years
- Monthly, for a maximum of ten years
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/ep/usage/pools/{pool_name}
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 v2/ep/usage/pools.
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 Requests
Review the following examples to understand how the API request and response work.
Requests for all pools
GET /api/public/v2/ep/usage/pools?Frequency=Hourly&StartTS=2023-09-06T00:00:00Z&EndTS=2023-09-07T00: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
Request for a particular pool
GET /api/public/v2/ep/usage/pools/TestPool?Frequency=Hourly&StartTS=2023-09-06T00:00:00Z&EndTS=2023-09-07T00: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
The following response is a sample response for a particular pool.
{
"Pools": [
{
"PoolID": "xxxx",
"PoolName": "xxxxxxxx",
"CurrentRemainingCreditBalance": 9979.48,
"Usage": {
"CoreMinutes": {
"AIX": 146.94,
"IBMiP10": 36.28,
"IBMiP20": 3.44,
"IBMiP30": 4.43,
"OtherLinux": 131.05,
"RHELCoreOS": 0,
"RHEL": 42.15,
"SLES": 37.57,
"VIOS": 93.27,
"Total": 495.13
},
"CoreMeteredMinutes": {
"AIX": 0,
"IBMiP10": 0,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0,
"SLES": 0,
"LinuxVIOS": 0.07,
"AnyOS": 0,
"Total": 0.07
},
"CoreMeteredCredits": {
"AIX": 0,
"IBMiP10": 0,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0,
"SLES": 0,
"LinuxVIOS": 0,
"AnyOS": 0,
"Total": 0
},
"MemoryMinutes": {
"AIX": 28800,
"IBMiP10": 21362,
"IBMiP20": 2028,
"IBMiP30": 2530,
"OtherLinux": 31680,
"RHELCoreOS": 0,
"RHEL": 25920,
"SLES": 28800,
"VIOS": 23040,
"SystemOther": 14400,
"Total": 178560
},
"MemoryMeteredMinutes": 0,
"MemoryMeteredCredits": 0,
"LicensedPrograms": {
"PowerHA": {
"CoreMinutes": {
"PowerHAStandard": 125.87,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 33.75,
"PowerHAIBMiMedium": 4.43,
"Total": 164.08
},
"MeteredMinutes": {
"PowerHAStandard": 125.22,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 11.19,
"PowerHAIBMiMedium": 1.45,
"Total": 137.89
},
"MeteredCredits": {
"PowerHAStandard": 0.01,
"PowerHAEnterprise": 0,
"PowerHAIBMiSmall": 0,
"PowerHAIBMiMedium": 0,
"Total": 0.01
}
}
},
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00.000Z",
"CoreMinutes": {
"AIX": 146.94,
"IBMiP10": 36.28,
"IBMiP20": 3.44,
"IBMiP30": 4.43,
"RHELCoreOS": 0,
"RHEL": 42.15,
"SLES": 37.57,
"OtherLinux": 131.05,
"VIOS": 93.27,
"Total": 495.13
},
"CoreMeteredMinutes": {
"AIX": 0,
"IBMiP10": 0,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0,
"SLES": 0,
"LinuxVIOS": 0.07,
"AnyOS": 0,
"Total": 0.07
},
"CoreMeteredCredits": {
"AIX": 0,
"IBMiP10": 0,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0,
"SLES": 0,
"LinuxVIOS": 0,
"AnyOS": 0,
"Total": 0
},
"MemoryMinutes": {
"AIX": 28800,
"IBMiP10": 21362,
"IBMiP20": 2028,
"IBMiP30": 2530,
"OtherLinux": 31680,
"RHELCoreOS": 0,
"RHEL": 25920,
"SLES": 28800,
"VIOS": 23040,
"SystemOther": 14400,
"Total": 178560
},
"MemoryMeteredMinutes": 0,
"MemoryMeteredCredits": 0,
"LicensedPrograms": {
"PowerHA": {
"CoreMinutes": {
"PowerHAStandard": 125.87,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 33.75,
"PowerHAIBMiMedium": 4.43,
"Total": 164.08
},
"MeteredMinutes": {
"PowerHAStandard": 125.22,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 11.19,
"PowerHAIBMiMedium": 1.45,
"Total": 137.89
},
"MeteredCredits": {
"PowerHAStandard": 0.01,
"PowerHAEnterprise": 0,
"PowerHAIBMiSmall": 0,
"PowerHAIBMiMedium": 0,
"Total": 0.01
}
}
}
}
]
}
}
]
}
Comments
0 comments
Please sign in to leave a comment.