You can use the CMC API to get information about the CMC inventory, CMC usage, and the inventory and resource usage of Enterprise Pools 2.0.
Sample CMC API example
The Base URL, client ID, and client secret values are displayed on the CMC Settings > API page. To use the CMC API, complete 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.
Curl https://<portal-url>/api/public/v2/ep/inventory/tags -H "X-CMC-Client-Id:eee3e20a-2566-4cf5-977b-072c5fba9496" -H "X-CMC-Client-Secret:2afe46e3-2066-4430-8935-04232a67dd09"
Available API versions
The CMC APIs are available in two versions: v1 and v2. Depending on the response that you want, specify the version (v1 or v2) in the curl statement.
V2 is the latest version that is introduced in CMC v1.20.0. It is recommended that you use v2.
V2
The following information is added in this version along with all the information of v1:
- VSN details for the IBM i partitions.
- Information about the tiers in the system.
- Information about the IBM i usage. This information is available as the individual IBM i tiers – IBM i P10, IBM i P20, and IBM i P30.
Available endpoints
The following APIs are currently available:
Endpoints for tags
Use these APIs to manage the tags.
- Get the information of all the tags
- Get information of a single tag
- Create a tag
- Rename a tag
- Add resources to tags
- Remove resources from tags
- Delete a tag
Endpoints for Enterprise Pools 2.0
These APIs return different information for v1 and v2.
Endpoints for Inventory
The APIs return the same information for v1 and v2.
- v2/inventory/cmc/ManagementConsole
- v2/inventory/cmc/ManagedSystem
- v2/inventory/cmc/ManagedSystem/{uuid}/Partition
Endpoints to retrieve performance usage data
These APIs return the same information for v1 and v2.
V1 (changelog)
Enhancements are done in the v1 API to now return the following additional information:
- The base of the Licensed Programs (PowerHA).
- The usage of the Licensed Programs (PowerHA).
- Information about the IBM i usage. This information is available as the summation of all the IBM i tiers.
Available endpoints
The following endpoints are currently available for v1:
Endpoints for Enterprise Pools 2.0
These APIs return different information for v1 and v2.
Endpoints for Inventory
The following APIs return the same information for v1 and v2.
- v1/inventory/cmc/ManagementConsole
- v1/inventory/cmc/ManagedSystem
- v1/inventory/cmc/ManagedSystem/{uuid}/Partition
Endpoints to retrieve CMC performance usage data
The following APIs return the same information for v1 and v2.
Comments
0 comments
Please sign in to leave a comment.