Relesys API Docs

v1.2

https://api.relesysapp.net/api/v1.2

Aggregated

Get Departments Aggregated
GET /sessions/aggregation/departments
https://api.relesysapp.net/api/v1.2/sessions/aggregation/departments
Get Sessions aggregated for a period and per department.

Time Interval:
 All data returned is between DateFrom and DateTo, the dates are inclusive
Department Type:
 "Company", "Country", "Department", "District", "Division", "Other", "Partner", "Region", "Store", "Subdepartment"
SubDepartments:
  If set to true, a DeparmentId is required to get aggregated data for all individual subdepartments
Scopes: relesys.api, relesys.api:read, relesys.api.insights, relesys.api.insights:read
Query String
dateFrom datetime Filterable required
dateTo datetime Filterable required
departmentId string / guid Filterable optional
departmentType string Filterable optional
subDepartments boolean Filterable optional
Responses
application/json
JSON
{"totalUsers":250,"totalUsersWithSessions":0,"departments":[{"users":98,"usersWithSessions":20,"departmentName":"Department A","departmentType":"Store","departmentId":"8b673e9c-4458-42ee-bb47-205f9508631a"},{"users":102,"usersWithSessions":87,"departmentName":"Department B","departmentType":"Region","departmentId":"3ffc7fb3-a5b7-4860-a24e-71ffb9bb4a6c"}]}
object
  departments array[object]      
   departmentId string / guid      
   departmentName string      
   departmentType string      
   users integer      
   usersWithSessions integer      
  totalUsers integer      
  totalUsersWithSessions integer