farmOS Assets API

Physical or logical farm assets (land, animals, equipment, plants, etc.)

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Farm Land & Asset Management BC-3540

Operations 35

GET /asset/animal List animal assets #
POST /asset/animal Create an animal asset #
GET /asset/animal/{id} Get an animal asset #
PATCH /asset/animal/{id} Update an animal asset #
DELETE /asset/animal/{id} Delete an animal asset #
GET /asset/land List land assets #
POST /asset/land Create a land asset #
GET /asset/land/{id} Get a land asset #
PATCH /asset/land/{id} Update a land asset #
DELETE /asset/land/{id} Delete a land asset #
GET /asset/plant List plant assets #
POST /asset/plant Create a plant asset #
GET /asset/plant/{id} Get a plant asset #
PATCH /asset/plant/{id} Update a plant asset #
DELETE /asset/plant/{id} Delete a plant asset #
GET /asset/equipment List equipment assets #
POST /asset/equipment Create an equipment asset #
GET /asset/equipment/{id} Get an equipment asset #
PATCH /asset/equipment/{id} Update an equipment asset #
DELETE /asset/equipment/{id} Delete an equipment asset #
GET /asset/structure List structure assets #
POST /asset/structure Create a structure asset #
GET /asset/structure/{id} Get a structure asset #
PATCH /asset/structure/{id} Update a structure asset #
DELETE /asset/structure/{id} Delete a structure asset #
GET /asset/sensor List sensor assets #
POST /asset/sensor Create a sensor asset #
GET /asset/sensor/{id} Get a sensor asset #
PATCH /asset/sensor/{id} Update a sensor asset #
DELETE /asset/sensor/{id} Delete a sensor asset #
GET /asset/group List group assets #
POST /asset/group Create a group asset #
GET /asset/group/{id} Get a group asset #
PATCH /asset/group/{id} Update a group asset #
DELETE /asset/group/{id} Delete a group asset #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/farmos:farmos-assets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

farmos-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'farmOS JSON: Assets API'
  description: 'The farmOS JSON:API provides access to farm assets, logs, plans, and records.

    It follows the JSON:API specification (https://jsonapi.org/) with UUID-based

    resource identifiers. The root endpoint at /api returns server metadata and

    available resource types. Resource endpoints follow the pattern

    /api/[entity-type]/[bundle].


    farmOS is an open-source farm management and record-keeping system built on

    Drupal. It supports self-hosted deployments and managed hosting via Farmier.'
  version: 2.x
  contact:
    name: farmOS Community
    url: https://farmos.org/community/
  license:
    name: GNU General Public License v2.0
    url: https://github.com/farmOS/farmOS/blob/main/LICENSE.txt
  termsOfService: https://farmos.org/
servers:
- url: https://{farmOS-host}/api
  description: Self-hosted farmOS instance
  variables:
    farmOS-host:
      default: example.farmos.net
      description: The hostname of your farmOS instance (self-hosted or Farmier-managed)
security:
- oauth2AuthorizationCode:
  - farm_manager
- oauth2ClientCredentials:
  - farm_manager
tags:
- name: Assets
  description: Physical or logical farm assets (land, animals, equipment, plants, etc.)
paths:
  /asset/animal:
    get:
      operationId: listAnimalAssets
      summary: List animal assets
      description: Returns a collection of animal assets.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of animal assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createAnimalAsset
      summary: Create an animal asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Animal asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/animal/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getAnimalAsset
      summary: Get an animal asset
      tags:
      - Assets
      responses:
        '200':
          description: An animal asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateAnimalAsset
      summary: Update an animal asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated animal asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteAnimalAsset
      summary: Delete an animal asset
      tags:
      - Assets
      responses:
        '204':
          description: Animal asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/land:
    get:
      operationId: listLandAssets
      summary: List land assets
      description: Returns a collection of land assets (fields, beds, paddocks, etc.).
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of land assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createLandAsset
      summary: Create a land asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Land asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/land/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getLandAsset
      summary: Get a land asset
      tags:
      - Assets
      responses:
        '200':
          description: A land asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateLandAsset
      summary: Update a land asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated land asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteLandAsset
      summary: Delete a land asset
      tags:
      - Assets
      responses:
        '204':
          description: Land asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/plant:
    get:
      operationId: listPlantAssets
      summary: List plant assets
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of plant assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createPlantAsset
      summary: Create a plant asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Plant asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/plant/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getPlantAsset
      summary: Get a plant asset
      tags:
      - Assets
      responses:
        '200':
          description: A plant asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updatePlantAsset
      summary: Update a plant asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated plant asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deletePlantAsset
      summary: Delete a plant asset
      tags:
      - Assets
      responses:
        '204':
          description: Plant asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/equipment:
    get:
      operationId: listEquipmentAssets
      summary: List equipment assets
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of equipment assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createEquipmentAsset
      summary: Create an equipment asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Equipment asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/equipment/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getEquipmentAsset
      summary: Get an equipment asset
      tags:
      - Assets
      responses:
        '200':
          description: An equipment asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateEquipmentAsset
      summary: Update an equipment asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated equipment asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteEquipmentAsset
      summary: Delete an equipment asset
      tags:
      - Assets
      responses:
        '204':
          description: Equipment asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/structure:
    get:
      operationId: listStructureAssets
      summary: List structure assets
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of structure assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createStructureAsset
      summary: Create a structure asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Structure asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/structure/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getStructureAsset
      summary: Get a structure asset
      tags:
      - Assets
      responses:
        '200':
          description: A structure asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateStructureAsset
      summary: Update a structure asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated structure asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteStructureAsset
      summary: Delete a structure asset
      tags:
      - Assets
      responses:
        '204':
          description: Structure asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/sensor:
    get:
      operationId: listSensorAssets
      summary: List sensor assets
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of sensor assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createSensorAsset
      summary: Create a sensor asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Sensor asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/sensor/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getSensorAsset
      summary: Get a sensor asset
      tags:
      - Assets
      responses:
        '200':
          description: A sensor asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateSensorAsset
      summary: Update a sensor asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated sensor asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteSensorAsset
      summary: Delete a sensor asset
      tags:
      - Assets
      responses:
        '204':
          description: Sensor asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /asset/group:
    get:
      operationId: listGroupAssets
      summary: List group assets
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/FilterField'
      - $ref: '#/components/parameters/SortField'
      - $ref: '#/components/parameters/IncludeRelated'
      responses:
        '200':
          description: A collection of group assets
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetCollection'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createGroupAsset
      summary: Create a group asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '201':
          description: Group asset created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /asset/group/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getGroupAsset
      summary: Get a group asset
      tags:
      - Assets
      responses:
        '200':
          description: A group asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateGroupAsset
      summary: Update a group asset
      tags:
      - Assets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
      responses:
        '200':
          description: Updated group asset
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssetResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteGroupAsset
      summary: Delete a group asset
      tags:
      - Assets
      responses:
        '204':
          description: Group asset deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AssetResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AssetData'
        included:
          type: array
          items:
            type: object
        links:
          $ref: '#/components/schemas/JsonApiLinks'
    AssetCollection:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AssetData'
        included:
          type: array
          items:
            type: object
        links:
          type: object
          properties:
            self:
              type: string
              format: uri
            next:
              type: string
              format: uri
            prev:
              type: string
              format: uri
        meta:
          type: object
          properties:
            count:
              type: integer
              description: Total number of matching resources
    JsonApiLinks:
      type: object
      properties:
        self:
          type: string
          format: uri
        related:
          type: string
          format: uri
    JsonApiRelationshipData:
      type: object
      properties:
        type:
          type: string
        id:
          type: string
          format: uuid
    AssetAttributes:
      type: object
      description: Common attributes shared by all asset types
      properties:
        drupal_internal__id:
          type: integer
          readOnly: true
          description: Internal Drupal integer ID (not for external use)
        name:
          type: string
          description: Asset name
        status:
          type: string
          enum:
          - active
          - archived
          description: Asset status (use archived to retire an asset)
        archived:
          type: boolean
          description: Whether the asset is archived (4.x and later)
        notes:
          type: object
          description: Free-form notes (rich text)
          properties:
            value:
              type: string
            format:
              type: string
        is_location:
          type: boolean
          description: Whether this asset can act as a location for other assets/logs
        is_fixed:
          type: boolean
          description: Whether the asset has a fixed geometry (does not move)
        intrinsic_geometry:
          type: string
          description: WKT geometry string for fixed-location assets
        geometry:
          type: string
          description: Computed current geometry (WKT)
        location:
          type: array
          description: Computed current location assets
          items:
            type: object
        nickname:
          type: array
          description: Alternative names/nicknames for the asset
          items:
            type: string
        id_tag:
          type: array
          description: Physical identification tags
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              location:
                type: string
        image:
          type: array
          description: Attached images
          items:
            type: object
        file:
          type: array
          description: Attached files
          items:
            type: object
        created:
          type: integer
          description: Unix timestamp when the record was created
          readOnly: true
        changed:
          type: integer
          description: Unix timestamp when the record was last modified
          readOnly: true
    JsonApiRelationship:
      type: object
      properties:
        data:
          oneOf:
          - $ref: '#/components/schemas/JsonApiRelationshipData'
          - type: array
            items:
              $ref: '#/components/schemas/JsonApiRelationshipData'
          - type:
            - object
            - 'null'
            maxProperties: 0
        links:
          $ref: '#/components/schemas/JsonApiLinks'
    JsonApiError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
    AssetRelationships:
      type: object
      description: Common relationships shared by all asset types
      properties:
        parent:
          $ref: '#/components/schemas/JsonApiRelationship'
        location:
          $ref: '#/components/schemas/JsonApiRelationship'
        image:
          $ref: '#/components/schemas/JsonApiRelationship'
        file:
          $ref: '#/components/schemas/JsonApiRelationship'
    AssetRequest:
      type: object
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/AssetData'
    AssetData:
      type: object
      required:
      - type
      - attributes
      properties:
        type:
          type: string
          description: JSON:API resource type (e.g., asset--animal, asset--land)
          example: asset--animal
        id:
          type: string
          format: uuid
          readOnly: true
        attributes:
          $ref: '#/components/schemas/AssetAttributes'
        relationships:
          $ref: '#/components/schemas/AssetRelationships'
        links:
          $ref: '#/components/schemas/JsonApiLinks'
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      description: UUID of the resource
      schema:
        type: string
        format: uuid
      example: 3f1c2b4a-5d6e-7890-abcd-ef1234567890
    PageSize:
      name: page[limit]
      in: query
      description: Number of results per page
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 50
    FilterField:
      name: filter[field]
      in: query
      description: 'JSON:API filter parameter. Use dot notation for nested fields.

        Example: filter[status]=pending or filter[timestamp][value]=1234567890&filter[timestamp][operator]=>=

        '
      schema:
        type: string
    SortField:
      name: sort
      in: query
      description: 'Comma-separated list of fields to sort by. Prefix with - for descending.

        Example: sort=-timestamp,name

        '
      schema:
        type: string
    PageOffset:
      name: page[offset]
      in: query
      description: Offset for pagination
      schema:
        type: integer
        minimum: 0
        default: 0
    IncludeRelated:
      name: include
      in: query
      description: 'Comma-separated list of related resources to include in the response.

        Example: include=asset,quantity

        '
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication required or token expired
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JsonApiError'
    UnprocessableEntity:
      description: Validation error
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JsonApiError'
    NotFound:
      description: Resource not found
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JsonApiError'
  securitySchemes:
    oauth2AuthorizationCode:
      type: oauth2
      description: 'OAuth2 Authorization Code grant for third-party integrations. Users

        authorize the client application to access their farmOS data.

        '
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize
          tokenUrl: /oauth/token
          scopes:
            farm_manager: Full management access to the farm
            farm_worker: Worker-level access to farm records
            farm_viewer: Read-only access to farm records
    oauth2ClientCredentials:
      type: oauth2
      description: 'OAuth2 Client Credentials grant for machine-to-machine authentication.

        Used when no user account is required.

        '
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            farm_manager: Full management access to the farm
            farm_worker: Worker-level access to farm records
            farm_viewer: Read-only access to farm records
externalDocs:
  description: farmOS API Documentation
  url: https://farmos.org/development/api/