vRealize Operations Manager requires API requests to be authenticated. The first step in this workflow is to obtain an authentication token.
Using authSource
, you can import and authenticate users and user group information that reside on another machine. For example, you can authenticate users from LDAP, Active Directory, VMware Identity Manager, Single Sign-On and so on. When you import user account information that resides on another machine, you must define the criteria used to import the user accounts from the source machine.
After creating an auth source you can use it for acquiring a token by specifying the name. The default auth source type is LOCAL.
Prerequisites
- Secure a channel between the web browser and the vRealize Operations Manager server. Open a browser and enter the URL of a vRealize Operations Manager instance such as:
https://vrealize.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 can access the APIs. Enter the URL of your vRealize Operations Manager instance with suite-api/docs/rest/index.html added to the end, such as:
https://vrealize.example.com/suite-api/docs/rest/index.html
- Verify that you have the login credentials for a user of your vRealize Operations Manager instance.
Procedure
Example: Login Request and Response
This example shows a request and response for a user with the login username: vRealize-user and password: vRealize-dummy-password.
POST https://vrealize.example.com/suite-api/api/auth/token/acquire Content-Type: application/json Accept: application/json
{ "username" : "vRealize-user", "password" : "vRealize-dummy-password" }
200 OK
{ "token": "8f868cca-27cc-43d6-a838-c5467e73ec45::77cea9b2-1e87-490e-b626-e878beeaa23b", "validity": 1470421325035, "expiresAt": "Friday, August 5, 2016 6:22:05 PM UTC", "roles": [] }
- If the request is successful, the server return HTTP response code 200 (OK) and re-usable ops authorization token that expires after six hours. This token must be included in each subsequent API request.
- If the authorization header is missing for the request, the server returns HTTP response code 403.
- If the credentials supplied in the Authorization header are invalid, the server returns HTTP response code 401.