Session Management APIs
Login (POST)
Authenticates a user and creates a session.
Route
|
URI |
/api/v1/session/login |
|
Method |
POST |
|
Result |
JSON – SessionModel |
Request Payload
LoginCredentials object:
|
Property |
Type |
Mandatory |
Description |
|---|---|---|---|
|
username |
string |
Yes |
The login name of the user |
|
password |
string |
Yes |
The password of the user |
|
domain |
string |
No |
The domain of the user (FQDN or NetBIOS) |
Response Structure
SessionModel containing:
-
SessionId: Unique session identifier
-
User: Authenticated user information (AccountModel)
-
ExpiresAt: Session expiration time
Example Request
POST http://localhost/api/v1/session/login
Content-Type: application/json
{
"username": "john.doe",
"password": "SecurePass123!",
"domain": "CONTOSO"
}
Example Response
{
"SessionId": "abc123-def456-ghi789",
"User": {
"UriKey": "john.doe@contoso.com",
"DisplayName": "John Doe",
"ResourceTypeGuid": "...",
"SerializedAccountId": "...",
"IsGroup": false,
"TypeId": 1
},
"ExpiresAt": "2024-12-05T18:00:00Z"
}
Logout (POST)
Logs out the current user and terminates the session.
Route
|
URI |
/api/v1/session/logout |
|
Method |
POST |
|
Result |
JSON – LogoutResult |
Parameters
None
Example
POST http://localhost/api/v1/session/logout
Example Response
{
"Success": true,
}
Update Session (POST)
Updates the current session to keep it alive.
Route
|
URI |
/api/v1/session/update |
|
Method |
POST |
|
Result |
JSON – SessionModel |
Parameters
{
"timezone": "Europe/Budapest",
"culture": "en-US"
}
Example Request
POST http://localhost/api/v1/session/update
Content-Type: application/json
Example Response
{
"Success": true,
"Capabilities": "AccessWebReadInterface,AccessWebWriteInterface,LoginWebClient",
"SessionId": "d587ee95-aad7-4faa-8389-9c4470cfaecf",
"IsEducationLicense": false,
"Culture": "en-US"
}