Presences
A presence represents a period of time during which an agent was connected to Spacivox.
Fields
- class Presence
- activity: integer
The agent’s activity during the presence.
- agent: integer
The agent which the presence belongs to.
- duration: integer
The presence’s duration (in seconds).
- team: integer
The presence’s team.
- timestamp: datetime
The presence’s start date and time.
- wrapup_duration: integer
The time (in seconds) spent in call wrap-up.
API
- GET /j/presences
Retrieves the list of presences.
You must specify a start date and an end date.
Example request:
GET /j/presences?start=2015-01-06T00:00:00Z&end=2015-01-07T00:00:00Z&team=1 HTTP/1.1 Authorization: Bearer 0a1b2c3d4e5f
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "activity": null, "agent": 1, "duration": 84, "team": 1, "timestamp": "2015-01-06T10:21:14.243Z", "wrapup_duration": 10 }, { "activity": 345, "agent": 2, "duration": 123, "team": 1, "timestamp": "2015-01-06T10:23:56.835Z", "wrapup_duration": 0 } ]
- Request Headers:
Authorization – OAuth token to authenticate
- Query Parameters:
end (datetime) – An end date and time.
start (datetime) – A start date and time.
- Response JSON Array of Objects:
activity (integer) – The agent’s activity during the presence.
agent (integer) – The agent which the presence belongs to.
duration (integer) – The presence’s duration (in seconds).
team (integer) – The presence’s team.
timestamp (datetime) – The presence’s start date and time.
wrapup_duration (integer) – The time (in seconds) spent in call wrap-up.
- Status Codes:
200 OK – no error
400 Bad Request – for instance a required field is missing
403 Forbidden – you tried to access a forbidden resource, check you provided a valid OAuth token