Skip to main content
View as Markdown

Sessions

List sessions

GET/api/v1/sessions

Sessions in the selected organization, visible to every member of it, newest first, with cursor pagination. The organization is chosen by the X-Organization-Id header, or the organization the API key is bound to, otherwise the caller's default organization.

Query parameters
limitinteger
Maximum sessions to return (default 100, max 500)
beforestring · date-time
Cursor: return sessions created strictly before this RFC3339 timestamp
Header parameters
X-Organization-Idstring
Selects which of the caller's organizations the request acts on. When omitted, the caller's default organization is used.
Returns
objectstringrequired
dataarrayrequired
Show child attributes
idstring · uuidrequired
The session's own id
titlestringnullable
Human-readable title; may be null
userstringrequired
User who created this session
devicesarrayrequired
Device allocations linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
Allocation id. Stable and always present, including while the device is still provisioning and no physical device exists yet. This is not the device's own id — see info.serial.
statusstringrequired
Device lifecycle status. `provisioning` means a device is being booted and has no info.serial yet; `in_use` means it is allocated and driveable; `released` means it has been returned to the pool. More values will be added.
infoobjectrequired
Descriptive attributes of the device.
Show child attributes
platformstringrequired
typestring
namestringrequired
osVersionstringrequired
serialstring
The physical device's own id — a UDID on iOS, a serial on Android. Absent while the device is provisioning. This is the id accepted by the device endpoints and tools.
createdAtstring · date-timerequired
When the device was added to the session
releasedAtstring · date-timenullable
When the device was released (billing end)
instancesarray
Instances linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
The instance's own id
statusstringrequired
Lifecycle: provisioning -> ready, then released, or failed if provisioning could not complete
osstringrequired
Instance operating system. Only macos is supported today.
imagestringrequired
Server-assigned base image the instance booted from
machineobjectrequired
The compute backing an instance.
Show child attributes
archstringrequired
CPU architecture. Only arm64 is supported today.
cpuCoresintegerrequired
memoryMbintegerrequired
diskMbintegerrequired
createdAtstring · date-timerequired
When the instance was allocated (billing start)
readyAtstring · date-timenullable
When the instance finished provisioning; null while provisioning
releasedAtstring · date-timenullable
When the instance was released (billing end); null while active
chatsarray
Chats in this session, oldest first. A client restoring a session's conversation reads the last one.
Show child attributes
idstringrequired
Chat id
createdAtstring · date-timerequired
nextCursorstringnullable
Cursor for the next page; absent when there are no more results

Create a session

POST/api/v1/sessions

Creates an empty session container. Attach resources to it separately: use fleet.allocate with sessionId to link a device, or allocate an instance with sessionId.

Header parameters
X-Organization-Idstring
Selects which of the caller's organizations the request acts on. When omitted, the caller's default organization is used.
Returns
idstring · uuidrequired
The session's own id
titlestringnullable
Human-readable title; may be null
userstringrequired
User who created this session
devicesarrayrequired
Device allocations linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
Allocation id. Stable and always present, including while the device is still provisioning and no physical device exists yet. This is not the device's own id — see info.serial.
statusstringrequired
Device lifecycle status. `provisioning` means a device is being booted and has no info.serial yet; `in_use` means it is allocated and driveable; `released` means it has been returned to the pool. More values will be added.
infoobjectrequired
Descriptive attributes of the device.
Show child attributes
platformstringrequired
typestring
namestringrequired
osVersionstringrequired
serialstring
The physical device's own id — a UDID on iOS, a serial on Android. Absent while the device is provisioning. This is the id accepted by the device endpoints and tools.
createdAtstring · date-timerequired
When the device was added to the session
releasedAtstring · date-timenullable
When the device was released (billing end)
instancesarray
Instances linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
The instance's own id
statusstringrequired
Lifecycle: provisioning -> ready, then released, or failed if provisioning could not complete
osstringrequired
Instance operating system. Only macos is supported today.
imagestringrequired
Server-assigned base image the instance booted from
machineobjectrequired
The compute backing an instance.
Show child attributes
archstringrequired
CPU architecture. Only arm64 is supported today.
cpuCoresintegerrequired
memoryMbintegerrequired
diskMbintegerrequired
createdAtstring · date-timerequired
When the instance was allocated (billing start)
readyAtstring · date-timenullable
When the instance finished provisioning; null while provisioning
releasedAtstring · date-timenullable
When the instance was released (billing end); null while active
chatsarray
Chats in this session, oldest first. A client restoring a session's conversation reads the last one.
Show child attributes
idstringrequired
Chat id
createdAtstring · date-timerequired

Get a session

GET/api/v1/sessions/{sessionId}

Returns a session in the selected organization, visible to every member of it. The organization is chosen by the X-Organization-Id header, or the organization the API key is bound to, otherwise the caller's default organization.

Path parameters
sessionIdstring · uuidrequired
Session UUID
Header parameters
X-Organization-Idstring
Selects which of the caller's organizations the request acts on. When omitted, the caller's default organization is used.
Returns
idstring · uuidrequired
The session's own id
titlestringnullable
Human-readable title; may be null
userstringrequired
User who created this session
devicesarrayrequired
Device allocations linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
Allocation id. Stable and always present, including while the device is still provisioning and no physical device exists yet. This is not the device's own id — see info.serial.
statusstringrequired
Device lifecycle status. `provisioning` means a device is being booted and has no info.serial yet; `in_use` means it is allocated and driveable; `released` means it has been returned to the pool. More values will be added.
infoobjectrequired
Descriptive attributes of the device.
Show child attributes
platformstringrequired
typestring
namestringrequired
osVersionstringrequired
serialstring
The physical device's own id — a UDID on iOS, a serial on Android. Absent while the device is provisioning. This is the id accepted by the device endpoints and tools.
createdAtstring · date-timerequired
When the device was added to the session
releasedAtstring · date-timenullable
When the device was released (billing end)
instancesarray
Instances linked to this session, ordered by createdAt ascending
Show child attributes
idstring · uuidrequired
The instance's own id
statusstringrequired
Lifecycle: provisioning -> ready, then released, or failed if provisioning could not complete
osstringrequired
Instance operating system. Only macos is supported today.
imagestringrequired
Server-assigned base image the instance booted from
machineobjectrequired
The compute backing an instance.
Show child attributes
archstringrequired
CPU architecture. Only arm64 is supported today.
cpuCoresintegerrequired
memoryMbintegerrequired
diskMbintegerrequired
createdAtstring · date-timerequired
When the instance was allocated (billing start)
readyAtstring · date-timenullable
When the instance finished provisioning; null while provisioning
releasedAtstring · date-timenullable
When the instance was released (billing end); null while active
chatsarray
Chats in this session, oldest first. A client restoring a session's conversation reads the last one.
Show child attributes
idstringrequired
Chat id
createdAtstring · date-timerequired