Documentation

POST user/jwt

Used for

Creating a JSON Web Token for a user.

Authentication

Valid username.

Parameters

Parameter Description Required Example
username Yes test
password Yes welcome
admin
  • True and authenticated: grants admin rights
  • False en authenticated: grants user rights
No true

Response codes

  • 200 OK
  • 412 Precondition failed

Example

Creating a JWT for the user test.

POST api/rest/user/jwt
Request: 
{
  "username": "test",
  "password": "welcome"
  "admin": true
}
Response: 
{
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJleGFtcGxlLWFwaSIsInN1YiI6Ijk4NzY1NDMyMTAiLCJ1c2VyX25hbWUiOiJqYW5lLmRvZSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTcwMDAwMDAwMCwiZXhwIjoxNzAwMDAzNjAwfQ.k9R2YxV8pQmZC6mW1L4HfN0sA2eJbT7UQX5NwEoKZcM"
}