Get Session History
GET
/web/v1/system/security/sessions/history JWTRetrieves paginated login history for the authenticated user. Supports time-range filtering. Results are ordered by login time descending (most recent first).
Required Headers
| Header | Example Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Accept | application/json | Expected response type |
| X-Client-Hash | Client device fingerprint | |
| Accept-Language | en, zh, zh-Hant, ja, vi | Response language (default: en) |
| Authorization | Bearer | JWT access token |
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
page | Integer | Required | query | Page number, zero-based (default: 0) |
size | Integer | Required | query | Page size (default: 20, max: 100) |
startTime | Instant | Required | query | Filter start time (ISO 8601 datetime) |
endTime | Instant | Required | query | Filter end time (ISO 8601 datetime) |
Request Example
No request body required. Parameters are passed as query strings.
Success Response
Success 200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"content": [
{
"bizId": "LH_001",
"loginTime": "2026-03-23T12:00:00Z",
"clientIp": "127.0.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"loginResult": 1,
"failureReason": null
},
{
"bizId": "LH_002",
"loginTime": "2026-03-23T11:30:00Z",
"clientIp": "127.0.0.2",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"loginResult": 2,
"failureReason": "INVALID_CREDENTIALS"
}
],
"totalElements": 2,
"totalPages": 1,
"number": 0,
"size": 20
}
}| Field | Type | Description |
|---|---|---|
bizId | string | Login history record business ID |
loginTime | string (ISO 8601) | Login attempt timestamp |
clientIp | string | Client IP address |
userAgent | string | User-Agent string |
loginResult | integer | Login result: 1 = success, 2 = failed |
failureReason | string or null | Failure reason (e.g. "INVALID_CREDENTIALS") if login failed, otherwise null |
Pagination wrapper fields: totalElements, totalPages, number (current page), size (page size).
Error Responses
Unauthorized 401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Notes
- Results are ordered by login time descending (most recent first).
- Both
startTimeandendTimemust be provided together for time-range filtering; if either is missing, all history is returned. - Maximum page size is 100.