Web API: Token: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(Created page with "==Request== * The request url has the following form: https://HOSTNAME/qprpa/token. Note that the path doesn't contain '''api''' unlike all other operations in the API. * The...")
 
Line 4: Line 4:
* '''Content-Type''' in the HTTP request header must be '''application/x-www-form-urlencoded'''
* '''Content-Type''' in the HTTP request header must be '''application/x-www-form-urlencoded'''
* The payload contains the parameters as url encoded:
* The payload contains the parameters as url encoded:
* '''grant_type''': '''password''' (always use that value)
** '''grant_type''': '''password''' (always use that value)
* '''username''': Username
** '''username''': Username
* '''password''': User password.
** '''password''': User password.


Example:
Example:

Revision as of 15:33, 15 May 2020

Request

  • The request url has the following form: https://HOSTNAME/qprpa/token. Note that the path doesn't contain api unlike all other operations in the API.
  • The request method is POST
  • Content-Type in the HTTP request header must be application/x-www-form-urlencoded
  • The payload contains the parameters as url encoded:
    • grant_type: password (always use that value)
    • username: Username
    • password: User password.

Example:

grant_type=password&username=myUserName&password=myPassword

Response

The response as a JSON object with several properties. One of them is access_token containing the session id.