Login History Report
User login sessions with duration, IP address, and origin platform.
GET
/apidev/v1/reports/general/loginsPermissionAPICLI_RPTGT_LOGINS
Rate Limit10 req/min
Cache300s
Max Range31 days
Overview
Returns user login sessions over the selected period, including login and last-activity timestamps, session duration, client IP address, and the platform the user signed in from (web, Android, etc.). Use it to review access activity and session length.
- User filter —
user_idlimits results to a single user - Session duration —
elapsed_secondsreports how long each session lasted
Request
Request Headers
Every request to a protected endpoint requires these headers:
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token obtained from the Login endpoint. Format: Bearer <token> |
X-API-Key | Yes | Company integration key provided during onboarding. Format: gtk_xxx... |
tenant | Yes | Your assigned tenant domain (default: geotareas.com) — always send your assigned tenant |
Content-Type | Conditional | application/json — required for POST and PUT requests |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
startdate | string | Yes | — | ISO 8601 start date-time (e.g. 2026-03-01T00:00:00). |
enddate | string | Yes | — | ISO 8601 end date-time. Max range 31 days from startdate. |
user_id | string | No | — | Filter by user ID. Max length 40. |
limit | integer | No | 25 | Number of records per page (1–100). |
offset | integer | No | 0 | Number of records to skip for pagination. |
Code Examples
- cURL
- JavaScript
- Python
curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/general/logins?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&limit=25"
const res = await fetch(
`https://${TENANT}/apidev/v1/reports/general/logins?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&limit=25`,
{
headers: {
'Authorization': `Bearer ${token}`,
'X-API-Key': apiKey,
'tenant': TENANT,
},
}
);
const data = await res.json();
import requests
response = requests.get(
f"https://{TENANT}/apidev/v1/reports/general/logins",
headers={"Authorization": f"Bearer {token}", "X-API-Key": api_key, "tenant": TENANT},
params={"startdate": "2026-03-01T00:00:00", "enddate": "2026-03-15T23:59:59", "limit": 25},
)
data = response.json()
Response
Response Fields
| Field | Type | Description |
|---|---|---|
login_time | string | null | Login timestamp. |
last_login_time | string | null | Last activity timestamp. |
elapsed_seconds | number | Session duration in seconds. |
user_name | string | User display name. |
remote_address | string | Client IP address. |
origin | string | Login origin platform. |
Example Response
{
"success": true,
"data": [
{
"login_time": "2026-03-05T08:00:00",
"last_login_time": "2026-03-05T17:30:00",
"elapsed_seconds": 34200,
"user_name": "Admin User",
"remote_address": "192.168.1.100",
"origin": "web"
},
{
"login_time": "2026-03-05T07:15:00",
"last_login_time": "2026-03-05T18:00:00",
"elapsed_seconds": 38700,
"user_name": "Carlos Martinez",
"remote_address": "10.0.0.45",
"origin": "android"
}
],
"meta": {
"total": 2,
"limit": 25,
"offset": 0
}
}
Errors
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid parameters (e.g. date range exceeds 31 days). |
UNAUTHORIZED | 401 | Missing, invalid, or expired tenant / Authorization / X-API-Key |
FORBIDDEN | 403 | User lacks required permission. |
RATE_LIMITED | 429 | Exceeded 10 req/min. |
INTERNAL_ERROR | 500 | Unexpected server error. |