VMware Aria Operations for Networks API Reference
Operations for Networks API Reference
VMware Aria Operations for Networks Product Documentation
How to use public APIs?
VMware Aria Operations for Networks needs token based authentication. Tokens are non-modifiable identifiers returned by the system when the user has successfully authenticated using valid credentials.
VMware Aria Operations for Networks requires API requests to be authenticated. The first step in this workflow is to obtain an authentication token. To obtain an authentication token, the login request supplies the user credentials. In this example, the user is logging in to a VMware Aria Operations for Networks instance with URL https:/operations-for-networks.example.com/.
Acquire an authentication token
Prerequisites
-
Secure a channel between the web browser and the VMware Aria Operations for Networks server. Open a browser and enter the URL of a VMware Aria Operations for Networks instance such ashttps://operations-for-networks.example.com.
The system warns that your connection is not private. Click through to confirm the security exception and establish an SSL handshake
-
Verify that you have the login credentials for a user of your VMware Aria Operations for Networks instance.
Steps
-
POST a request to the authentication URL to acquire a token.
POST https://operations-for-networks.example.com/api/ni/auth/token
-
Examine the response. A successful request returns an authorization token that you must include in subsequent API requests.
Request header:
POST https://operations-for-networks.example.com/api/ni/auth/token
Content-Type: application/json Accept: application/json
Request body in JSON format:
{
"username": "testuser@local",
"password": "testpassword",
"domain": {
"domain_type": "LOCAL"
}
}
Response:
{
"token": "6QfAhSQ7/ivmvDkHPOEvTw==",
"expiry": 1508767809240
}
The authorization token is valid for 5 hours after generation. If the token expires, you must regenerate it.
Delete an authorization token
You can also delete a token before it expires using the following http request.
Request Header
DELETE https://operations-for-networks.example.com/api/ni/auth/token
Authorization: NetworkInsight auth-token
Use an authentication token
Each API request must contain the authorization token in Authorization Header in the following format:
Authorization: NetworkInsight auth-token