ONTAP Discussions

REST snapshot autodelete trigger snap_reserve

ThatGuyJ
768 Views

I'm working on building a set of REST calls to automate some tasks, one of them being volume/share creation. This is all currently done via shell scripts. Part of the volume creation script is this line.

 

snapshot autodelete modify -vserver $SVM -enabled true -trigger snap_reserve -volume $SHARENAME

 

I've been looking through the REST documentation and googling/searching for a solution, but as far as I can tell it hasn't been implemented in REST yet. If anyone has any insights on this topic I'd appreciate a hint or two. This may be a thing that I just have to do via shell command, but I'd prefer to switch everything over to REST so that it can be implemented in our service management system (servicenow), and to make issues with the automation easy to track and troubleshoot.

1 ACCEPTED SOLUTION

ThatGuyJ
758 Views

Of course as soon as I ask for help I find the answer. For anyone else that might be searching for in the REST documentation it is in PATCH \storage\volumes\{uuid}. Below is what I ended up using as a test.

{

  "space": {
    "snapshot": {
      "autodelete_enabled": true,
      "autodelete_trigger": "snap_reserve",
      "reserve_percent": 50
    }
  }
}

View solution in original post

1 REPLY 1

ThatGuyJ
759 Views

Of course as soon as I ask for help I find the answer. For anyone else that might be searching for in the REST documentation it is in PATCH \storage\volumes\{uuid}. Below is what I ended up using as a test.

{

  "space": {
    "snapshot": {
      "autodelete_enabled": true,
      "autodelete_trigger": "snap_reserve",
      "reserve_percent": 50
    }
  }
}

Public