Skip to main content
GET
List attendance records

Authorizations

Authorization
string
header
required

Access token issued by POST /sessions and associated with a valid server-side session.

Query Parameters

company_id
string<uuid>
required

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_id
string<uuid>
required

School UUID.

room_id
string<uuid>[]

Alias combined with room_ids. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.

room_ids
string<uuid>[]

Optional room UUIDs; combined with room_id. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.

student_id
string<uuid>[]

Alias combined with student_ids. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.

student_ids
string<uuid>[]

Optional student UUIDs; combined with student_id. Accepts repeated query parameters or comma-separated values; empty entries are dropped and surrounding whitespace is trimmed.

date_from
string<date>

Inclusive start date in YYYY-MM-DD. Both dates required unless last_n_days is supplied.

date_to
string<date>

Inclusive end date in YYYY-MM-DD. Both dates required unless last_n_days is supplied.

last_n_days
integer

Positive rolling-window length; cannot be combined with either explicit date bound.

Required range: x >= 1
min_hours
number
default:2

Minimum hours attended per record. Use zero to include records below the historical two-hour threshold.

Required range: x >= 0
fields
enum<string>[]

Select 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.

Available options:
attendance_id,
student_id,
date,
room_id,
room_name,
hours_attended,
sign_in_time,
sign_out_time
sort_by
enum<string>

Aggregate view only; sending sort_by without group_by returns 400. Default group_asc.

Available options:
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
group_by
enum<string>

Select an aggregate representation; metrics must also be supplied.

Available options:
student_id,
room_id,
room_name,
date,
month
metrics
enum<string>[]

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.

Available options:
attendance_days,
total_records,
sum_hours,
avg_hours,
distinct_students
limit
integer
default:50

Aggregate result limit. Defaults to 50 and clamps values above 200 to 200. Zero and negative values use the default.

page
integer
default:1

One-based page number. Row view only.

Required range: x >= 1
per_page
integer
default:100

Items per page; values greater than 200 are clamped to 200. Row view only.

Required range: x >= 1

Response

Successful response.

A sparse row containing only the selected fields. Default fields: student_id, date, room_id, room_name, hours_attended.

attendance_id
string

Attendance id.

student_id
string

Student id.

date
string<date>
room_id
string | null
room_name
string
hours_attended
number
sign_in_time
string

Local display time in h:mm AM/PM format, or an empty string when unavailable.

Examples:

"9:15 AM"

""

sign_out_time
string

Local display time in h:mm AM/PM format, or an empty string when unavailable.

Examples:

"9:15 AM"

""