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: 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 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 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 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 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