curl --request GET \
--url https://{host}/primula/api/v3/attendances \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/attendances"
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/attendances', 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/attendances",
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/attendances"
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/attendances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/attendances")
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[
{
"student_id": "33333333-3333-4333-8333-333333333333",
"date": "2026-01-15",
"room_id": "55555555-5555-4555-8555-555555555555",
"room_name": "Example classroom",
"hours_attended": 6
}
]List attendance records
Scoped to company_id; the handler does not restrict this read to the session school assignments. Provide date_from AND date_to, or a positive last_n_days; mixing them returns 400. Defaults min_hours to 2; records below that threshold are excluded. room_id/room_ids and student_id/student_ids are merged. Row responses are sparse Attendance objects and support fields and pagination; sort_by on rows returns 400. group_by plus metrics selects nested AttendanceAggregate rows with a limit instead of pagination. Room/student filter counts, when positive, are returned in headers.
curl --request GET \
--url https://{host}/primula/api/v3/attendances \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/attendances"
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/attendances', 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/attendances",
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/attendances"
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/attendances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/attendances")
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[
{
"student_id": "33333333-3333-4333-8333-333333333333",
"date": "2026-01-15",
"room_id": "55555555-5555-4555-8555-555555555555",
"room_name": "Example classroom",
"hours_attended": 6
}
]Authorizations
Access token issued by POST /sessions and associated with a valid server-side session.
Query Parameters
Company UUID. Must equal the authenticated session company when that session has a company assigned; the equality check is skipped for sessions without one.
School UUID.
Alias combined with room_ids. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
Optional room UUIDs; combined with room_id. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
Alias combined with student_ids. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
Optional student UUIDs; combined with student_id. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
Inclusive start date in YYYY-MM-DD. Both dates required unless last_n_days is supplied.
Inclusive end date in YYYY-MM-DD. Both dates required unless last_n_days is supplied.
Positive rolling-window length; cannot be combined with either explicit date bound.
x >= 1Minimum hours attended per record. Use zero to include records below the historical two-hour threshold.
x >= 0Select response properties. Unknown names return 400. Default: student_id, date, room_id, room_name, hours_attended. Row view only. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
attendance_id, student_id, date, room_id, room_name, hours_attended, sign_in_time, sign_out_time Aggregate view only; sending sort_by without group_by returns 400. Default group_asc.
group_asc, group_desc, attendance_days_asc, attendance_days_desc, total_records_asc, total_records_desc, sum_hours_asc, sum_hours_desc, avg_hours_asc, avg_hours_desc, distinct_students_asc, distinct_students_desc Select an aggregate representation; metrics must also be supplied.
student_id, room_id, room_name, date, month Metrics to calculate; required with group_by and invalid without it. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.
attendance_days, total_records, sum_hours, avg_hours, distinct_students Aggregate result limit. Defaults to 50 and clamps values above 200 to 200. Zero and negative values use the default.
One-based page number. Row view only.
x >= 1Items per page; values greater than 200 are clamped to 200. Row view only.
x >= 1Response
Successful response.
- Option 1 · object[]
- Option 2 · object[]
A sparse row containing only the selected fields. Default fields: student_id, date, room_id, room_name, hours_attended.
Attendance id.
Student id.
Local display time in h:mm AM/PM format, or an empty string when unavailable.
"9:15 AM"
""
Local display time in h:mm AM/PM format, or an empty string when unavailable.
"9:15 AM"
""