Skip to main content

Your first API call

Contributors netapp-ranuk

You can issue a curl command to get started using a Cloud Volumes ONTAP REST API and confirm its availability.

Note The following workflow example is very simple. The workflow samples later in this documentation use a more robust format. See Workflow processes to get started.

Step 1. Select the identifier

Determine the identifier to use for the x-agent-id request header. See Get required identifiers.

Step 2. Get the access token

Acquire an access token for the Authorization request header. See Create user token.

Curl example

The following curl command retrieves information about the BlueXP server.

curl --request GET \
--location 'https://cloudmanager.cloud.netapp.com/occm/api/occm/system/about' \
--header 'Content-Type: application/json' \
--header 'x-agent-id: <AGENT_ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'
Tip
  • Replace <AGENT_ID> with your agent ID.

  • Replace <ACCESS_TOKEN> with the bearer access token.

JSON output example

Information about the system is provided in the following JSON format.

{
  "version": "string",
  "build": "string",
  "buildTimestamp": "integer",
  "systemId": "string",
  "environment": "string",
  "siteIdentifier": {
    "company": "string",
    "host": "string",
    "site": "string"
  },
  "serverTimeZone": {
    "timeZoneName": "string",
    "formattedTimeZone": "string"
  },
  "beta": "boolean",
  "releaseNumber": "integer",
  "simplicatorUrl": "string",
  "migrationPerformed": "boolean",
  "demoMode": "boolean",
  "usingDockerInfra": "boolean",
  "privateIp": "string"
}