Pagination and limits
Lists
Routes that list things (a class's students, activities, users...) return:
{ "items": [ { "...": "..." } ], "total": 137 }total is how many match the query, not just this page. Query parameters:
| Parameter | Default | Meaning |
|---|---|---|
limite | 50 | Items per page, from 1 to 200. |
deslocamento | 0 | How many items to skip (up to 100,000). |
busca | — | Free text (up to 100 characters); filters by name and similar fields, case-insensitive. |
inativos | false | true includes deactivated items (by default only active ones). |
Some lists have extra filters (for example de and ate, YYYY-MM-DD dates, on activities); see the reference for each route.
To read everything, advance deslocamento by limite until deslocamento >= total:
async function all(path, token) {
const items = []
for (let deslocamento = 0, total = Infinity; deslocamento < total; deslocamento += 200) {
const r = await fetch(`${API}${path}?limite=200&deslocamento=${deslocamento}`, { headers: { Authorization: `Bearer ${token}` } })
if (!r.ok) throw new Error(`HTTP ${r.status}`)
const page = await r.json()
items.push(...page.items)
total = page.total
}
return items
}def all_items(path, token):
items, deslocamento, total = [], 0, None
while total is None or deslocamento < total:
r = requests.get(f"{API}{path}", params={"limite": 200, "deslocamento": deslocamento},
headers={"Authorization": f"Bearer {token}"})
r.raise_for_status()
page = r.json()
items += page["items"]
total = page["total"]
deslocamento += 200
return itemsOrder across pages is fixed while the data does not change. If someone adds or deactivates items while you read, a page may repeat or skip an item; for synchronization, read the whole list and compare on your side.
Rate limits
Each route has its own limit, per origin (IP address), in a time window. Over the limit: 429 RATE_LIMITED, with retryAfterSeg and the Retry-After header. The limit appears in each operation of the reference (Rate limit field). Quick reference:
| Kind of route | Limit (per origin) |
|---|---|
| Sign in, renew and sign out | 20 per minute (login), 60 per minute (refresh, logout) |
| CSV imports | 20 per minute |
| Bulk creation (users, bindings, enrollments) | 120 per minute |
| Evolution queries | 300 per minute |
| App flows (attendance, QR) | 600 per minute |
| Password recovery, invitation and first access | 5 to 10 per minute |
Routes without a listed limit have no limit of their own, but handle 429 on any route. Since the limit is per origin, several systems behind the same outbound address share the same quota.
Size
- The JSON body of a request can be up to 100 KB; above that the response is
413 PAYLOAD_TOO_LARGE. - CSV imports: up to 500 lines and 90,000 characters per file; larger files must be split. See Synchronize students.