Webhook

A Webhook is a plugin instance receiving data from external monitoring systems.

Package : spaceone.api.monitoring.v1

Webhook

Webhook Methods:

create

Creates a new Webhook. A Webhook collects data from an external monitoring system with a webhook URL generated by the resource.

POST /monitoring/v1/webhook/create

{{< tabs " create " >}}

{{< tab "Request Example" >}}

CreateWebhookRequest

  • name (string) Required

  • plugin_info (WebhookPluginInfo) Required

  • project_id (string) Required

  • tags (Struct)

{{< highlight json >}} { "name": "aws-sns-webhook-for-phd", "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "options": {} }, "project_id": "project-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

update

Updates a specific Webhook. You can make changes in Webhook settings, including the name and tags.

POST /monitoring/v1/webhook/update

{{< tabs " update " >}}

{{< tab "Request Example" >}}

UpdateWebhookRequest

  • webhook_id (string) Required

  • name (string)

  • tags (Struct)

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-cloudwatch", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

update_plugin

Updates the plugin of a specific DataSource. You can change the version of the plugin and select the upgrade_mode among AUTO, MANUAL, and NONE.

POST /monitoring/v1/webhook/update-plugin

{{< tabs " update_plugin " >}}

{{< tab "Request Example" >}}

UpdateWebhookPluginRequest

  • webhook_id (string) Required

  • version (string)

  • options (Struct)

  • upgrade_mode (UpgradeMode)

{{< highlight json >}} { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

verify_plugin

Verifies a specific plugin for a Webhook.

POST /monitoring/v1/webhook/verify-plugin

{{< tabs " verify_plugin " >}}

{{< tab "Request Example" >}}

WebhookRequest

  • webhook_id (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

enable

Enables a specific Webhook. By enabling a Webhook, you can communicate with an external application.

POST /monitoring/v1/webhook/enable

{{< tabs " enable " >}}

{{< tab "Request Example" >}}

WebhookRequest

  • webhook_id (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

disable

Disables a specific Webhook. By disabling a Webhook, you cannot communicate with an external application, as the webhook URL from the Webhook becomes invalid.

POST /monitoring/v1/webhook/disable

{{< tabs " disable " >}}

{{< tab "Request Example" >}}

WebhookRequest

  • webhook_id (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

delete

Deletes a specific Webhook. By deleting a Webhook, you cannot collect data from an external monitoring system, as the REST URL is also deleted.

POST /monitoring/v1/webhook/delete

{{< tabs " delete " >}}

{{< tab "Request Example" >}}

WebhookRequest

  • webhook_id (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

get

Gets a specific Webhook. Prints detailed information about the Webhook, including the name, the version, and the created datetime.

POST /monitoring/v1/webhook/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

WebhookRequest

  • webhook_id (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-phd", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

list

Gets a list of all Webhooks. You can use a query to get a filtered list of Webhooks.

POST /monitoring/v1/webhook/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

WebhookQuery

  • query (Query)

  • webhook_id (string)

  • name (string)

  • state (WebhookState)

  • access_key (string)

  • workspace_id (string)

  • project_id (string)

{{< highlight json >}} { "query": {}, "project_id": "project-123456789012", "domain_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

WebhooksInfo

  • results (WebhookInfo) Repeated Required

  • total_count (int32) Required

{{< highlight json >}} { "results": [ { "webhook_id": "webhook-123456789012", "name": "aws-sns-webhook-for-cloudwatch", "state": "ENABLED", "access_key": "1234567890123456789012345678901", "webhook_url": "https://monitoring-webhook.dev.spaceone.dev/monitoring/v1/webhook/webhook-123456789012/1234567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-aws-sns-mon-webhook", "version": "1.2.2", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:23:33.875Z" }, { "webhook_id": "webhook-987654321098", "name": "zabbix-webhook", "state": "ENABLED", "access_key": "9876567890123456789012345678901", "webhook_url": "https://monitoring-webhook.dev.spaceone.dev/monitoring/v1/webhook/webhook-987654321098/9876567890123456789012345678901/events", "capability": {}, "plugin_info": { "plugin_id": "plugin-zabbix-mon-webhook", "version": "1.0", "options": {}, "metadata": {}, "upgrade_mode": "AUTO" }, "project_id": "project-123456789012", "domain_id": "domain-123456789012", "created_at": "2022-01-01T07:42:31.872Z" } ], "total_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

stat

POST /monitoring/v1/webhook/stat

Message

CreateWebhookRequest

  • name (string) Required

  • plugin_info (WebhookPluginInfo) Required

  • project_id (string) Required

  • tags (Struct)

UpdateWebhookPluginRequest

  • webhook_id (string) Required

  • version (string)

  • options (Struct)

  • upgrade_mode (UpgradeMode)

UpdateWebhookRequest

  • webhook_id (string) Required

  • name (string)

  • tags (Struct)

WebhookInfo

  • webhook_id (string) Required

  • name (string) Required

  • state (WebhookState) Required

  • access_key (string) Required

  • webhook_url (string) Required

  • capability (Struct) Required

  • plugin_info (WebhookPluginInfo) Required

  • tags (Struct) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

WebhookPluginInfo

  • plugin_id (string) Required

  • version (string) Required

  • options (Struct) Required

  • metadata (Struct) Required

  • upgrade_mode (UpgradeMode) Required

WebhookQuery

  • query (Query)

  • webhook_id (string)

  • name (string)

  • state (WebhookState)

  • access_key (string)

  • workspace_id (string)

  • project_id (string)

WebhookRequest

  • webhook_id (string) Required

WebhookStatQuery

  • query (StatisticsQuery) Required

WebhooksInfo

  • results (WebhookInfo) Repeated Required

  • total_count (int32) Required

Last updated