ONTAP Rest API Discussions

volume file async-delete API options

DanF
1,028 Views

Anyone knows if there are possibilities to trigger the "volume file async-delete" commands through REST API or from a non-CLI way ? 

1 ACCEPTED SOLUTION

AlexDawson
892 Views

Hi there,

 

file deletes issued through the API to ​/storage​/volumes​/{volume.uuid}​/files​/{path} should be async. From the API documentation - "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."

 

Hope this helps!

View solution in original post

1 REPLY 1

AlexDawson
893 Views

Hi there,

 

file deletes issued through the API to ​/storage​/volumes​/{volume.uuid}​/files​/{path} should be async. From the API documentation - "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."

 

Hope this helps!

Public