PowerScale: How to use the curl command to verify the OneFS API is working properly

Summary: This KB article is useful to troubleshoot Application Programming Interface (API) issues against the cluster directly using curl commands. Use it to rule out issues with custom scripts or application code. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Introduction

When you encounter an issue with the OneFS API, verify that basic operations are working properly by running a curl command before doing other troubleshooting. This article provides instructions for using the curl command to test API operations. It helps verify that the command you are running is in the correct format.

The OneFS API is composed of two functional areas:

  • System configuration API (known in OneFS 7.1.0 and earlier as Platform API)
This area enables cluster configuration, management, and monitoring functionality.
  • File system access API (known in OneFS 7.1.0 and earlier as RESTful Access to the namespace API, or RAN API)
This area enables operations on files and directories in the cluster.


Procedure

Use the curl command with "root" credentials when testing either the System Configuration API or the file system access API.

  1. Open an SSH connection on any node in the cluster and log in using the "root" account.
  2. Use the curl command as described in the System configuration API or File System Access API sections below. 
  3. If you continue to experience issues, contact Isilon Technical Support.

For additional information about curl commands and syntax, see the curl man page.

For additional information about OneFS System configuration API requests and expected response, see the API reference guide of your respective OneFS version. Links for the most common OneFS versions: OneFS 8.2.2.0 , OneFS 9.1.0, OneFS 9.5.0.0, and OneFS 9.7.0.0

System configuration API

Common options for curl with the system configuration API 

Option Description
-d  Sends specified data in a POST request
-H Specifies an extra header to use
-k Allows connection to untrusted SSL sites (for Isilon default self-signed SSL certificates)
-u User name for authentication When running the command, you are prompted to provide the password for this user
-v Specifies verbose output
-X  Specifies request method (GET, PUT, POST, and so on)

 

Common usage of curl with the System Configuration API

The following are examples of common curl commands. Follow similar syntax for the action you want to perform.

  • Retrieving information (GET commands):

    General syntax: Use the following, where <username> is the username, and <URL> is the URL of the node you are connecting to.
    # curl  -vk  -u "<username>" -H 'Content-type:application/json' -X GET '<URL>'


    For example, to get a list of Server Message Block (SMB) shares, the command looks similar to the following:
    # curl -vk -u "root" -H 'Content-type:application/json' -X GET 'https://10.11.1.1:8080/platform/1/protocols/smb/shares'

     
  • Sending information (POST or PUT commands):

    General syntax: Use the following, where <username> is the username, <json-data> is the JSON-formatted string, and <URL> is the URL of the node you are connecting to.
    # curl  -vk  -u <username> -H 'Content-type:application/json' -X POST  -d '<json-data>' <URL>



    For example, to create a new SMB share called papi-example with a path of /ifs/papi-example, the command looks similar to the following:
    # curl -vk -u root -H "Content-type: application/json" -X POST -d '{ "name" : "papi-example", "path" : "/ifs/papi-example" }' 'https://10.11.1.1:8080/platform/1/protocols/smb/shares'

File System access API

Common options for curl with the file system access API

Option Description
-d  Sends specified data in a POST request
--data-binary Specifies the location of the binary file
-H Specifies an extra header to use
-k Allows connection to untrusted SSL sites ( Isilon default self-signed SSL certificates).
-u User name for authentication, you are prompted to provide the password for this user.
-v Specifies verbose output 
-X  Specifies request method (GET, PUT, POST, and so on)

 

Common usage of curl with the file system access API

The following are examples of common curl commands. Follow a similar syntax for the action to perform.

NOTE
You can create your own namespaces through the file system access API, but you should use the default namespace for verification. The default namespace is /namespace/ifs.

  • Retrieving information (GET commands):

    General syntax:
    # curl -vk -u "<username>" -X GET 'https://<node_IP>:8080/namespace/<access_point>'



    For example, to get the content listing of /ifs:
    # curl -vk -u "root" -X GET 'https://10.11.1.1:8080/namespace/ifs'

 

  • Sending information (POST or PUT commands):

    General syntax: Use the following using the correct for the variable <content header>. For information about the <content header>, see the OneFS API reference guide
    # curl -vk -u "<username>" -H "<content header>" --data-binary @<source file path> -X PUT 'https://<node_IP>:8080/namespace/<access_point>/<destination file path>'


            For example, to copy a datafile from /tmp/testfile.jpg to /ifs/papi-example, the command looks similar to the following:

# curl -vk -u "root" -H "x-isi-ifs-target-type:object" --data-binary @/tmp/testfile.jpg -X PUT 'https://<node_IP>:8080/namespace/ifs/papi-example/testfile.jpg'



All the above commands use Basic HTTP authentication to run API queries. 

Affected Products

PowerScale OneFS

Products

PowerScale OneFS
Article Properties
Article Number: 000011287
Article Type: How To
Last Modified: 08 Oct 2025
Version:  8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.