Tandoor Recipes Unit API

The Unit API from Tandoor Recipes — 6 operation(s) for unit.

GitHub OpenAPI

Operations 10

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/unit/ List measurement units · Api unit list #
Ask an LLM
“What units of measurement are defined in Tandoor?”
“Can I search units by name?”
Tell an agent
List all units.
Find units whose name contains {query}.
POST /api/unit/ Create a measurement unit · Api unit create #
Ask an LLM
“How do I add a new unit of measurement?”
“Can I set the plural form and base unit when creating a unit?”
Tell an agent
Create a unit named {name}.
Add unit {name} with plural {plural_name} and base unit {base_unit}.
GET /api/unit/{id}/ Get a measurement unit · Api unit retrieve #
Ask an LLM
“What is the base unit and plural form of one unit?”
“Can I look up a unit by its ID?”
Tell an agent
Get unit {id}.
Show the base unit and description of unit {id}.
PUT /api/unit/{id}/ Replace a measurement unit · Api unit update #
Ask an LLM
“How do I overwrite a unit's name and base unit?”
“Can I replace a unit record entirely?”
Tell an agent
Replace unit {id} with name {name}.
Overwrite unit {id} with name {name}, plural {plural_name} and base unit {base_unit}.
PATCH /api/unit/{id}/ Rename or re-describe a unit · Api unit partial update #
Ask an LLM
“Can I change just a unit's name or description?”
“How do I rename a unit without touching its base unit?”
Tell an agent
Rename unit {id} to {name}.
Set the description of unit {id} to {description}.
DELETE /api/unit/{id}/ Delete a measurement unit · Api unit destroy #
Ask an LLM
“How do I delete a unit of measurement?”
“Can I remove a unit by its ID?”
Tell an agent destructive · confirm first
Delete unit {id}.
Remove the measurement unit {id}.
GET /api/unit/{id}/cascading/ List objects that would be deleted with a unit · Api unit cascading list #
Ask an LLM
“What will be deleted if I remove this unit?”
“Can I see the cascade targets of a unit?”
Tell an agent
List objects that cascade when unit {id} is deleted.
Show cascade targets of unit {id}.
PUT /api/unit/{id}/merge/{target}/ Merge a unit into another · Api unit merge update #
Ask an LLM
“How do I merge one unit into another?”
“Can I replace a unit's name and base unit in a merge?”
Tell an agent
Merge unit {id} into {target} as {name}.
Replace unit {id} with {name} and merge it into {target}.
GET /api/unit/{id}/nulling/ List objects that would lose a unit · Api unit nulling list #
Ask an LLM
“Which objects would lose their unit when I delete it?”
“Can I see nulling targets of a unit?”
Tell an agent
List objects that null their unit when unit {id} is deleted.
Show nulling targets of unit {id}.
GET /api/unit/{id}/protecting/ List objects that protect a unit · Api unit protecting list #
Ask an LLM
“What protects a unit from being deleted?”
“Can I see protecting objects for a unit?”
Tell an agent
List objects that protect unit {id}.
Show protecting targets of unit {id}.

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/tandoor:tandoor-unit-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

tandoor-unit-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tandoor Unit API
  version: 0.0.0 (2.6.13)
  x-logo:
    url: /static/assets/brand_logo.svg
    backgroundColor: '#FFFFFF'
    altText: Tandoor logo
    href: /
  description: Tandoor API Docs
tags:
- name: Unit
paths:
  /api/unit/:
    get:
      operationId: apiUnitList
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: query
        name: limit
        schema:
          type: string
        description: limit number of entries to return
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: query
        schema:
          type: string
        description: lookup if query string is contained within the name, case insensitive
      - in: query
        name: random
        schema:
          type: string
        description: randomly orders entries (only works together with limit)
      - in: query
        name: updated_at
        schema:
          type: string
        description: if model has an updated_at timestamp, filter only models updated at or after datetime
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUnitList'
          description: ''
      summary: Api unit list
      x-summary-source: derived
    post:
      operationId: apiUnitCreate
      description: logs request counts to redis cache total/per user/
      tags:
      - Unit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Unit'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Unit'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Unit'
        required: true
      security:
      - ApiKeyAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
          description: ''
      summary: Api unit create
      x-summary-source: derived
  /api/unit/{id}/:
    get:
      operationId: apiUnitRetrieve
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
          description: ''
      summary: Api unit retrieve
      x-summary-source: derived
    put:
      operationId: apiUnitUpdate
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      tags:
      - Unit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Unit'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Unit'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Unit'
        required: true
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
          description: ''
      summary: Api unit update
      x-summary-source: derived
    patch:
      operationId: apiUnitPartialUpdate
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      tags:
      - Unit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUnit'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUnit'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUnit'
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
          description: ''
      summary: Api unit partial update
      x-summary-source: derived
    delete:
      operationId: apiUnitDestroy
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '204':
          description: No response body
      summary: Api unit destroy
      x-summary-source: derived
  /api/unit/{id}/cascading/:
    get:
      operationId: apiUnitCascadingList
      description: get a paginated list of objects that will be cascaded (deleted) when deleting the selected object
      parameters:
      - in: query
        name: cache
        schema:
          type: boolean
          default: true
        description: If results can be cached or not
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGenericModelReferenceList'
          description: ''
      summary: Api unit cascading list
      x-summary-source: derived
  /api/unit/{id}/merge/{target}/:
    put:
      operationId: apiUnitMergeUpdate
      description: logs request counts to redis cache total/per user/
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      - in: path
        name: target
        schema:
          type: integer
        description: The ID of the {obj} you want to merge with.
        required: true
      tags:
      - Unit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Unit'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Unit'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Unit'
        required: true
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
          description: ''
      summary: Api unit merge update
      x-summary-source: derived
  /api/unit/{id}/nulling/:
    get:
      operationId: apiUnitNullingList
      description: get a paginated list of objects where the selected object will be removed whe its deleted
      parameters:
      - in: query
        name: cache
        schema:
          type: boolean
          default: true
        description: If results can be cached or not
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGenericModelReferenceList'
          description: ''
      summary: Api unit nulling list
      x-summary-source: derived
  /api/unit/{id}/protecting/:
    get:
      operationId: apiUnitProtectingList
      description: get a paginated list of objects that are protecting the selected object form being deleted
      parameters:
      - in: query
        name: cache
        schema:
          type: boolean
          default: true
        description: If results can be cached or not
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this unit.
        required: true
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Unit
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGenericModelReferenceList'
          description: ''
      summary: Api unit protecting list
      x-summary-source: derived
components:
  schemas:
    PatchedUnit:
      type: object
      description: "Moves `UniqueValidator`'s from the validation stage to the save stage.\nIt solves the problem with nested validation for unique fields on update.\n\nIf you want more details, you can read related issues and articles:\nhttps://github.com/beda-software/drf-writable-nested/issues/1\nhttp://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers\n\nExample of usage:\n```\n    class Child(models.Model):\n    field = models.CharField(unique=True)\n\n\nclass Parent(models.Model):\n    child = models.ForeignKey('Child')\n\n\nclass ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):\n    class Meta:\n        model = Child\n\n\nclass ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):\n    child = ChildSerializer()\n\n    class Meta:\n        model = Parent\n```\n\nNote: `UniqueFieldsMixin` must be applied only on the serializer\nwhich has unique fields.\n\nNote: When you are using both mixins\n(`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)\nyou should put `UniqueFieldsMixin` ahead."
      properties:
        id:
          type: integer
          readOnly: false
        name:
          type: string
          maxLength: 128
          minLength: 1
        plural_name:
          type:
          - string
          - 'null'
          maxLength: 128
        description:
          type:
          - string
          - 'null'
        base_unit:
          type:
          - string
          - 'null'
          maxLength: 256
        open_data_slug:
          type:
          - string
          - 'null'
          maxLength: 128
    Unit:
      type: object
      description: "Moves `UniqueValidator`'s from the validation stage to the save stage.\nIt solves the problem with nested validation for unique fields on update.\n\nIf you want more details, you can read related issues and articles:\nhttps://github.com/beda-software/drf-writable-nested/issues/1\nhttp://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers\n\nExample of usage:\n```\n    class Child(models.Model):\n    field = models.CharField(unique=True)\n\n\nclass Parent(models.Model):\n    child = models.ForeignKey('Child')\n\n\nclass ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):\n    class Meta:\n        model = Child\n\n\nclass ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):\n    child = ChildSerializer()\n\n    class Meta:\n        model = Parent\n```\n\nNote: `UniqueFieldsMixin` must be applied only on the serializer\nwhich has unique fields.\n\nNote: When you are using both mixins\n(`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)\nyou should put `UniqueFieldsMixin` ahead."
      properties:
        id:
          type: integer
          readOnly: false
        name:
          type: string
          maxLength: 128
          minLength: 1
        plural_name:
          type:
          - string
          - 'null'
          maxLength: 128
        description:
          type:
          - string
          - 'null'
        base_unit:
          type:
          - string
          - 'null'
          maxLength: 256
        open_data_slug:
          type:
          - string
          - 'null'
          maxLength: 128
      required:
      - name
    PaginatedGenericModelReferenceList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/GenericModelReference'
        timestamp:
          type: string
          format: date-time
    PaginatedUnitList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Unit'
        timestamp:
          type: string
          format: date-time
    GenericModelReference:
      type: object
      properties:
        id:
          type: integer
          readOnly: false
        model:
          type: string
        name:
          type: string
      required:
      - model
      - name
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization