mirror of
https://github.com/directus/directus.git
synced 2026-02-15 20:24:57 -05:00
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
get:
|
|
description: Get all webhooks.
|
|
operationId: getWebhooks
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
$ref: "../../#/components/schemas/Webhook"
|
|
"401":
|
|
$ref: "../../#/components/responses/UnauthorizedError"
|
|
"404":
|
|
$ref: "../../#/components/responses/NotFoundError"
|
|
tags:
|
|
- Webhooks
|
|
post:
|
|
description: Create a new webhook.
|
|
operationId: createWebhook
|
|
parameters:
|
|
- $ref: "../../#/components/parameters/Fields"
|
|
- $ref: "../../#/components/parameters/Meta"
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
name:
|
|
description: The name of the webhook.
|
|
type: string
|
|
example: create articles
|
|
method:
|
|
description: Method used in the webhook.
|
|
type: string
|
|
example: POST
|
|
url:
|
|
description: The url of the webhook.
|
|
type: string
|
|
example: null
|
|
status:
|
|
description: The status of the webhook.
|
|
type: string
|
|
example: active
|
|
data:
|
|
description: If yes, send the content of what was done
|
|
type: boolean
|
|
example: true
|
|
actions:
|
|
description: The actions that triggers this webhook.
|
|
example: null
|
|
collections:
|
|
description: The collections that triggers this webhook.
|
|
example: null
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
$ref: "../../#/components/schemas/Role"
|
|
"401":
|
|
$ref: "../../#/components/responses/UnauthorizedError"
|
|
"404":
|
|
$ref: "../../#/components/responses/NotFoundError"
|
|
tags:
|
|
- Webhooks
|