# GET /api/v2/absences

List absences

- MCP id: absences.index
- Scope: api:read:absences
- Permission: absences::manage
- Rate cost: 1 unit, read bucket. `view=detail` makes it 3. Adds: each include +1.
- Cache-Control: private, no-store

Returns absences (the periods employees were away from work), newest first by `start`.

An absence with a `null` `end` is still running. There is no `year` parameter and no `ongoing` parameter: filter a year as `filter[start][gte]=2026-01-01T00:00:00Z&filter[start][lte]=2026-12-31T23:59:59Z`, and the running absences as `filter[end][null]=true`. There is no `q` parameter either: an absence has no text of its own.

## Parameters
- view (string, optional): Which field set to render.
- per_page (integer 1 to 100, optional): Rows per page. At most 25 when `include` names a to-many relation; a larger value is 400 invalid-query-parameter.
- cursor (string, optional): Opaque keyset cursor from a previous page's links.next. Never construct one by hand.
- page (integer 1 to 1000, optional): Opt in to page-number paging: 1-based, at most 1000. Omit it, the default, to page by opaque cursor, which is what links.next hands you. Cannot be combined with cursor. Published only on collections that count their rows on every request.
- filter[created_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Creation timestamp. Pair with `sort=id` for a stable full export. Operators: = gte lt.
- filter[end] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When the absence ends. `null` selects the absences that are still running. Operators: = gte lte null.
- filter[manager_id] (integer, optional): Manager who filed or approved the absence. `null` selects absences with no manager recorded. Operators: = in null.
- filter[start] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When the absence begins. Operators: = gte lte.
- filter[updated_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Last-write timestamp. Use for incremental sync. Operators: = gte lt.
- filter[user_id] (integer, optional): Whose absence this is. Accepts the literal `me`. Naming another user requires the `absences::manage` permission. Operators: = in.
- sort (string, optional): Up to three keys, comma-separated, each optionally prefixed with `-` for descending.
- include (string, optional): Comma-separated names to inline, at most five.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-None-Match (header, optional): The ETag a read is conditional on. A match is answered 304 with no body.

## Response 200
- id (integer, required): Unique identifier.
- user_id (integer, required): The employee this absence is for. Writing it requires the `absences::manage` permission.
- user (Ref or UserSummary, required): The employee the absence is for. Renders as an `{"id": N}` reference unless expanded, and stays a reference when the employee has since been deleted.
- manager_id (integer or null, required): Manager who filed or approved the absence, or `null` when none was recorded. The foreign key nulls on delete, so removing the manager leaves the absence behind unattributed.
- manager (Ref or UserSummary or null, required): The manager who filed or approved the absence; absent when none was recorded.
- start (timestamp (YYYY-MM-DDThh:mm:ssZ), required): When the absence begins. RFC 3339 UTC.
- end (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): When the absence ends, or `null` while it is still running. An ongoing absence reaches through now everywhere it is read (planning capacity and reporting both count it), and that reach is uncapped, so an absence nobody closed keeps consuming capacity. RFC 3339 UTC.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- links (AbsenceLinks, required)
  - self (url, required): The canonical URI of this record.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 304 : Not modified.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -G \
  'https://<your-url>/api/v2/absences' \
  --data-urlencode 'filter[end][null]=true' \
  --data-urlencode 'include=user' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'
```
