...
To log in to the device.
Request
- Urn: /api/login
...
Metoda: POST
...
- Method: POST
- Request header: -
- Request content: json
Blok kódu | ||
---|---|---|
| ||
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "login - request",
"type": "object",
"properties": {
"user": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"user",
"password"
],
"additionalProperties": false
} |
Meaning of json items:
$.user:
User name.
Type: string
Mandatory.$.password:
User password.
Type: string
Mandatory.
Blok kódu | ||
---|---|---|
| ||
{
"user": "johndoe",
"password": "1!54.ee44"
} |
Response
- Response code:
- 200 – OK
- 400 – Error (bad request)
- 401 – Unauthorized
- 500 – Server error
- 512 - Internal application error
- Response header: Set-Cookie: session - Actual session value.
- Response type: - / json (optional)
Blok kódu | ||
---|---|---|
| ||
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "defaultPassword": { "type": "boolean" } } } |
Meaning of json items:
- $.defaultPassword:
Specifies that the default password was used in the logon request.
Type: boolean
Optional.
The parameter is present only for response with result code 200.
Blok kódu | ||
---|---|---|
| ||
{ "defaultPassword": true } |