Get usage information of systems and partitions from EP 2.0.
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/tags
URI Request Parameters
The request uses the following URI parameters:
Parameter | Required? | Description |
tag_name | Optional | The tag name. The available tag names are returned if you do not specify a tag 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://<portal-url>/api/public/v2/ep/usage/tags/{tag_name}
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/tags.
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.
Request for all tags
GET /api/public/v2/ep/usage/tags?Frequency=Daily&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 the Test tag
GET /api/public/v2/ep/usage/tags/Test?Frequency=Daily&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
This response is a sample response for the Test tag.
{
"Tags": [
{
"ID": "xxxxxxxx",
"Name": "Test",
"SystemsUsage": {
"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": 659.21
},
"MemoryMinutes": {
"AIX": 28800,
"IBMiP10": 21362,
"IBMiP20": 2028,
"IBMiP30": 2530,
"RHELCoreOS": 0,
"RHEL": 25920,
"SLES": 28800,
"OtherLinux": 31680,
"VIOS": 23040,
"SystemOther": 14400,
"Total": 178560
},
"LicensedPrograms": {
"PowerHA": {
"CoreMinutes": {
"PowerHAStandard": 125.87,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 33.75,
"PowerHAIBMiMedium": 4.43,
"Total": 164.08
}
}
},
"Systems": [
{
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"MTMS": {
"MachineType": "9009",
"Model": "22A",
"SerialNumber": "xxxxxxx"
},
"Name": "xxxxxxxx",
"PoolID": "xxxx",
"PoolName": "xxxxxxxx",
"Tier": "P10",
"BaseCores": {
"BaseAnyOSCores": 1,
"BaseRHELCoreOSCores": 1,
"BaseSLESCores": 1,
"BaseAIXCores": 6,
"BaseIBMiCores": 3,
"BaseLinuxVIOSCores": 0
},
"BaseLicensedProgramsCores": {
"BasePowerHAEnterprise": 6,
"BasePowerHAIBMiMedium": 0,
"BasePowerHAIBMiSmall": 1,
"BasePowerHAStandard": 0
},
"BaseMemory": 256,
"Usage": {
"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": 659.21
},
"AverageCoreUsage": {
"AIX": 0.1,
"IBMiP10": 0.03,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0.03,
"SLES": 0.03,
"OtherLinux": 0.09,
"VIOS": 0.06,
"Total": 0.46
},
"MemoryMinutes": {
"AIX": 28800,
"IBMiP10": 21362,
"IBMiP20": 2028,
"IBMiP30": 2530,
"RHELCoreOS": 0,
"RHEL": 25920,
"SLES": 28800,
"OtherLinux": 31680,
"VIOS": 23040,
"SystemOther": 14400,
"Total": 178560
},
"AverageMemoryUsage": {
"AIX": 20,
"IBMiP10": 14.83,
"IBMiP20": 1.41,
"IBMiP30": 1.76,
"RHELCoreOS": 0,
"RHEL": 18,
"SLES": 20,
"OtherLinux": 22,
"VIOS": 16,
"SystemOther": 10,
"Total": 124
},
"LicensedPrograms": {
"PowerHA": {
"CoreMinutes": {
"PowerHAStandard": 125.87,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 33.75,
"PowerHAIBMiMedium": 4.43,
"Total": 164.08
},
"AverageCoreUsage": {
"PowerHAStandard": 0.09,
"PowerHAEnterprise": 0,
"PowerHAIBMiSmall": 0.02,
"PowerHAIBMiMedium": 0,
"Total": 0.11
}
}
},
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00Z",
"AverageCoreUsage": {
"AIX": 0.1,
"IBMiP10": 0.03,
"IBMiP20": 0,
"IBMiP30": 0,
"RHELCoreOS": 0,
"RHEL": 0.03,
"SLES": 0.03,
"OtherLinux": 0.09,
"VIOS": 0.06,
"Total": 0.46
},
"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": 659.21
},
"AverageMemoryUsage": {
"AIX": 20,
"IBMiP10": 14.83,
"IBMiP20": 1.41,
"IBMiP30": 1.76,
"RHELCoreOS": 0,
"RHEL": 18,
"SLES": 20,
"OtherLinux": 22,
"VIOS": 16,
"SystemOther": 10,
"Total": 124
},
"MemoryMinutes": {
"AIX": 28800,
"IBMiP10": 21362,
"IBMiP20": 2028,
"IBMiP30": 2530,
"RHELCoreOS": 0,
"RHEL": 25920,
"SLES": 28800,
"OtherLinux": 31680,
"VIOS": 23040,
"SystemOther": 14400,
"Total": 178560
},
"LicensedPrograms": {
"PowerHA": {
"CoreMinutes": {
"PowerHAStandard": 125.87,
"PowerHAEnterprise": 0.03,
"PowerHAIBMiSmall": 33.75,
"PowerHAIBMiMedium": 4.43,
"Total": 164.08
},
"AverageCoreUsage": {
"PowerHAStandard": 0.09,
"PowerHAEnterprise": 0,
"PowerHAIBMiSmall": 0.02,
"PowerHAIBMiMedium": 0,
"Total": 0.11
}
}
}
}
]
}
}
]
},
"PartitionsUsage": {
"CoreMinutes": {
"RHEL": 4.84,
"SLES": 3.62,
"IBM i - P10": 4.91,
"IBM i - P30": 4.94,
"Total": 18.31
},
"MemoryMinutes": {
"RHEL": 2880,
"SLES": 2880,
"IBM i - P10": 2880,
"IBM i - P30": 2880,
"Total": 11520
},
"Partitions": [
{
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ID": "48",
"Name": "xxxxxxxx",
"OSType": "RHEL",
"VirtualSerialNumberDetails": {
"VirtualSerialNumber": "none"
},
"AssociatedSystemUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Usage": {
"CoreMinutes": 4,
"AverageCoreUsage": 0,
"MemoryMinutes": 2880,
"AverageMemoryUsage": 2,
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00Z",
"AverageCoreUsage": 0,
"CoreMinutes": 4,
"AverageMemoryUsage": 2,
"MemoryMinutes": 2880
}
]
}
},
{
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ID": "40",
"Name": "xxxxxxxx",
"OSType": "SLES",
"VirtualSerialNumberDetails": {
"VirtualSerialNumber": "none"
},
"AssociatedSystemUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Usage": {
"CoreMinutes": 3,
"AverageCoreUsage": 0,
"MemoryMinutes": 2880,
"AverageMemoryUsage": 2,
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00Z",
"AverageCoreUsage": 0,
"CoreMinutes": 3,
"AverageMemoryUsage": 2,
"MemoryMinutes": 2880
}
]
}
},
{
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ID": "7",
"Name": "xxxxxxxx",
"OSType": "IBM i - P10",
"VirtualSerialNumberDetails": {
"VirtualSerialNumber": "none"
},
"AssociatedSystemUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Usage": {
"CoreMinutes": 4,
"AverageCoreUsage": 0,
"MemoryMinutes": 2880,
"AverageMemoryUsage": 2,
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00Z",
"AverageCoreUsage": 0,
"CoreMinutes": 4,
"AverageMemoryUsage": 2,
"MemoryMinutes": 2880
}
]
}
},
{
"UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxF",
"ID": "4",
"Name": "xxxxxxxx",
"OSType": "IBM i - P30",
"VirtualSerialNumberDetails": {
"BaseCores": {
"BaseIBMi": 2
},
"BaseLicensedProgramsCores": {
"BasePowerHAIBMiMedium": 0
},
"VirtualSerialNumber": "xxxxxxxx",
"MeteringTier": "P30",
"Tier": "P30"
},
"AssociatedSystemUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Usage": {
"CoreMinutes": 4,
"AverageCoreUsage": 0,
"MemoryMinutes": 2880,
"AverageMemoryUsage": 2,
"Frequency": "Daily",
"Usage": [
{
"StartTime": "2023-09-06T00:00:00Z",
"AverageCoreUsage": 0,
"CoreMinutes": 4,
"AverageMemoryUsage": 2,
"MemoryMinutes": 2880
}
]
}
}
]
}
}
]
}
Comments
0 comments
Please sign in to leave a comment.