---
title: "Get Records"
method: GET
path: "/v1/farm/{farm_id}/records"
tags: ["records"]
---

# Get Records

`GET /v1/farm/{farm_id}/records`

## Request

- Base URL: `https://api.ranch.bot`
- URL: `https://api.ranch.bot/v1/farm/{farm_id}/records`
- Auth: HTTP bearer

Current records HTTP operation. External credential scopes: read:records. Minimum farm role: READER. Pagination accepts integer skip and take; set both explicitly. An omitted value passes through to the data query. Collection property names differ by resource; use the response schema. Production rate limit: 100 requests per 15-minute window per device account, 1000 per browser session, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429. An animal_id or group_id target and/or applied_from/applied_before time bound returns filtered history with skip 0 and take 50 by default, up to 200 records per page. The response always lists same-farm animal and group attachment ids in records[].animals and records[].groups; only the current group names in match_context.current_groups and scope.authorized_groups require include_group_context. Scoped credentials: animal_id also needs read:animals, group_id also needs read:groups, and include_group_context needs both.

## Path parameters

- `farm_id` string, uuid, required

## Query parameters

- `skip` integer
- `take` integer
- `type` 'FEED' | 'GENETIC' | 'HEALTH' | 'MOVEMENT' | 'OTHER'
- `animal_id` string, uuid
- `group_id` string, uuid
- `include_group_context` boolean
- `applied_from` string, date-time
- `applied_before` string, date-time

## Response `200`

Success

- object
  - `total` number, required
  - `records` object[], required
    - `type` 'OTHER' | 'FEED' | 'GENETIC' | 'HEALTH' | 'MOVEMENT', required
    - `id` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `name` string, required
    - `is_active` boolean, required
    - `description` string, nullable, required
    - `applied_at` string, date-time, required
    - `record_items` RecordItem[], required
      - `id` string, nullable, required
      - `description` string, nullable, required
      - `is_active` boolean, nullable, required
      - `metadata` unknown, required
      - `name` string, nullable, required
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
    - `files` File[], required
      - `id` string, nullable, required
      - `is_active` boolean, nullable, required
      - `mime_type` string, nullable, required
      - `name` string, nullable, required
      - `size` integer, nullable, required
      - `url` string, nullable, required
      - `created_at` string, date-time, nullable, required
      - `updated_at` string, date-time, nullable, required
    - `animals` object[]
      - `id` string
    - `groups` object[]
      - `id` string
    - `match_context` object
      - `direct_animal` boolean
      - `direct_group` boolean
      - `current_groups` object[]
        - `id` string
        - `name` string
        - `membership_at_event` 'unknown'
  - `scope` object
    - `farm_id` string
    - `animal_id` string, nullable
    - `group_id` string, nullable
    - `include_group_context` boolean
    - `type` string, nullable
    - `applied_from` string, nullable
    - `applied_before` string, nullable
    - `authorized_groups` object[]
      - `id` string
      - `name` string
    - `dataset` string
  - `pagination` object
    - `skip` integer, required
    - `take` integer, nullable, required
    - `returned` integer, required
    - `has_more` boolean, required
    - `next_skip` integer, nullable, required

## Other responses

- `400`: Request validation failed.
- `401`: Missing/invalid authentication or insufficient farm role.
- `403`: Missing required scope or credential type is disallowed.
- `404`: Resource or active farm membership not found.
- `429`: Rate limit exceeded. Retry after the indicated delay.
- `500`: Unexpected server failure.

---

[API](https://skmtc.dev/ranch/apis/ranch-bot-http-api.md) · [All operations](https://skmtc.dev/ranch/apis/ranch-bot-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranch/apis/ranch-bot-http-api/revisions/24109d33fa02?raw)
