List Sessions
Use this method to find active or completed Device Park sessions, inspect sessions created from one allocation and recover identifiers needed for cleanup or evidence collection.
SDK Method
Java | Node.js | .NET | Returns |
|---|---|---|---|
client.sessions().list(request) | await client.sessions().list(request?) | await client.Sessions.ListAsync(request?) | PageDto<Session> |
Request Fields
Builder method | Type | Default | Description |
|---|---|---|---|
.page(value) | integer | 0 | Zero-based page index |
.size(value) | integer | 20 | Maximum sessions requested |
.sortBy(value) | string | ID | Server-side sort field |
.direction(value) | SortDirection | DESC | ASC or DESC |
.addFilter(key, value, operation) | filter rule | None | Adds a session filter |
.filters(rules) | filter array | Empty | Replaces all session filters |
Available Session Filters
Constant | Expected value | Typical operation | Purpose |
|---|---|---|---|
SessionFilter.ALLOCATION | Allocation id | EQUAL | Return sessions created from one allocation |
SessionFilter.SESSION | Session id | EQUAL | Find one Device Park session |
SessionFilter.SERIAL | Device serial | EQUAL | Return sessions for one device |
SessionFilter.STATE | One of the session state values below | EQUAL | Return sessions in a requested state |
SessionFilter.USER_EMAIL | User email | EQUAL | Return sessions for one user email |
SessionFilter.USER_ID | User id | EQUAL | Return sessions for one user id |
SessionFilter.COMPANY_ID | Company id | EQUAL | Return sessions for one company id |
SessionFilter.COMPANY_NAME | Company name | EQUAL | Return sessions for one company name |
USER_EMAIL, USER_ID, COMPANY_ID and COMPANY_NAME are Java SessionFilter constants. USER_EMAIL and COMPANY_NAME take a string. USER_ID and COMPANY_ID take a Long.
All three SDKs transmit the allocation, session, serial and state filters to Device Park.
Session State Values
The SDK models the state as a string. Pass one of these API values to SessionFilter.STATE:
Filter value | Meaning |
|---|---|
ACTIVE | Session is active and in use |
CLOSING | Closure was requested and related runtime resources are being cleaned up |
CLOSED | Session and its related runtime resources closed successfully |
FAILED_TO_CLOSE | The Device Park session closed, but one or more related resources failed to close |
Request Mapping
The list operation has no request body. Every SDK maps pagination, sorting and filter rules to query data. OAuth authorization is managed by the SDK client.
Examples
DeviceSessionFilterRequest filterRequest = DeviceSessionFilterRequest.of(
SessionFilter.ALLOCATION,
"allocation-123",
SearchOperation.EQUAL
);
PageDto<Session> sessions = client.sessions().list(
DeviceSessionRequest.builder()
.filters(Collections.singletonList(filterRequest))
.page(0)
.size(20)
.build()
);Response Model
PageDto<Session> contains one page of session records.
Field group | Fields |
|---|---|
Identity | id, sessionId, allocationId, client |
Lifecycle | state, startDate, endDate, latestInteractionTime, createdAt, updatedAt, dataAccessEndDate |
Device | deviceSerial, deviceName, deviceModel, deviceManufacturer, devicePlatform, deviceVersion |
User/company | userId, userEmail, companyId, companyName |
Runtime/evidence | appiumVersion, videoRecording, videoRecordingScope, videoRecordUrl |
All model fields are nullable because availability depends on session state and environment response.
videoRecordUrl is the authenticated RFC 8216 HLS media-playlist URL for the complete session recording. It remains null while the session is active and can remain null until a recorded, closed session has finished processing. Use this URL with an HLS-capable player; do not confuse it with the per-segment downloadUrl returned by screenRecords(...). See Play the Complete Recording with HLS.
{
"size": 20,
"page": 0,
"totalPages": 1,
"totalElements": 1,
"data": [
{
"id": 1001,
"state": "ACTIVE",
"client": null,
"sessionId": "session-123",
"allocationId": "allocation-123",
"startDate": "2026-07-28T10:00:00Z",
"endDate": null,
"latestInteractionTime": "2026-07-28T10:02:00Z",
"userId": null,
"userEmail": "[email protected]",
"companyId": null,
"companyName": null,
"deviceSerial": "R58M123456A",
"deviceName": "Galaxy S23",
"deviceModel": "SM-S911B",
"deviceManufacturer": "Samsung",
"devicePlatform": "Android",
"deviceVersion": "14",
"videoRecording": true,
"videoRecordingScope": "FULL_SESSION",
"videoRecordUrl": null,
"appiumVersion": "2.5.0",
"createdAt": "2026-07-28T10:00:00Z",
"updatedAt": "2026-07-28T10:02:00Z",
"dataAccessEndDate": null
}
]
}The SDK does not publish a session-state enum, so supply one of the documented values above as a string.