Start Session
8 min
a session represents one test interaction period on an allocated device create a session after the allocation has assigned a device the session starts the device park/appium runtime, but the sdk does not execute appium commands use your normal appium client after the session is ready before you begin create an allocation and keep its allocationid wait until device park assigns a device to the allocation decide whether the session must be recorded use an appium version supported by your device park environment, or leave it unset to use the environment default allocation relationship allocationid connects the session to its reserved device one active allocation can be reused for multiple sessions a common sequence is create one allocation start the first session with its allocationid run the test and stop the session start another session with the same allocationid release the allocation after the last session do not release the allocation between sessions whether sessions may run concurrently depends on the device park environment; the safe default is to stop one session before starting the next you can create multiple sessions from one active allocation stop the current session before starting the next unless your device park administrator confirms concurrent session support sdk method java node js client sessions() start(request) await client sessions() start(request) request fields field required default description allocationid yes for normal flow active allocation identifier videorecording no false enables session recording appiumversion no environment default requested appium version sessionid no generated external/custom session identifier companypoolid no company pool context userid no user metadata useremail no user metadata companyid no company metadata companyname no company metadata customvideorecordingpath no custom recording path request mapping the sdk sends the built request as a json body oauth authorization and json content headers are managed by the sdk client { "allocationid" "allocation 123", "videorecording" true, "useremail" "qa\@devicepark testinium io", "appiumversion" "2 5 0" } unset optional builder fields are omitted videorecording defaults to false examples session session = client sessions() start( devicestartsessionrequest builder() allocationid("allocation 123") videorecording(true) useremail("qa\@devicepark testinium io") appiumversion("2 5 0") build() ); system out println(session sessionid());import { devicestartsessionrequestbuilder } from "device park public sdk"; const session = await client sessions() start( new devicestartsessionrequestbuilder() allocationid("allocation 123") videorecording(true) useremail("qa\@devicepark testinium io") appiumversion("2 5 0") build() ); console log(session sessionid); result the method returns one session store sessionid ; it is required to stop the session, download the appium log and list screen 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 { "id" 1001, "state" "server provided state", "client" null, "sessionid" "session 123", "allocationid" "allocation 123", "startdate" "2026 07 28t10 00 00z", "enddate" null, "latestinteractiontime" "2026 07 28t10 00 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 00 00z", "dataaccessenddate" null } state is a server provided string; sdk 1 0 0 does not publish a session state enum recording urls can remain null until processing is complete continue with your appium test when finished, call stop session docid\ bs aoo0s5ddtonhvueqqr
