Using the OneFS API with Snapshots

Using the OneFS API with Snapshots

NOTE: This topic is part of the Isilon SDK Info Hub

The following sample code shows how to use the curl tool to access the OneFS API to manage snapshots.

You can modify this sample code for your own use by replacing the example IP address with the IP address or hostname of your cluster, or with 'localhost' if you are running these commands locally on a node in your cluster. In addition, you must replace user1 and password1 with appropriate account information for your cluster.


In the following examples, requests are sent to the OneFS API to list, create, update, and delete snapshots on the system.

The --insecure (-k) argument allows connection through SSL without certificates.
The --verbose (-v) argument displays the full headers of the HTTP request and response.
The --basic argument specifies basic authentication.The following sample code shows how to access the OneFS

The create example below assumes that an /ifs/data path exists on your system as the snapshot root and the user account sending the request must have the ISI_PRIV_SNAPSHOT privilege.

List snapshots (GET)

curl --insecure --basic --user user1:password1 --verbose

List snapshots with reader-friendly indenting by piping the response body through the python json tool module (GET)

curl --insecure --basic --user user1:password1 | python -m json.tool

Create a snapshot (POST)

curl -k -u user1:password1 -v --data '{"name": "example_snapshot", "path": "/ifs/data"}'

Modify a snapshot (PUT)

curl -X PUT -k -u user1:password1 -v --data '{"name": "example_snapshot_new_name"}'

Delete a snapshot (DELETE)

curl -X DELETE -k -u user1:password1 -v

Article ID: SLN319391

Last Date Modified: 01/31/2020 02:15 PM

Rate this article

Easy to understand
Was this article helpful?
0/3000 characters
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please select whether the article was helpful or not.
Comments cannot contain these special characters: <>()\
characters left.