Get user insights overview
curl --request GET \
--url https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"summary": {
"totalDurationInSeconds": 123,
"totalWasteDurationInSeconds": 123,
"wastePercentage": 123,
"biggestInsight": {
"level": "StudentNotPresent",
"durationInSeconds": 1,
"wastePercentage": 50
}
},
"trend": {
"buckets": [
{
"startedAtTime": "2023-11-07T05:31:56Z",
"endedAtTime": "2023-11-07T05:31:56Z",
"totalDurationInSeconds": 1,
"wasteDurationInSeconds": 1,
"wastePercentage": 50,
"levels": [
{
"level": "StudentNotPresent",
"durationInSeconds": 1
}
]
}
]
},
"breakdown": {
"levels": [
{
"level": "StudentNotPresent",
"durationInSeconds": 1,
"wastePercentage": 50,
"subtypes": [
{
"insightType": "<string>",
"durationInSeconds": 1
}
]
}
]
}
}{
"error": "Bad request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized request",
"message": "Unauthorized request"
}{
"error": "Access forbidden",
"message": "Access forbidden"
}{
"error": "Object not found",
"message": "Object with ID {id} not found"
}{
"error": "Internal server error",
"message": "Internal server error"
}Insights
Get user insights overview
Retrieve aggregated overview (trend and breakdown) for a user within a date range
GET
/
insights
/
1.0
/
users
/
{userId}
/
overview
Get user insights overview
curl --request GET \
--url https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/insights/1.0/users/{userId}/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"summary": {
"totalDurationInSeconds": 123,
"totalWasteDurationInSeconds": 123,
"wastePercentage": 123,
"biggestInsight": {
"level": "StudentNotPresent",
"durationInSeconds": 1,
"wastePercentage": 50
}
},
"trend": {
"buckets": [
{
"startedAtTime": "2023-11-07T05:31:56Z",
"endedAtTime": "2023-11-07T05:31:56Z",
"totalDurationInSeconds": 1,
"wasteDurationInSeconds": 1,
"wastePercentage": 50,
"levels": [
{
"level": "StudentNotPresent",
"durationInSeconds": 1
}
]
}
]
},
"breakdown": {
"levels": [
{
"level": "StudentNotPresent",
"durationInSeconds": 1,
"wastePercentage": 50,
"subtypes": [
{
"insightType": "<string>",
"durationInSeconds": 1
}
]
}
]
}
}{
"error": "Bad request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized request",
"message": "Unauthorized request"
}{
"error": "Access forbidden",
"message": "Access forbidden"
}{
"error": "Object not found",
"message": "Object with ID {id} not found"
}{
"error": "Internal server error",
"message": "Internal server error"
}Authorizations
OAuth 2.0 client credentials flow. Contact timeback@trilogy.com to request credentials for your application.
Path Parameters
User ID to retrieve overview for
Query Parameters
Optional application ID to scope the overview to a specific application
Lower bound (inclusive) for time window (ISO 8601 date-time)
Upper bound (exclusive) for time window (ISO 8601 date-time)
IANA timezone name for local-day bucketing (e.g., Asia/Karachi)
⌘I