Get classroom attendance
curl --request GET \
--url https://{host}/primula/api/v3/classroom_attendance \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/classroom_attendance"
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/classroom_attendance', 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/classroom_attendance",
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/classroom_attendance"
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/classroom_attendance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/classroom_attendance")
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{
"date": "<string>",
"school_id": "<string>",
"school_time_zone": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"classrooms": [
{
"room_id": "<string>",
"room_name": "<string>",
"signed_in_count": 123,
"absent_count": 123,
"not_arrived_count": 123,
"students": [
{
"student_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"state": "<string>",
"sign_in_at": "2023-11-07T05:31:56Z"
}
]
}
]
}Classroom attendance
Get classroom attendance
Scoped to company_id; the handler does not restrict this read to the session school assignments. Daily classroom counters and student states, with their synchronization timestamp. date defaults to the current server date. Returns 404 if no snapshot exists.
GET
/
classroom_attendance
Get classroom attendance
curl --request GET \
--url https://{host}/primula/api/v3/classroom_attendance \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/primula/api/v3/classroom_attendance"
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/classroom_attendance', 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/classroom_attendance",
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/classroom_attendance"
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/classroom_attendance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/classroom_attendance")
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{
"date": "<string>",
"school_id": "<string>",
"school_time_zone": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"classrooms": [
{
"room_id": "<string>",
"room_name": "<string>",
"signed_in_count": 123,
"absent_count": 123,
"not_arrived_count": 123,
"students": [
{
"student_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"state": "<string>",
"sign_in_at": "2023-11-07T05:31:56Z"
}
]
}
]
}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.
Snapshot calendar date; defaults to today.