ONTAP Rest API Discussions

using rest api to get spare disks info

huulrich
1,097 Views

looking for an aquivlenet to ZAPI "aggr-spare-get-iter"

or the CLI call "aggr show-spare-disks"

 

Helpfull would also be a rest api replacement for "disk partition show"

1 ACCEPTED SOLUTION

donny_lang
624 Views

According to the ONTAPI-to-REST mapping documentation located HERE, (this is an amazingly useful resource by the way) the "aggr-spare-get-iter" API maps to the /api/storage/aggregates REST API, and you can use the "show_spares=true" parameter to filter the output. 

 

curl -X GET "https://<cluster-mgmt-fqdn>/api/storage/aggregates?show_spares=true

I am not able to find a REST API equivalent to the "disk partition show" command either, might be out of luck on that one.

View solution in original post

4 REPLIES 4

huulrich
1,095 Views

9.14.1P8

Ashun
946 Views

From here ,you might get a little inspiration 

 

PSTK
Get-NcAggrSpare

API
curl -X GET "https://<mgmt_ip>/api/storage/disks/? container_type=spare" -H "accept: application/json"

huulrich
673 Views

Hi,

curl -X GET "https://<mgmt_ip>/api/storage/disks/? container_type=spare" -H "accept: application/json"

gives you all disks of type "spare", thats fine.
However with disk of type "shared", there is no further info on spare-partitions, date-partitions or root-partitions.

donny_lang
625 Views

According to the ONTAPI-to-REST mapping documentation located HERE, (this is an amazingly useful resource by the way) the "aggr-spare-get-iter" API maps to the /api/storage/aggregates REST API, and you can use the "show_spares=true" parameter to filter the output. 

 

curl -X GET "https://<cluster-mgmt-fqdn>/api/storage/aggregates?show_spares=true

I am not able to find a REST API equivalent to the "disk partition show" command either, might be out of luck on that one.

Public