IBM Cloud: Which API to use to get list of all block volume sanctioned

159 views Asked by At

Currently, I use this IBM Cli command to get list of volumes sanctioned:

ibmcloud sl block volume-list

I wanted to get the same data using IBM Cloud API (or Python SDK).

I tried this IBM Cloud's VPC API but that only seem to list disk under a VPC

1

There are 1 answers

0
data_henrik On BEST ANSWER

The official IBM Cloud API list does not seem to have any SoftLayer / Infrastructure APIs.

Running the following command with trace enabled

IBMCLOUD_TRACE=true ibmcloud sl block volume-list

shows that this API is called:

GET https://api.softlayer.com/mobile/v3.1/SoftLayer_Account/getIscsiNetworkStorage.json

You might want to test getIscsiNetworkStorage, even if it is a legacy API.