ONTAP Rest API Discussions

Snapmirror relationship API call returns 0 records

kircho
2,818 Views

Hi All,

 

I'm using ONTAP  9.6p6  version and trying to GET the snapmirror relationships from the target array and/or source array too but from both I get  0 records.

 

Request URL

https://xxxxx/api/snapmirror/relationships?healthy=true&return_timeout=120

Server response

Code Details
200
Response body
Download
{
  "records": [],
  "num_records": 0
}

 

Source Array

 

Request URL

https://xxxx/api/snapmirror/relationships?list_destinations_only=true&return_records=true&return_timeout=15

Response body
{
  "records": [],
  "num_records": 0
}

Am I missing any parameter?  Is anybody else running in the same issue?

 

Thanks

 

1 ACCEPTED SOLUTION

RobertBlackhart
2,657 Views

We discussed this in the slack channel (#api @ https://netapppub.slack.com), but for anyone reading this thread not involved in Slack, here was the answer:

 

Robert:

Something to check. Were these relationships created through the REST API or via some other method? If it was some other method, do they have a policy-type of async-mirror  or vault? If so, they are not supported in the REST API (and won't be returned) until you upgrade to 9.7 where they are supported.

 

If this applies to you, you can either upgrade your cluster to 9.7 or you can use the CLI passthrough until you get to a supported version. Using the CLI passthrough is documented in the API docs under "Using the private CLI passthrough with the ONTAP REST API".

Kircho:

I have policy-type set to "async-mirror". We just upgraded to 9.6p6.. I will give it a try with the CLI passthrough. Thanks helping out Robert! 

View solution in original post

3 REPLIES 3

RobertBlackhart
2,658 Views

We discussed this in the slack channel (#api @ https://netapppub.slack.com), but for anyone reading this thread not involved in Slack, here was the answer:

 

Robert:

Something to check. Were these relationships created through the REST API or via some other method? If it was some other method, do they have a policy-type of async-mirror  or vault? If so, they are not supported in the REST API (and won't be returned) until you upgrade to 9.7 where they are supported.

 

If this applies to you, you can either upgrade your cluster to 9.7 or you can use the CLI passthrough until you get to a supported version. Using the CLI passthrough is documented in the API docs under "Using the private CLI passthrough with the ONTAP REST API".

Kircho:

I have policy-type set to "async-mirror". We just upgraded to 9.6p6.. I will give it a try with the CLI passthrough. Thanks helping out Robert! 

Atlassian
2,559 Views

Hello, we are running NetApp 9.7

  "version": {
    "full": "NetApp Release 9.7P4: Sat May 23 00:43:42 UTC 2020",
    "generation": 9,
    "major": 7,
    "minor": 0
  },

However https://[cluster-management-ip]/api/snapmirror/relationships/  which is the destination cluster returns:

 

{
  "records": [
  ],
  "num_records": 0,
  "_links": {
    "self": {
      "href": "/api/snapmirror/relationships/"
    }
  }
}

Which version of ONTAP is this supported? 

RobertBlackhart
2,503 Views

The version you show should be supported for the async-mirror type which was the problem before. We may need more info. What is the result of calling

 

GET https://<mgmt_ip>/api/private/cli/snapmirror/list-destinations?fields=type,policy_type

 

That is, does the CLI report relationships existing and what is their type? 

Public