Retrieve SVM peer relationships
Retrieves SVM peer relationships to view the existing connections between storage virtual machines. This helps you understand how different SVMs interact within your storage environment.
HTTP method and endpoint
GET /svm/peers
Introduced in
ONTAP 9.6
Usage notes
Retrieves the list of SVM peer relationships.
Related ONTAP commands
-
vserver peer show
Examples
The following examples show how to retrieve a collection of SVM peer relationships based on a query.
-
Retrieves a list of SVM peers of a specific local SVM
GET "/api/svm/peers/?svm.name=VS1"
-
Retrieves a list of SVM peers of a specific cluster peer
GET "/api/svm/peers/?peer.cluster.name=cluster2"
Learn more
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
svm.uuid |
string |
query |
False |
Filter by svm.uuid |
svm.name |
string |
query |
False |
Filter by svm.name |
state |
string |
query |
False |
Filter by state |
name |
string |
query |
False |
Filter by name |
peer.svm.uuid |
string |
query |
False |
Filter by peer.svm.uuid |
peer.svm.name |
string |
query |
False |
Filter by peer.svm.name |
peer.cluster.name |
string |
query |
False |
Filter by peer.cluster.name |
peer.cluster.uuid |
string |
query |
False |
Filter by peer.cluster.uuid |
applications |
string |
query |
False |
Filter by applications |
uuid |
string |
query |
False |
Filter by uuid |
fields |
array[string] |
query |
False |
Specify the fields to return. |
max_records |
integer |
query |
False |
Limit the number of records returned. |
return_records |
boolean |
query |
False |
The default is true for GET calls. When set to false, only the number of records is returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
|
order_by |
array[string] |
query |
False |
Order results by specified fields and optional [asc |
Response
Status: 200, Ok
| Name | Type | Description |
|---|---|---|
_links |
||
num_records |
integer |
Number of records |
records |
array[svm_peer] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"records": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"applications": [
"snapmirror",
"lun_copy"
],
"force": true,
"name": "string",
"peer": {
"cluster": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "cluster2",
"uuid": "ebe27c49-1adf-4496-8335-ab862aebebf2"
},
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
},
"state": "peered",
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"uuid": "string"
}
]
}
Error
Status: Default
ONTAP Error Response Codes
| Error codes | Description |
|---|---|
26345578 |
Internal error. Unable to retrieve local or peer SVM name. |
9896086 |
Peer SVM name conflicts with one of the following: a peer SVM in an existing SVM peer relationship, a local SVM, or an IPSpace. Use the "name" property to uniquely specify the peer SVM alias name. |
| Name | Type | Description |
|---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
| Name | Type | Description |
|---|---|---|
href |
string |
_links
| Name | Type | Description |
|---|---|---|
next |
||
self |
_links
| Name | Type | Description |
|---|---|---|
self |
cluster
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
|
uuid |
string |
svm
SVM, applies only to SVM-scoped objects.
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
The name of the SVM. This field cannot be specified in a PATCH method. |
uuid |
string |
The unique identifier of the SVM. This field cannot be specified in a PATCH method. |
peer
Details for a peer SVM object.
| Name | Type | Description |
|---|---|---|
cluster |
||
svm |
SVM, applies only to SVM-scoped objects. |
svm
Local SVM details
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
The name of the SVM. This field cannot be specified in a PATCH method. |
uuid |
string |
The unique identifier of the SVM. This field cannot be specified in a PATCH method. |
svm_peer
An SVM peer relationship object.
| Name | Type | Description |
|---|---|---|
_links |
||
applications |
array[string] |
A list of applications for an SVM peer relationship. |
name |
string |
A peer SVM alias name to avoid a name conflict on the local cluster. |
peer |
Details for a peer SVM object. |
|
state |
string |
SVM peering state. To accept a pending SVM peer request, PATCH the state to "peered". To reject a pending SVM peer request, PATCH the state to "rejected". To suspend a peered SVM peer relationship, PATCH the state to "suspended". To resume a suspended SVM peer relationship, PATCH the state to "peered". The states "initiated", "pending", and "initializing" are system-generated and cannot be used for PATCH. |
svm |
Local SVM details |
|
uuid |
string |
SVM peer relationship UUID |
error_arguments
| Name | Type | Description |
|---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
| Name | Type | Description |
|---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |