# Guest Sessions
# Get Guest Sessions
By using this API endpoint, it is possible to get the list of guest sessions.
Please note that you cannot get more than 100 records per request. In case you need to get more than 100 records, then you should make more than one request.
# Endpoint
GET /sessions
Rate Limit
This endpoint has a rate limit of 60 requests per minute.
# Parameters
| Name | Type | Description |
|---|---|---|
| guest_id | string | End-user ID |
| location_id | string | Location / Venue ID |
| guest_device_mac | string | Guest device MAC address |
| start_time | date | Returns entries started after the entered starting date (format: yyyy-mm-dd) |
| end_time | date | Returns entries ended before the entered ending date (format: yyyy-mm-dd) |
| yas_id | string | Yas ID |
| online | boolean | If the guest session is currently online or not. true / false |
| per_page | integer | The number of records returned. Default is 10, maximum is 100 |
# Response
TIP
HTTP/1.1 200 OK
{
"data": [
{
"id": "pR3zOKmvzqe",
"location_id": "oWNe6XWDPLM",
"location_name": "IPERA",
"guest_device_description": "WebKit",
"guest_device_mac": "14:2d:27:e7:40:2b",
"guest_device_ip": "172.31.98.114",
"access_code": "",
"login_type_name": "Registration",
"service_profile_name": "Default Service Profile - 60 Minute(s)",
"total_duration": "00:09:05",
"downloaded_data": "3.34 MB",
"uploaded_data": "900.58 kB",
"connection_status": "Offline",
"connection_status_value": 0,
"start_time": "2017-01-05T06:50:55+00:00",
"start_time_formatted": "2017-01-05 9:50 AM",
"end_time": "2017-01-05T07:00:00+00:00",
"end_time_formatted": "2017-01-05 10:00 AM",
"guest_id": "ajKeDq4582W",
"yas_id": "8f627d10-1abc-44d8-b964-a7816388173a"
}
],
"links": {
"first": "[[BaseUrl]]/sessions?page=1",
"last": null,
"prev": null,
"next": "[[BaseUrl]]/sessions?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"path": "[[BaseUrl]]/sessions",
"per_page": 10,
"to": 10
}
}
# Get Guest Session Count
By using this API endpoint, it is possible to get the count of the guest sessions.
# Endpoint
GET /sessions/count
Rate Limit
This endpoint has a rate limit of 60 requests per minute.
# Parameters
| Name | Type | Description |
|---|---|---|
| guest_id | string | End-user ID |
| location_id | string | Location / Venue ID |
| guest_device_mac | string | Guest device MAC address |
| start_time | date | Returns entries started after the entered starting date (format: yyyy-mm-dd) |
| end_time | date | Returns entries ended before the entered ending date (format: yyyy-mm-dd) |
| yas_id | string | Yas ID |
| online | boolean | If the guest session is currently online or not. true / false |
| last_session_first | boolean | List most recent sessions first. true/false |
| per_page | integer | The number of records returned. Default is 10, maximum is 100 |
# Response
TIP
HTTP/1.1 200 OK
{
"count": 1000
}
# Get Guest Session Duration
By using this API endpoint, it is possible to get the details of the guest and session duration via the guest session IP address.
Note: You can retrieve details for multiple sessions simultaneously by separating IP addresses with a comma (maximum 100 IPs). When multiple IPs are provided, the response will be an array of objects. For a single IP, the response is an object (for backward compatibility).
# Endpoint
GET /sessions/:ip_address
Rate Limit
This endpoint has a rate limit of 60 requests per minute.
# Parameters
| Name | Type | Description |
|---|---|---|
| ip_address | string | Required. Guest IP address. To fetch multiple records, separate IPs with a comma (e.g., 10.1.1.5,10.1.1.6). |
# Response
Single IP Address:
TIP
HTTP/1.1 200 OK
{
"ip_address": "10.1.1.5",
"username": "C6D144DE",
"name": "Shagun Goel",
"email": "shagun1486@outlook.com",
"duration": 42
}
Multiple IP Addresses:
TIP
HTTP/1.1 200 OK
[
{
"ip_address": "10.1.1.5",
"username": "C6D144DE",
"name": "Shagun Goel",
"email": "shagun1486@outlook.com",
"duration": 42
},
{
"ip_address": "10.1.1.6",
"username": "A1B2C3D4",
"name": "John Doe",
"email": "john@example.com",
"duration": 120
}
]
# Response Fields
| Name | Type | Description |
|---|---|---|
| ip_address | string | Guest session IP address (included when multiple IPs are requested) |
| username | string | Guest username |
| name | string | Guest name |
| string | Guest email address | |
| duration | integer | Guest session duration in the given IP address connection (seconds) |