...
Login user
Code Block |
---|
|
POST /api/v2/login |
Description
Log Login the user in with the provided credentials
Parameters
Query Parameter | Expected Type | Description |
---|
username | string | Username of the user to login. |
password | string | Password of the user to login. |
UI Text Box |
---|
|
Before release 12.10, Blueriq expected the username and password to be in the request parameters of the login request. Since 12.10, the username and password are retrieved from the login request body. For backwards compatibility the login information can still be retrieved from the request parameters. The material theme sends the login information in the request body by default from release 12.10. It is possible to configure the theme to still use the legacy request parameter method of logging in, by configuring the backend module in your theme: Code Block |
---|
language | js |
---|
title | app.module.ts |
---|
| V2BackendModule.forRoot({
baseUrl: ....,
legacyLoginWithQueryParams: true,
}),
|
|
Request body
Code Block |
---|
|
{
"username": string,
"password": string
} |
Example Request Url
Code Block |
---|
|
/api/v2/login?username=<username>&password=<password> |
Response
204 No Content, if successful.
401 Unauthorized, if unsuccessful.
...
Description
Handles a page event and returns the events that occurred in any of the sessions in heirarchy.
Name | Value |
---|
Content-Type | application/json |
Parameters
URL Segment | Expected Type | Description |
---|
sessionId | string | The session id. |
Request body
At least the element that triggered the event and all editable fields on the page must be included in the request.
Code Block |
---|
|
{
elementKey: string, // Key of the element the event originates from
fields: [{
key: string, // Key of the field
values: string[], // Values of the field, an array even if the field is not multivalued
}], // Data of all fields on the page
parameters: { [string]: string } // Additional parameters that may be passed to the backend
} |
Code Block |
---|
language | text |
---|
title | Example request |
---|
|
{
"elementKey": "P960-C2-B1",
"fields": [
{
"key": "P960-C1-F0",
"values": [
"testValue"
]
},
{
"key": "P960-C1-F6",
"values": [
"testValue2"
]
}
]
} |
Response body
Returns an event response, for more info about an event response see: REST Events V1.
Code Block |
---|
|
{
events: { EventResponse }[]
} |
Code Block |
---|
language | text |
---|
title | Example response |
---|
|
{
"events": [{
"sessionId": "45992123-f893-4b22-a6a3-ff648b63267c",
"changes": {
"changes": [
{
"type": "add",
"key": "P501-C1-B0",
"model": {
"key": "P501-C1-B0",
"name": "Annuleer",
"properties": {
},
"disabled": false,
"refresh": false,
"caption": "Annuleer",
"type": "button",
"styles": [
]
}
},
},
"type": "page"
}]
} |
...