openapi: 3.0.3 info: title: farmOS JSON: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/ externalDocs: description: farmOS API Documentation url: https://farmos.org/development/api/ 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: Server Info description: Server metadata and available resource types - name: Assets description: Physical or logical farm assets (land, animals, equipment, plants, etc.) - name: Logs description: Farm activity records (activities, observations, inputs, harvests, etc.) - name: Plans description: Farm planning records - name: Quantities description: Measurement quantities associated with logs - name: Taxonomy description: Taxonomy term resources (categories, types, units) paths: /: get: operationId: getServerInfo summary: Get server metadata description: | Returns metadata about the farmOS server, including authenticated user information, farm details (name, URL, version, measurement system), and available resource types with their endpoint URLs. tags: - Server Info responses: '200': description: Server metadata content: application/vnd.api+json: schema: $ref: '#/components/schemas/ServerInfo' '401': $ref: '#/components/responses/Unauthorized' # ── ASSET ENDPOINTS ─────────────────────────────────────────────────────── /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' # ── LOG ENDPOINTS ────────────────────────────────────────────────────────── /log/activity: get: operationId: listActivityLogs summary: List activity logs description: Returns a collection of activity logs (general catch-all log type). tags: [Logs] 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 activity logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createActivityLog summary: Create an activity log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Activity log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/activity/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getActivityLog summary: Get an activity log tags: [Logs] responses: '200': description: An activity log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateActivityLog summary: Update an activity log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated activity log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteActivityLog summary: Delete an activity log tags: [Logs] responses: '204': description: Activity log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/observation: get: operationId: listObservationLogs summary: List observation logs tags: [Logs] 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 observation logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createObservationLog summary: Create an observation log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Observation log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/observation/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getObservationLog summary: Get an observation log tags: [Logs] responses: '200': description: An observation log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateObservationLog summary: Update an observation log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated observation log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteObservationLog summary: Delete an observation log tags: [Logs] responses: '204': description: Observation log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/input: get: operationId: listInputLogs summary: List input logs description: Records of resources put into farm assets (e.g., fertilizer, feed). tags: [Logs] 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 input logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createInputLog summary: Create an input log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Input log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/input/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getInputLog summary: Get an input log tags: [Logs] responses: '200': description: An input log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateInputLog summary: Update an input log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated input log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteInputLog summary: Delete an input log tags: [Logs] responses: '204': description: Input log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/harvest: get: operationId: listHarvestLogs summary: List harvest logs tags: [Logs] 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 harvest logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createHarvestLog summary: Create a harvest log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Harvest log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/harvest/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getHarvestLog summary: Get a harvest log tags: [Logs] responses: '200': description: A harvest log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateHarvestLog summary: Update a harvest log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated harvest log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteHarvestLog summary: Delete a harvest log tags: [Logs] responses: '204': description: Harvest log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/seeding: get: operationId: listSeedingLogs summary: List seeding logs tags: [Logs] 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 seeding logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createSeedingLog summary: Create a seeding log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Seeding log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/seeding/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getSeedingLog summary: Get a seeding log tags: [Logs] responses: '200': description: A seeding log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateSeedingLog summary: Update a seeding log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated seeding log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteSeedingLog summary: Delete a seeding log tags: [Logs] responses: '204': description: Seeding log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/transplanting: get: operationId: listTransplantingLogs summary: List transplanting logs tags: [Logs] 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 transplanting logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createTransplantingLog summary: Create a transplanting log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Transplanting log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/transplanting/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getTransplantingLog summary: Get a transplanting log tags: [Logs] responses: '200': description: A transplanting log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateTransplantingLog summary: Update a transplanting log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated transplanting log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteTransplantingLog summary: Delete a transplanting log tags: [Logs] responses: '204': description: Transplanting log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/maintenance: get: operationId: listMaintenanceLogs summary: List maintenance logs tags: [Logs] 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 maintenance logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createMaintenanceLog summary: Create a maintenance log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Maintenance log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/maintenance/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getMaintenanceLog summary: Get a maintenance log tags: [Logs] responses: '200': description: A maintenance log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateMaintenanceLog summary: Update a maintenance log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated maintenance log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteMaintenanceLog summary: Delete a maintenance log tags: [Logs] responses: '204': description: Maintenance log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/medical: get: operationId: listMedicalLogs summary: List medical logs description: Animal health records, veterinary visits, and medical procedures. tags: [Logs] 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 medical logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createMedicalLog summary: Create a medical log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Medical log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/medical/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getMedicalLog summary: Get a medical log tags: [Logs] responses: '200': description: A medical log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateMedicalLog summary: Update a medical log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated medical log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteMedicalLog summary: Delete a medical log tags: [Logs] responses: '204': description: Medical log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/birth: get: operationId: listBirthLogs summary: List birth logs description: Animal birth records. tags: [Logs] 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 birth logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createBirthLog summary: Create a birth log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Birth log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/birth/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getBirthLog summary: Get a birth log tags: [Logs] responses: '200': description: A birth log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateBirthLog summary: Update a birth log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated birth log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteBirthLog summary: Delete a birth log tags: [Logs] responses: '204': description: Birth log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /log/lab_test: get: operationId: listLabTestLogs summary: List lab test logs description: Sample analysis results with measurement data and file attachments. tags: [Logs] 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 lab test logs content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createLabTestLog summary: Create a lab test log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '201': description: Lab test log created content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /log/lab_test/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getLabTestLog summary: Get a lab test log tags: [Logs] responses: '200': description: A lab test log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateLabTestLog summary: Update a lab test log tags: [Logs] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogRequest' responses: '200': description: Updated lab test log content: application/vnd.api+json: schema: $ref: '#/components/schemas/LogResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteLabTestLog summary: Delete a lab test log tags: [Logs] responses: '204': description: Lab test log deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' # ── PLAN ENDPOINTS ───────────────────────────────────────────────────────── /plan/plan: get: operationId: listPlans summary: List plans description: Returns a collection of farm plans. tags: [Plans] 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 plans content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createPlan summary: Create a plan tags: [Plans] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanRequest' responses: '201': description: Plan created content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /plan/plan/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getPlan summary: Get a plan tags: [Plans] responses: '200': description: A plan content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updatePlan summary: Update a plan tags: [Plans] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanRequest' responses: '200': description: Updated plan content: application/vnd.api+json: schema: $ref: '#/components/schemas/PlanResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deletePlan summary: Delete a plan tags: [Plans] responses: '204': description: Plan deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' # ── TAXONOMY ENDPOINTS ───────────────────────────────────────────────────── /taxonomy_term/plant_type: get: operationId: listPlantTypes summary: List plant type taxonomy terms tags: [Taxonomy] parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageOffset' responses: '200': description: A collection of plant type taxonomy terms content: application/vnd.api+json: schema: $ref: '#/components/schemas/TaxonomyCollection' '401': $ref: '#/components/responses/Unauthorized' /taxonomy_term/animal_type: get: operationId: listAnimalTypes summary: List animal type taxonomy terms tags: [Taxonomy] parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageOffset' responses: '200': description: A collection of animal type taxonomy terms content: application/vnd.api+json: schema: $ref: '#/components/schemas/TaxonomyCollection' '401': $ref: '#/components/responses/Unauthorized' /taxonomy_term/log_category: get: operationId: listLogCategories summary: List log category taxonomy terms tags: [Taxonomy] parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageOffset' responses: '200': description: A collection of log category taxonomy terms content: application/vnd.api+json: schema: $ref: '#/components/schemas/TaxonomyCollection' '401': $ref: '#/components/responses/Unauthorized' /taxonomy_term/unit: get: operationId: listUnits summary: List unit taxonomy terms tags: [Taxonomy] parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageOffset' responses: '200': description: A collection of unit taxonomy terms content: application/vnd.api+json: schema: $ref: '#/components/schemas/TaxonomyCollection' '401': $ref: '#/components/responses/Unauthorized' # ── QUANTITY ENDPOINTS ───────────────────────────────────────────────────── /quantity/standard: get: operationId: listStandardQuantities summary: List standard quantities description: Measurement quantities associated with logs. tags: [Quantities] 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 standard quantities content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityCollection' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createStandardQuantity summary: Create a standard quantity tags: [Quantities] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityRequest' responses: '201': description: Standard quantity created content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /quantity/standard/{id}: parameters: - $ref: '#/components/parameters/ResourceId' get: operationId: getStandardQuantity summary: Get a standard quantity tags: [Quantities] responses: '200': description: A standard quantity content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateStandardQuantity summary: Update a standard quantity tags: [Quantities] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityRequest' responses: '200': description: Updated standard quantity content: application/vnd.api+json: schema: $ref: '#/components/schemas/QuantityResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteStandardQuantity summary: Delete a standard quantity tags: [Quantities] responses: '204': description: Standard quantity deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' # ── COMPONENTS ──────────────────────────────────────────────────────────────── components: 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 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 PageOffset: name: page[offset] in: query description: Offset for pagination schema: type: integer minimum: 0 default: 0 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 IncludeRelated: name: include in: query description: | Comma-separated list of related resources to include in the response. Example: include=asset,quantity schema: type: string schemas: ServerInfo: type: object description: farmOS server metadata properties: meta: type: object properties: links: type: object description: Available resource type endpoints additionalProperties: type: object properties: href: type: string format: uri farm: type: object description: Farm details properties: name: type: string description: Farm name url: type: string format: uri description: Farm URL version: type: string description: farmOS version string system_of_measurement: type: string enum: [metric, us] description: Measurement system user: type: object description: Authenticated user details properties: id: type: string format: uuid type: type: string 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 JsonApiRelationship: type: object properties: data: oneOf: - $ref: '#/components/schemas/JsonApiRelationshipData' - type: array items: $ref: '#/components/schemas/JsonApiRelationshipData' - nullable: true type: object maxProperties: 0 links: $ref: '#/components/schemas/JsonApiLinks' 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 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' 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' AssetRequest: type: object required: - data properties: data: $ref: '#/components/schemas/AssetData' 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 LogAttributes: type: object description: Common attributes shared by all log types properties: drupal_internal__id: type: integer readOnly: true name: type: string description: Log name/title timestamp: type: integer description: Unix timestamp of the log event status: type: string enum: [pending, done, abandoned] description: Log completion status notes: type: object description: Free-form notes (rich text) properties: value: type: string format: type: string geometry: type: string description: WKT geometry associated with this log is_movement: type: boolean description: Whether this log records asset movement to a new location image: type: array items: type: object file: type: array items: type: object created: type: integer readOnly: true changed: type: integer readOnly: true LogRelationships: type: object description: Common relationships shared by all log types properties: asset: $ref: '#/components/schemas/JsonApiRelationship' location: $ref: '#/components/schemas/JsonApiRelationship' category: $ref: '#/components/schemas/JsonApiRelationship' owner: $ref: '#/components/schemas/JsonApiRelationship' quantity: $ref: '#/components/schemas/JsonApiRelationship' image: $ref: '#/components/schemas/JsonApiRelationship' file: $ref: '#/components/schemas/JsonApiRelationship' LogData: type: object required: - type - attributes properties: type: type: string description: JSON:API resource type (e.g., log--activity, log--harvest) example: log--activity id: type: string format: uuid readOnly: true attributes: $ref: '#/components/schemas/LogAttributes' relationships: $ref: '#/components/schemas/LogRelationships' links: $ref: '#/components/schemas/JsonApiLinks' LogRequest: type: object required: - data properties: data: $ref: '#/components/schemas/LogData' LogResponse: type: object properties: data: $ref: '#/components/schemas/LogData' included: type: array items: type: object links: $ref: '#/components/schemas/JsonApiLinks' LogCollection: type: object properties: data: type: array items: $ref: '#/components/schemas/LogData' 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 PlanAttributes: type: object properties: name: type: string description: Plan name status: type: string enum: [active, archived] notes: type: object properties: value: type: string format: type: string created: type: integer readOnly: true changed: type: integer readOnly: true PlanData: type: object required: - type - attributes properties: type: type: string example: plan--plan id: type: string format: uuid readOnly: true attributes: $ref: '#/components/schemas/PlanAttributes' links: $ref: '#/components/schemas/JsonApiLinks' PlanRequest: type: object required: - data properties: data: $ref: '#/components/schemas/PlanData' PlanResponse: type: object properties: data: $ref: '#/components/schemas/PlanData' links: $ref: '#/components/schemas/JsonApiLinks' PlanCollection: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanData' links: type: object meta: type: object properties: count: type: integer TaxonomyTermAttributes: type: object properties: name: type: string description: Taxonomy term name description: type: object properties: value: type: string format: type: string weight: type: integer drupal_internal__tid: type: integer readOnly: true TaxonomyTermData: type: object properties: type: type: string description: JSON:API resource type (e.g., taxonomy_term--plant_type) id: type: string format: uuid readOnly: true attributes: $ref: '#/components/schemas/TaxonomyTermAttributes' links: $ref: '#/components/schemas/JsonApiLinks' TaxonomyCollection: type: object properties: data: type: array items: $ref: '#/components/schemas/TaxonomyTermData' links: type: object meta: type: object properties: count: type: integer QuantityAttributes: type: object properties: measure: type: string description: Type of measurement (e.g., weight, volume, count, length, area, time, temperature, pressure, water_content, rating, ratio) enum: [weight, volume, count, length, area, time, temperature, pressure, water_content, rating, ratio] value: type: object description: Numeric value with decimal precision properties: numerator: type: integer denominator: type: integer decimal: type: string label: type: string description: Optional label for the quantity inventory_adjustment: type: string description: How this quantity affects inventory (increment or decrement) enum: [increment, decrement, reset] QuantityRelationships: type: object properties: units: $ref: '#/components/schemas/JsonApiRelationship' inventory_asset: $ref: '#/components/schemas/JsonApiRelationship' QuantityData: type: object required: - type - attributes properties: type: type: string example: quantity--standard id: type: string format: uuid readOnly: true attributes: $ref: '#/components/schemas/QuantityAttributes' relationships: $ref: '#/components/schemas/QuantityRelationships' links: $ref: '#/components/schemas/JsonApiLinks' QuantityRequest: type: object required: - data properties: data: $ref: '#/components/schemas/QuantityData' QuantityResponse: type: object properties: data: $ref: '#/components/schemas/QuantityData' links: $ref: '#/components/schemas/JsonApiLinks' QuantityCollection: type: object properties: data: type: array items: $ref: '#/components/schemas/QuantityData' links: type: object meta: type: object properties: count: type: integer 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 responses: Unauthorized: description: Authentication required or token expired 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' UnprocessableEntity: description: Validation error content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiError'