Skip to main content
AI Data Engine

Your first AIDE REST API call

Contributors dmp-netapp

You can issue a simple curl command to get started using the AIDE extensions to the ONTAP REST API.

About this task

The example REST API call returns the username, role, and privileges of the user associated with the access token provided with the call. This is a simple way to verify your access token with the necessary permissions. Bash-style variables are used for simplicity.

Before you begin

In addition to having the curl utility available on your local workstation, you'll need the following:

  • IP address or FQDN of the ONTAP cluster management LIF

  • An access token issued by your identity provider for the storage administrator role

Steps
  1. Issue the following command at the CLI of your local workstation:

    curl --request GET "https://$FQDN_IP/api/security/login/whoami" \
    --include --header "Accept: */*" \
    --header "Authorization: Bearer $TOKEN_ADMIN"
  2. Review the response; for example:

    {
      "username": "storageAdmin@examplecompany.onmicrosoft.com",
      "role": [
        "admin"
      ],
      "privileges": [
        {
          "path": "/api",
          "access": "all"
        }
      ],
      "_links": {
        "self": {
          "href": "/api/security/login/whoami"
        }
      }
    }