curl --request GET \
--url https://{host}/primula/api/v3/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/primula/api/v3/messages', 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://{host}/primula/api/v3/messages",
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://{host}/primula/api/v3/messages"
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://{host}/primula/api/v3/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/messages")
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{
"school_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"captured_through": "2023-11-07T05:31:56Z",
"next_cursor": "<string>",
"has_more": true,
"messages": [
{
"message_id": "<string>",
"school_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"student_id": "<string>",
"student_name": "<string>",
"student_status": "<string>",
"channel": "office_chat",
"text": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"posted_at_utc": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"sender_type": "<string>",
"sender_id": "<string>",
"sender_name": "<string>",
"sender_role": "<string>",
"recipient_carer_id": "<string>"
}
]
}Incrementally list captured Procare conversations
Returns one incremental page for a school assigned to the authenticated session. Selection, ordering, and pagination use posted_at_utc, and messages are returned from oldest to newest across page boundaries. At the start of a window, captured_through is set to the latest available captured_at, stored in the cursor, and used to exclude messages captured later from every page in that window.
Exactly one of posted_since and cursor is required. Always send the returned next_cursor on the following request, including after has_more becomes false. When cursor is provided, it must be the only query parameter; requests containing any additional query parameter return 400 Bad Request. A completed window advances to the last posted_at_utc_id actually returned; an empty window keeps its prior lower bound.
curl --request GET \
--url https://{host}/primula/api/v3/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/primula/api/v3/messages', 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://{host}/primula/api/v3/messages",
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://{host}/primula/api/v3/messages"
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://{host}/primula/api/v3/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/messages")
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{
"school_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"captured_through": "2023-11-07T05:31:56Z",
"next_cursor": "<string>",
"has_more": true,
"messages": [
{
"message_id": "<string>",
"school_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"student_id": "<string>",
"student_name": "<string>",
"student_status": "<string>",
"channel": "office_chat",
"text": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"posted_at_utc": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"sender_type": "<string>",
"sender_id": "<string>",
"sender_name": "<string>",
"sender_role": "<string>",
"recipient_carer_id": "<string>"
}
]
}Authorizations
Access token issued by POST /sessions and associated with a valid server-side session.
Query Parameters
Company UUID. Required on the first request and stored in subsequent cursors.
School UUID. Required on the first request, stored in subsequent cursors, and always checked against the authenticated session.
office_chat, classroom_chat, all Exclusive RFC3339 posted_at_utc lower bound for the first request. Mutually exclusive with cursor.
Opaque cursor returned by the preceding response. Contains all parameters required by the next request and must be the only query parameter when provided.
active, all 1 <= x <= 500Response
Incremental page of captured conversations.