ONTAP Discussions
ONTAP Discussions
The cloud targets are not being returned from the NetApp REST API as shown below from MetroCluster!
GET https://XX.XX.XX.XX/api/cloud/targets
{ "records": [], "num_records": 0, "_links": { "self": { "href": "/api/cloud/targets" } } }
can you give me command output
1- GET "https://XX.XX.XX.XX/api/cloud/targets?svm.name=<svm-name>"
if this does not show anything,
can you get output of
1- cloud target show
2- metrocluster show
note: assuming you have appropriate API privileges
I have appropriate API privileges. API returns 0 records.
naclusterA::*> snapmirror object-store config show
Name Vserver Container Name Provider Type Ipspace
--------------- -------------------- -------------- ------------- -------------
nacAvs1_nacAvs2_test_C2C_Target
nacAvs1 test2 SGWS Default
naclusterA_nacAvs1_nacAvs1b01_C2C_Target
naclusterA nacAvs1b01 SGWS Default
naclusterA_nacAvs1_nacAvs1b03_C2C_Target
naclusterA nacAvs1b03 SGWS Default
3 entries were displayed.
naclusterA::*> metrocluster show
Configuration: stretch
Cluster Entry Name State
------------------------------ ---------------------- ---------------------
Local: naclusterA
Configuration State configured
Mode normal
AUSO Failure Domain auso-on-cluster-disaster
Remote: naclusterB
Configuration State configured
Mode normal
AUSO Failure Domain auso-on-cluster-disaster
1- what is your ONTAP version :
curl -X GET "https://XX.XX.XX.XX/api/cluster?fields=version" -u admin:password
2- can you confirm XX.XX.XX.XX is the cluster management LIF for naclusterA
3- can you pl get me the output for the following
curl -X GET "https://XX.XX.XX.XX/api/snapmirror/object-stores?svm.name=naclusterA" \
-u admin:password \
-H "accept: application/json"
1. curl -X GET "https://XX.XX.XX.XX/api/cluster?fields=version" -u admin:password
{
"version": {
"full": "NetApp Release 9.16.1: Sat Jan 18 19:31:15 UTC 2025",
"generation": 9,
"major": 16,
"minor": 1
},
"_links": {
"self": {
"href": "/api/cluster"
}
}
2. I am using cluster mgmt LIF only.
3. curl --insecure -X GET "https://XX.XX.XX.XX/api/snapmirror/object-stores" -u admin:password -H "accept: application/json"
{
"error": {
"message": "To manage SnapMirror object-stores use the cloud/targets API.",
"code": "13304119"
}
Object-store API says to use cloud/targets API. Which doesnt return any items.