Files
directus/packages/spec/specs/paths/items/item.yaml
2020-09-21 12:33:19 -03:00

76 lines
1.8 KiB
YAML

get:
description: Retrieve a single item by unique identifier.
tags:
- Items
operationId: getItem
parameters:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Meta"
responses:
"200":
description: Successful request
content:
application/json:
schema:
type: object
properties:
data:
type: object
"401":
$ref: "#/components/responses/UnauthorizedError"
"404":
$ref: "#/components/responses/NotFoundError"
patch:
description: Update an existing item.
tags:
- Items
operationId: updateItem
parameters:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Meta"
requestBody:
content:
application/json:
schema:
type: object
responses:
"200":
description: Successful request
content:
application/json:
schema:
type: object
properties:
data:
type: object
"401":
$ref: "#/components/responses/UnauthorizedError"
"404":
$ref: "#/components/responses/NotFoundError"
delete:
description: Delete an existing item.
tags:
- Items
operationId: deleteItem
responses:
"200":
description: Successful request
"401":
$ref: "#/components/responses/UnauthorizedError"
"404":
$ref: "#/components/responses/NotFoundError"
parameters:
- $ref: "#/components/parameters/Collection"
- name: id
description: Index of the item.
in: path
required: true
schema:
oneOf:
- type: integer
description: Incremental index of the item.
example: 1
- type: string
description: Unique identifier of the item.
example: 8cbb43fe-4cdf-4991-8352-c461779cec02