Hitachi Ops Center​

 View Only

 finding WWN's configured on all ports using rest api

Dhevash Govender's profile image
Dhevash Govender posted 02-03-2022 14:40
I am new to HCM Rest Api and am trying to collect HBA WWN's configured on each host group for a G1000.

I am using curl and this document  "https://knowledge.hitachivantara.com/Documents/Management_Software/Ops_Center/API_Configuration_Manager/10.8.x/REST_API_Reference_Guide/06_Volume_allocation"

GET base-URL/v1/objects/storages/storage-device-ID/host-wwns

I am using this command,  however i do not want to do this port by port, is there a way to use wild cards to get the information for all wwn's without specifying individual portId's?

so instead of using portId=CL1-A&hostGroupNumber=0 use something like portId=CL*&hostGroupNumber=*
curl.exe --silent -k -u xxx:xxx -X GET $baseUrl/v1/objects/storages/8000000xxxxx/host-wwns?portId=CL1-A&host_GroupNumber=0"host-wwns?portId=CL1-A&hostGroupNumber=0
Michael Taormina's profile image
Michael Taormina
It looks like you can get this information using the search/query function of HCM:

GET "/v1/views/host-groups-host-wwns-wwns?$query=hostGroup.storageDeviceId eq '8000000xxxxx'"