Webhook

Webhook #

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

Package : spaceone.api.monitoring.v1



Webhook #

Webhook Methods:

MethodRequestResponse
createCreateWebhookRequestWebhookInfo
updateUpdateWebhookRequestWebhookInfo
update_pluginUpdateWebhookPluginRequestWebhookInfo
verify_pluginWebhookRequestEmpty
enableWebhookRequestWebhookInfo
disableWebhookRequestWebhookInfo
deleteWebhookRequestEmpty
getWebhookRequestWebhookInfo
listWebhookQueryWebhooksInfo
statWebhookStatQueryStruct

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

CreateWebhookRequest

  • name (string) Required

  • plugin_info (WebhookPluginInfo) Required

  • project_id (string) Required

  • tags (Struct)

{
     "name": "aws-sns-webhook-for-phd",
     "plugin_info": {
     "plugin_id": "plugin-aws-sns-mon-webhook",
     "options": {}
     },
     "project_id": "project-123456789012",
     "domain_id": "domain-123456789012"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

update #

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

POST /monitoring/v1/webhook/update

UpdateWebhookRequest

  • webhook_id (string) Required

  • name (string)

  • tags (Struct)

{
   "webhook_id": "webhook-123456789012",
   "name": "aws-sns-webhook-for-cloudwatch",
   "domain_id": "domain-123456789012"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

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

UpdateWebhookPluginRequest

  • webhook_id (string) Required

  • version (string)

  • options (Struct)

  • upgrade_mode (UpgradeMode)

{
     "plugin_id": "plugin-aws-sns-mon-webhook",
     "version": "1.2.2",
     "options": {},
     "metadata": {},
     "upgrade_mode": "AUTO"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

verify_plugin #

Verifies a specific plugin for a Webhook.

POST /monitoring/v1/webhook/verify-plugin

WebhookRequest

  • webhook_id (string) Required
{
   "webhook_id": "webhook-123456789012",
   "domain_id": "domain-123456789012"
}

enable #

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

POST /monitoring/v1/webhook/enable

WebhookRequest

  • webhook_id (string) Required
{
   "webhook_id": "webhook-123456789012",
   "domain_id": "domain-123456789012"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

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

WebhookRequest

  • webhook_id (string) Required
{
   "webhook_id": "webhook-123456789012",
   "domain_id": "domain-123456789012"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

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

WebhookRequest

  • webhook_id (string) Required
{
   "webhook_id": "webhook-123456789012",
   "domain_id": "domain-123456789012"
}

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

WebhookRequest

  • webhook_id (string) Required
{
   "webhook_id": "webhook-123456789012",
   "domain_id": "domain-123456789012"
}

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

  • requests (WebhookRequests) Required

  • domain_id (string) Required

  • workspace_id (string) Required

  • project_id (string) Required

  • created_at (string) Required

{
     "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"
}

list #

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

POST /monitoring/v1/webhook/list

WebhookQuery

  • query (Query)

  • webhook_id (string)

  • name (string)

  • state (WebhookState)

  • access_key (string)

  • workspace_id (string)

  • project_id (string)

{
   "query": {},
   "project_id": "project-123456789012",
   "domain_id": "domain-123456789012"
}

WebhooksInfo

  • results (WebhookInfo) Repeated Required

  • total_count (int32) Required

{
     "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
}

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

  • requests (WebhookRequests) 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


WebhookRequests #

  • total (int64) Required

  • error (int64) Required


WebhookStatQuery #

  • query (StatisticsQuery) Required


WebhooksInfo #

  • results (WebhookInfo) Repeated Required

  • total_count (int32) Required


Calendar November 4, 2024
Edit Edit this page