diff --git a/api/TimeAddressableMediaStore.yaml b/api/TimeAddressableMediaStore.yaml index 3e89cde3..e2d1fe16 100644 --- a/api/TimeAddressableMediaStore.yaml +++ b/api/TimeAddressableMediaStore.yaml @@ -214,7 +214,7 @@ paths: schema: type: array items: - $ref: "schemas/webhook-with-id.json" + $ref: "schemas/webhook-get.json" "404": description: "Webhooks are not supported by this API implementation" post: @@ -250,7 +250,7 @@ paths: example: $ref: "examples/webhook-get-200.json" schema: - $ref: schemas/webhook-with-id.json + $ref: schemas/webhook-get.json "400": description: Bad request. Invalid parameters or unsupported event filtering or transformation. "404": @@ -292,7 +292,7 @@ paths: example: $ref: "examples/webhook-get-200.json" schema: - $ref: "schemas/webhook-with-id.json" + $ref: "schemas/webhook-get.json" "404": description: The requested Webhook ID in the path is invalid, or Webhooks are not supported by this API implementation put: @@ -330,7 +330,7 @@ paths: example: $ref: "examples/webhook-get-200.json" schema: - $ref: schemas/webhook.json + $ref: schemas/webhook-get.json "400": description: Bad request. Invalid parameters or unsupported event filtering or transformation. "404": diff --git a/api/schemas/webhook-get.json b/api/schemas/webhook-get.json new file mode 100644 index 00000000..12d06000 --- /dev/null +++ b/api/schemas/webhook-get.json @@ -0,0 +1,19 @@ +{ + "title": "Webhook Detail", + "description": "Describes a Webhook", + "type": "object", + "allOf": [ + { + "$ref": "webhook-with-id.json" + }, + { + "type": "object", + "properties": { + "error": { + "description": "Provides more information for the error status, as described by the [Error](../schemas/error#top) type", + "$ref": "error.json" + } + } + } + ] +} \ No newline at end of file diff --git a/api/schemas/webhook.json b/api/schemas/webhook.json index 834ae84c..7eef7ee7 100644 --- a/api/schemas/webhook.json +++ b/api/schemas/webhook.json @@ -86,6 +86,15 @@ "verbose_storage": { "description": "Whether to include storage metadata in the `get_urls` property in `flows/segments_added` events. This option is the same as the `verbose_storage` query parameter for the /flows/{flowId}/segments API endpoint.", "type": "boolean" + }, + "status": { + "description": "Status of the Webhook. A disabled webhook will not POST events.", + "type": "string", + "default": "enabled", + "enum": [ + "enabled", + "disabled" + ] } } -} \ No newline at end of file +}