Skip to main content

Create a session

Request

Create a new recording session. Either deviceId or recordingIds must be provided. If recordingIds are provided without a deviceId, the device is inferred from the recordings, which must all belong to the same device. The session inherits its org and project from the device. If the request includes a projectId, it must match the device's project; otherwise the API returns 400.

Security
ApiKey(Required scopes: sessions.create)
Bodyapplication/jsonrequired
deviceIdstring

The ID of the device to associate with the session. If omitted, inferred from recordingIds.

keystring, non-empty

A user-supplied identifier, unique within the project.

recordingIdsArray of strings

IDs of recordings to associate with the new session. All recordings must belong to the same device and project.

propertiesobject(CustomPropertyValues)

A key-value map, where each key is one of your pre-defined session custom property keys. Keys which are not recognized as custom properties will be ignored.

Payload
{ "deviceId": "string", "key": "string", "recordingIds": [ "string" ], "properties": { "property1": "string", "property2": "string" } }

Responses

The newly created session

Bodyapplication/json
idstringrequired

ID of the recording session

projectIdstringrequired

The project ID that the session belongs to

deviceobject(DeviceSummary)required

ID and name of a device.

keystring

A user-supplied identifier, unique within the project.

createdAtstring, (date-time)required

Timestamp when the session was created.

updatedAtstring, (date-time)required

Timestamp when the session was last updated.

propertiesobject(CustomPropertyValues)

A key-value map of the custom properties associated with this session.

recordingsArray of objectsrequired

Recordings associated with this session.

Response
{ "id": "string", "projectId": "string", "device": { "id": "string", "name": "string" }, "key": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "properties": { "property1": "string", "property2": "string" }, "recordings": [ { … } ] }