Web API: Token
Jump to navigation
Jump to search
The Token operation is used to login a user. The access token is returned as a response, which is used to identify the session in the subsequent 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. Example url:
https://customer.onqpr.com/qprpa/token
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 an object with following fields:
- access_token: contains the access token (session id).
- globalPermissions: Global permissions of the user as comma separated list.
- serverVersion: Version of the QPR ProcessAnalyzer server.
- token_type: always bearer
- userSettings: All user-specific settings in stringified JSON format. Contains the following settings:
- uiLanguage: UI language of the user.
- dateFormat: The date time format used to present dates.
- firstDayOfWeek: The first day of the week shown in e.g. calendars. 0 is Sunday and 1 is Monday.
- use12HourClock: Whether the 12-hour clock is used when presenting time information.