Documentation
Difficulty level:
API - User - POST user/jwt
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 |
|
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"
}





