Skip to main content

Emotions Timeline

Get the quantity of each emotion detected during a specific session, segregated by time intervals of arbitrary size. Dividing data by time frames helps you to understand better what were the emotions at a given specific moment of the session..

URL

GET /v1/sessions/:sessionId/emotions/timeline

Request URL Parameters

ParameterDescription
:sessionIdID of the session to retrieve.

Request Query Parameters

granularity
number
Size of each interval in seconds.
Range: 5 - 3600
Default: 60
start
number
Starting point of the timeline in seconds. Defaults to session start.
Default: 0
end
number
End point of the timeline in seconds. Defaults to session end.

Response Body

session
string
Expandable
ID of the session
Example: 65ea1530bb50af72b6e3dc1e
timeline
object[]
Entry in the timeline containing information about the detections in a given range and the range bounds. Note that intervals containing no data are not included in the response.

Response codes

CodeMeaningDescription
200OKThe request has succeeded. The client can read the result in the body.
400Bad RequestServer received an invalid request body or invalid query parameters.
404Not FoundThe requested resource does not exist or you do not have permissions to perform this action on it.

Request example

curl -X GET 'https://api.emogg.com/v1/sessions/:sessionId/emotions/timeline' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Example response

{
"session": "65ea1530bb50af72b6e3dc1e",
"timeline": [
{
"start": 0,
"end": 60,
"detectedFaces": 22,
"emotions": {
"exaltation": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"focus": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"shock": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"seriousness": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"fatigue": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"disgust": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
},
"overwhelming": {
"people": 3,
"quantity": 2.654,
"intensity": 0.885
}
}
},
{...},
{...}
]
}