Delete a SnapMirror relationship
DELETE /snapmirror/relationships/{uuid}
Deletes a SnapMirror relationship.
Important notes
-
The "destination_only", "source_only", and "source_info_only" flags are mutually exclusive. If no flag is specified, the relationship is deleted from both the source and destination and all common Snapshot copies between the source and destination are also deleted.
-
For a restore relationship, the call must be executed on the cluster containing the destination endpoint without specifying the destination_only, source_only, or source_info_only parameters.
-
Additionally, ensure that there are no ongoing transfers on a restore relationship before calling this API.
Related ONTAP commands
-
snapmirror delete
-
snapmirror release
Examples
The following examples show how to delete the relationship from both the source and destination, the destination only, and the source only.
Deleting the relationship from both the source and destination. This API must be run on the cluster containing the destination endpoint.
DELETE "/api/snapmirror/relationships/4512b2d2-fd60-11e8-8929-005056bbfe52"
Deleting the relationship on the destination only. This API must be run on the cluster containing the destination endpoint.
DELETE "/api/snapmirror/relationships/fd1e0697-02ba-11e9-acc7-005056a7697f/?destination_only=true"
Deleting the relationship on the source only. This API must be run on the cluster containing the source endpoint.
DELETE "/api/snapmirror/relationships/93e828ba-02bc-11e9-acc7-005056a7697f/?source_only=true"
Deleting the source information only. This API must be run on the cluster containing the source endpoint. This does not delete the common Snapshot copies between the source and destination.
DELETE "/api/snapmirror/relationships/caf545a2-fc60-11e8-aa13-005056a707ff/?source_info_only=true"
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
uuid |
string |
path |
True |
Relationship UUID |
destination_only |
boolean |
query |
False |
Deletes a relationship on the destination only. This parameter is applicable only when the call is executed on the cluster that contains the destination endpoint. |
source_only |
boolean |
query |
False |
Deletes a relationship on the source only. This parameter is applicable only when the call is executed on the cluster that contains the source endpoint. |
source_info_only |
boolean |
query |
False |
Deletes relationship information on the source only. This parameter is applicable only when the call is executed on the cluster that contains the source endpoint. |
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. |
Response
Status: 202, Accepted
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"uuid": "string"
}
}
Error
Status: Default
ONTAP Error Response codes
Error code | Description |
---|---|
13303825 |
Could not retrieve information for the SnapMirror policy type |
13303814 |
Could not retrieve the source or destination SVM UUID |
13303815 |
Could not retrieve information for the peer cluster |
13303822 |
SnapMirror release has failed |
13303813 |
SnapMirror release was successful but delete has failed |
13303854 |
Cleanup of restore relationship failed |
13303855 |
DELETE call on a restore relationship does not support the given flags |
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 |
---|---|---|
self |
job_link
Name | Type | Description |
---|---|---|
_links |
||
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
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. |