REST API for retrieving authentication token
You use the POST
operation on the api/get_token
element
to request your unique token that is required to authenticate the
REST API requests.
Important: This REST API call does not work when single sign-on authentication is
enabled. To view the token, log in to License Metric Tool, hover over the User icon , and click Profile. Then, click Show
token.
Resource URL
https://hostname:port/api/get_token
Resource information
Operation details | Description |
---|---|
Purpose | Returns the authentication token |
HTTP method | POST |
Request headers |
|
Request payload |
|
Request Content-Type |
|
Response headers |
|
Response payload | Token element |
Response Content-Type |
|
Normal HTTP response codes |
|
Error HTTP response codes |
Message body includes an error message with details. |
Example HTTP conversation
- Request
-
POST https://hostname:port/api/get_token
- Request header
-
Accept: application/json Accept-Language: en-US Content-Type: application/json
- Request body
-
{ "user" : "admin", "password" : "<password>" }
- Response header
-
HTTP/1.1 200 OK Content-Type: application/json Content-Language: en-US
- Response body (JSON)
-
{ "token":"<token>" }