Agreed, I am need to get the UUID to run those requests, to get the UUID I have to pull a lot of data back which is what I am trying to get away from.
Original Message:
Sent: Thu August 24, 2023 11:51 AM
From: MANJUNATH SHANBHAG
Subject: HMC Rest API's
Hi Chris,
I am not sure what you have used "Accept" header for the https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/quick/All URI call. Response code 406 tell you have not used "application/json". The response for this URI comes in Json format. Please try with the "Accept" header as "application/json"
Also https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/quick/All is applicable to list all the Managed System's quick attribute information. While if you want to get a specific system's info, you can use the URI as https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/<UUID>/quick
Couple of more quick APIs that might help you
https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/{UUID}/LogicalPartition/quick/All ----> To get all Logical Partitions quick attributes of specific system
https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/{UUID}/LogicalPartition/{UUID} ----> To get Specific Logical Partition's quick attributes of a system
https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/{UUID}/VirtualIOServer/quick/All ----> To get all VIOSs quick attributes of specific system
https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/{UUID}/VirtualIOServer/{UUID} ----> To get Specific VIOS's quick attributes of a system
-Manju
------------------------------
MANJUNATH SHANBHAG
Original Message:
Sent: Thu August 24, 2023 10:37 AM
From: Christopher Hird
Subject: HMC Rest API's
Hi Sridevi,
Thanks for the information, but those url's do not work on my HMC?
https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/quick/All
Returns :
<!doctype html public "-//IETF//DTD HTML 2.0//EN"> <html><head><title>Console Internal Error</title> <link href="/skin/HMCskin.css" rel="stylesheet" type="text/css"/></head> <body><h1>Console Internal Error</h1> <br><hr size="1" noshade><h2>Details:</h2><p><br> HTTP status code: 406<p><br>http.406<hr size="1" noshade></body></html>
If I add the UUID for the managed system in ie :
https://hmc:12443/rest/api/uom/ManagedSystem/98d8de0f-6108-37dc-8ca7-b6b873c65631/quick/all
I get the following:
<Message kb="ROO" kxe="false">REST0003 Type ManagedSystem does not support Quick Property all.</Message>
I have not tried against the partition (the docs do not show the ALL quick property for the partition either), but everything I read about the quick requests requires that the UUID for the entity be entered as part of the request? Maybe I am missing something?
I need to reduce the content returned as this check may be run many times an hour, when I use the /quick entries with the UUID correctly I do see minimal data being returned, but there are very few defines for the / quick entries in the documentation and the SRC code (Something I want to pull back efficiently) is not one for any entity.
Chris...
------------------------------
Christopher Hird
Original Message:
Sent: Thu August 24, 2023 02:25 AM
From: Sridevi Joshi
Subject: HMC Rest API's
Hi Chris,
Here is the documentation that would give some insight on all available HMC Rest API's.
https://www.ibm.com/docs/en/power10/7063-CR2?topic=hmc-rest-apis
To retrieve the minimal information on ManagedSystem/LogicalPartition, you can use the below API, which does not need any UUID input. The response will be in the Json format.
For ManagedSystem: https://<hmc_IP/hostname>/rest/api/uom/ManagedSystem/quick/All
For LogicalPartition: https://<hmc_IP/hostname>/rest/api/uom/LogicalPartition/quick/All
(This API will retrieve all the partitions across systems connected to HMC)
Please let me know if you need any further information on any specific API.
Thanks
Sridevi Joshi
------------------------------
Sridevi Joshi
Original Message:
Sent: Wed August 23, 2023 11:13 AM
From: Christopher Hird
Subject: HMC Rest API's
Hi,
I am writing a number of Nagios checks for the HMC using the REST API's supplied by IBM, I am finding the documentation a little sparse and while I have opened a case asking IBM for help it is not really helping much.
Does anyone have in depth knowledge of the REST API's available? When running the API's specifically for the Managed Systems and Partitions the data returned can be pretty extensive (about 12K for each request) so doing this on a regular time period will be pretty over bearing on the network where there are a lot of managed systems and partitions being handled by the HMC. I do notice that the returns for the /quick checks are pretty minimal, however the quick checks appear to need the UUID for the Managed system and Partition, this requires the non quick checks and then a search through the xml for the UUID. I also noticed that the managed system returns the links to the partitions as links (using the UUID) but the links do not show the partition names?
I can use a single check to get the UUID's at configuration time, but no indication from IBM when those may change? Also they are not exposed via the HMC GUI.
IBM did provide me with one REST url that was not shown in the documentation for service events, so I am sure there are more that are not shown in the documentation.
Just interested in knowing if anyone else has gone down this path and found out more information that provided in the docs?
Chris...
------------------------------
Christopher Hird
------------------------------