Web API: Token

From QPR ProcessAnalyzer Wiki
Revision as of 13:48, 16 May 2020 by Ollvihe (talk | contribs)
Jump to navigation Jump to search

The Token operation is used to login a user. All operations in the Web API require a session. The access token is returned as a response which is used to identify the session in other Web API operations.

Url: POST /token
Content-Type: application/x-www-form-urlencoded
Body:
username=myUserName&password=myPassword&grant_type=password

Note that the path doesn't contain api unlike all other operations in the Web API.

Request body contains the following parameters as url encoded:

  • username: Login name of the user.
  • password: User password.
  • grant_type: password (always use that value)

The response is a JSON object with several properties, and one of them is access_token containing the access token (session id).