Skip to main content

Use the NetApp Console REST APIs

Contributors netapp-aoife

There is a general process to prepare and use the authentication and authorization information needed to issue a REST API call using the NetApp Console.

Before you begin

There are several things you should consider before performing REST API call using the Console.

NetApp Console account

An account for the Console is required to access the platform. The system prompts you to create an account when you attempt to sign in to the Console web UI.

Access token usage scenarios

Every REST API call for the Console requires an access token or a combination of tokens. There might also be specific scope requirements for the tokens.

User token only

You only need to obtain and provide a user access token when issuing an API call.

Service token only

You only need to obtain and provide a service token when issuing an API call. This token is typically required by static clients or other internal applications when accessing the platform service APIs. It can also be used by external clients.

User and service tokens

Both a user token and service token are required.

REST API requirements and your authentication environment

You should review the API reference for the platform services you will use. The reference content includes requirements and other details about the REST calls. You also need to understand your authentication and authorization environment. Based on this you can determine the following requirements:

  • Type of token or tokens needed

  • Any additional scope requirements for the tokens

  • Will federated or non-federated authentication used (user tokens only)

  • Console agent ID and client ID requirements

Perform an API call

The following steps describe how to obtain the required authentication information and perform a REST API call.

1. (Optional) Locate the Console agent ID and client ID

Several Console APIs require a Console agent ID to route the request to the appropriate environment. You can also locate the related Client ID. See Get required identifiers for more information.

2. Obtain the access tokens

Depending on the REST API call, you might need a user token, a service token, or both. These tokens can be obtained from the Auth0 authorization service. The tokens need to be included with every API call. For more information, see:

3. Create the required request headers

You need to create several HTTP request headers and include them with each API call. See the applicable API reference to understand which headers should be used. The most common headers are described below. See Your first API call for an example.

Authorization

This header typically contains the user bearer access token.

x-agent-id

This header contains the agent ID for API calls that require it.

4. Issue a REST API call

You can use curl or the programming language of your choice to issue a REST API call. There are also workflow examples available for the ONTAP management API. See ONTAP management workflow processes for more information.