mirror of
https://github.com/directus/directus.git
synced 2026-02-16 21:42:03 -05:00
76 lines
1.8 KiB
YAML
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
|