ONTAP Rest API Discussions
ONTAP Rest API Discussions
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"
Solved! See The Solution
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.
9.14.1P8
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"
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.
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.