Send session heartbeat
curl --request POST \
--url https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventTime": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat"
payload = { "eventTime": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventTime: '2023-11-07T05:31:56Z'})
};
fetch('https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat', 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/events/1.0/sessions/{sessionId}/heartbeat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventTime' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat"
payload := strings.NewReader("{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Invalid data provided",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Resource not found",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Internal server error",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
}
}Caliper
Send session heartbeat
Lightweight endpoint for browser clients to signal that a session is still active.
Extends the session’s endedAtTime to the current time.
Only works for sessions with requiresHeartbeat: true in their extensions.
POST
/
events
/
1.0
/
sessions
/
{sessionId}
/
heartbeat
Send session heartbeat
curl --request POST \
--url https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventTime": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat"
payload = { "eventTime": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventTime: '2023-11-07T05:31:56Z'})
};
fetch('https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat', 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/events/1.0/sessions/{sessionId}/heartbeat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventTime' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat"
payload := strings.NewReader("{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.dev.timeback.com/events/1.0/sessions/{sessionId}/heartbeat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTime\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Invalid data provided",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Resource not found",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
}
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "Internal server error",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
}
}Authorizations
OAuth 2.0 client credentials flow. Contact timeback@trilogy.com to request credentials for your application.
Path Parameters
Caliper session IRI (URL-encoded if necessary) An IRI can be either:
- A URI (any valid URI scheme)
- A URN in the format "urn:uuid:" where UUID is a version 4 UUID
Pattern:
^[a-z][a-z0-9+.-]*:Body
application/json
ISO 8601 timestamp from the consumer indicating when the heartbeat occurred
Response
Heartbeat successfully processed
⌘I