Skip to main content
Element Software
A newer release of this product is available.

Get authorization to use REST APIs

Contributors netapp-pcarriga

You must authorize before you can use APIs for management services in the REST API UI. You do this by obtaining an access token.

To obtain a token, you provide cluster admin credentials and a client ID. Each token lasts approximately ten minutes. After a token expires, you can authorize again for a new access token.

Authorization functionality is set up for you during management node installation and deployment. The token service is based on the storage cluster you defined during setup.

Before you begin
  • Your cluster version should be running NetApp Element software 11.3 or later.

  • You should have deployed a management node running version 11.3 or later.

API command
TOKEN=`curl -k -X POST https://MVIP/auth/connect/token -F client_id=mnode-client -F grant_type=password -F username=CLUSTER_ADMIN -F password=CLUSTER_PASSWORD|awk -F':' '{print $2}'|awk -F',' '{print $1}'|sed s/\"//g`
REST API UI steps
  1. Access the REST API UI for the service by entering the management node IP address followed by the service name, for example /mnode/:

    https://<ManagementNodeIP>/mnode/
  2. Select Authorize.

    Note Alternately, you can select on a lock icon next to any service API.
  3. Complete the following:

    1. Enter the cluster user name and password.

    2. Enter the client ID as mnode-client.

    3. Do not enter a value for the client secret.

    4. Select Authorize to begin a session.

  4. Close the Available authorizations dialog box.

    Note If you try to run a command after the token expires, a 401 Error: UNAUTHORIZED message appears. If you see this, authorize again.

Find more information