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 returns client sessions() list(request) await client sessions() list(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 the java and node js sdks transmit session 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 both sdks map 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() );import { devicesessionrequestbuilder, type devicesessionfilterrequest, searchoperation, sessionfilter } from "@device park/public sdk"; const filterrequest devicesessionfilterrequest = { key sessionfilter allocation, value "allocation 123", operation searchoperation equal }; const sessions = await client sessions() list( new devicesessionrequestbuilder() filters(\[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 , 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 docid 9vofjqy3nq7olg4uhlhtk { "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" "qa\@devicepark testinium io", "companyid" null, "companyname" null, "deviceserial" "r58m123456a", "devicename" "galaxy s23", "devicemodel" "sm s911b", "devicemanufacturer" "samsung", "deviceplatform" "android", "deviceversion" "14", "videorecording" true, "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 next steps stop an active session docid\ bs aoo0s5ddtonhvueqqrdownload its appium log docid 6uodgeokeg bfpqqpobdelist its screen recordings docid 9vofjqy3nq7olg4uhlhtk