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