Retrieve JWT using Login
POST/api/v1/login
Web applications should use this API to retrieve JWT and user profile. Subsequent API calls can then use the JWT obtained.
Request JSON
| Parameter | Type | Description |
|---|---|---|
email | string | Login email ID |
password | string | Login password |
API RESPONSE
A JSON with JWT and other user details.
Response with JWT
{
"user_id": 42,
"user_email": "user@example.org",
"username": "John Doe",
"jwt": "JWT",
"role_id": 1,
"role_name": "ADMIN",
"permissions": ["CREATE_ASSET", "READ_ASSET", "EDIT_ASSET"],
"uploadkey": "ec5139a372f6478d97365ec0df9c9a814",
"accessID": "IZJTAMBQGAYDAMBQGAYDAMBQGAYDANKT",
"preferences": {},
"notifications": ["Notification message 1"]
}
| Parameter | Type | Description |
|---|---|---|
jwt | string | JSON Web Token. Use this in subsequent API calls as Authorization: Bearer <jwt>. |
user_id | integer | Unique user identifier |
user_email | string | User's email address |
username | string | User name as Firstname Lastname |
role_id | integer | User role ID (1=ADMIN, 2=MANAGER, 3=USER, 4=CREATOR) |
role_name | string | User role name |
permissions | array | List of permission tokens for this user's role |
uploadkey | string | File upload key for use in Picker widget |
accessID | string | Access identifier for signed URL generation |
preferences | object | User preferences |
notifications | array | List of notification messages since last login |
Request
Responses
- 200
- 400
- 401
- 403
- 500
Successful login
Bad request - Missing or invalid request parameters
Unauthorized - Invalid email or password
Forbidden - Account disabled or access denied
Internal server error