REST API Reference Version 3.1.0.0Search

cURL as the REST API Client

To test communication to the array using cURL as the Linux-based REST API client:

  1. Use any web browser to export the array CA certificate to the API client machine.
  2. Obtain array API version.

    $ curl -i –cacert ‘<array_cert_filename> -X 'GET' https://10.18.240.146:5392/versions

    Expected output (formatted):

  3. Authenticate with the array for a session token.

    curl -i --cacert './ca.crt' -X 'POST' -d '{"data":{"password":<my_password>,"username":<my_user>}}' https://<array_name>:5392/<version_number>/tokens

    Expected output (formatted):

  4. Test the API by using "GET" to retrieve the array name.

    curl -i --cacert './ca.crt' -X 'GET' -H "X-Auth-Token:<token_string>" https://<array_name>:5392/<version_number>/arrays

    Expected output (formatted):