Update a session
Updates the parameters passed on the specified session. At the moment, you can only edit the name of a session. All the other fields are handled by our internal systems and are readonly for the end-user.
URL
PATCH /v1/sessions/:sessionId
Request URL Parameters
| Parameter | Description |
|---|---|
| :sessionId | ID of the session to update. |
Request Body
name
string
New session name. Max 256 characters.
Response Body
Updated session object.
_id
string
Unique identifier for the session.
Example:
65ea1530bb50af72b6e3dc1ename
string
Name of the session. Maximum 256 characters.
Example:
Mobile Word Congress Pitchtype
enum SessionType
Session type
Example:
live_analysisstate
enum SessionState
Current state of the session
Example:
activetimestamp
Timestamp when the session was created.
Example:
2024-04-01T10:30:00.000Zduration
number
Session duration in seconds.
Example:
120config
object
Optional
Information about the configuration of the session.
sources
object[]
Optional
Information about the data sources of the session.
meta
object
Optional
Information referred to the internal state of the session.
product
string
Unique ID of the product used to analyze this session (e.g. pro, advanced...).
Example:
65946a77408bd7b32c5189a3user
string
ID of the user who created the session.
Example:
65d7a8fb532f66218ecd4cabversion
number
Version of the object schema. It should not change often but can be helpful in the future if a new session schema is published.
Example:
3Response codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | The request has succeeded. The client can read the result in the body. |
| 400 | Bad Request | Server received an invalid request body or invalid query parameters. |
Request example
curl -X PATCH 'https://api.emogg.com/v1/sessions/:sessionId' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
-H 'Content-Type: application/json'
-d '{"name":"New name"}'Example response
{
"_id": "65ea1530bb50af72b6e3dc1e",
"name": "New name",
"type": "live_analysis",
"state": "active",
"timestamp": "2024-04-01T10:30:00.000Z",
"duration": 120,
"config": {
"removeMedia": true
},
"sources": [
{
"id": "c1fcba18-15ec-457c-a1de-fcbb87aeaa0e",
"name": "Integrated Webcam",
"type": "video",
"device": "local_camera"
},
{...},
{...}
],
"meta": {
"expires": "2024-05-01T11:30:00.000Z",
"healthCheck": "2024-05-01T10:39:30.000Z",
"workerState": "working"
},
"product": "65946a77408bd7b32c5189a3",
"user": "65d7a8fb532f66218ecd4cab",
"version": 3
}