List Sessions
4 min
use this method to inspect sessions created by the authenticated client, including active and completed sessions when to use this method find active sessions before cleanup inspect sessions created from the same allocation find a session by id or device serial review session state and recording information sdk method java node js client sessions() list(request) await client sessions() list(request?) examples pagedto\<session> sessions = client sessions() list( devicesessionrequest builder() page(0) size(20) build() );import { devicesessionrequestbuilder, searchoperation, sessionfilter } from "@devicepark/public sdk"; const sessions = await client sessions() list( new devicesessionrequestbuilder() addfilter(sessionfilter state, "active", searchoperation equal) build() ); available node js filters include allocation id, session id, device serial and state java sdk 1 0 0 currently sends pagination and sorting but not filters result pagedto\<session> contains session state, allocation, user/company metadata, device details, recording information and timestamps use sessionid for session specific operations use allocationid to understand which sessions shared the same device reservation next steps stop an active session /sessions/stop session download its appium log /sessions/download appium log list its screen recordings /sessions/list screen records
