Monitoring V1 Webhook A Webhook is a plugin instance receiving data from external monitoring systems.
Package : spaceone.api.monitoring.v1
Webhook
create
POST /monitoring/v1/webhooks
Creates a new Webhook. A Webhook collects data from an external monitoring system with a webhook URL generated by the resource.
Request Example Response Example
Copy {
"name": "aws-sns-webhook-for-phd",
"plugin_info": {
"plugin_id": "plugin-aws-sns-mon-webhook",
"options": {}
},
"project_id": "project-123456789012",
"domain_id": "domain-123456789012"
}
Copy {
"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
PUT /monitoring/v1/webhook/{webhook_id}
Updates a specific Webhook. You can make changes in Webhook settings, including the name and tags.
Request Example Response Example
Copy {
"webhook_id": "webhook-123456789012",
"name": "aws-sns-webhook-for-cloudwatch",
"domain_id": "domain-123456789012"
}
Copy {
"webhook_id": "webhook-123456789012",
"name": "aws-sns-webhook-for-cloudwatch",
"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
PUT /monitoring/v1/webhook/{webhook_id}/plugin
verify_plugin
POST /monitoring/v1/webhook/{webhook_id}/plugin/verify
Verifies a specific plugin for a Webhook.
Request Example
Copy {
"webhook_id": "webhook-123456789012",
"domain_id": "domain-123456789012"
}
enable
PUT /monitoring/v1/webhook/{webhook_id}/enable
Enables a specific Webhook. By enabling a Webhook, you can communicate with an external application.
Request Example Response Example
Copy {
"webhook_id": "webhook-123456789012",
"domain_id": "domain-123456789012"
}
Copy {
"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"
}
disable
PUT /monitoring/v1/webhook/{webhook_id}/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.
Request Example Response Example
Copy {
"webhook_id": "webhook-123456789012",
"domain_id": "domain-123456789012"
}
Copy {
"webhook_id": "webhook-123456789012",
"name": "aws-sns-webhook-for-cloudwatch",
"state": "DISABLED",
"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"
}
delete
DELETE /monitoring/v1/webhook/{webhook_id}
Deletes a specific Webhook. By deleting a Webhook, you cannot collect data from an external monitoring system, as the REST URL
is also deleted.
Request Example
Copy {
"webhook_id": "webhook-123456789012",
"domain_id": "domain-123456789012"
}
get
GET /monitoring/v1/webhook/{webhook_id}
Gets a specific Webhook. Prints detailed information about the Webhook, including the name, the version, and the created datetime.
Request Example Response Example
Copy {
"webhook_id": "webhook-123456789012",
"domain_id": "domain-123456789012"
}
Copy {
"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"
}
list
GET /monitoring/v1/webhooks
POST /monitoring/v1/webhooks/search
Gets a list of all Webhooks. You can use a query to get a filtered list of Webhooks.
Request Example Response Example
Copy {
"query": {},
"project_id": "project-123456789012",
"domain_id": "domain-123456789012"
}
Copy {
"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/webhooks/stat
Message
CreateWebhookRequest
Field
Type
Required
Description
GetWebhookRequest
Field
Type
Required
Description
UpdateWebhookPluginRequest
Field
Type
Required
Description
UpdateWebhookRequest
Field
Type
Required
Description
WebhookInfo
WebhookPluginInfo
WebhookQuery
Field
Type
Required
Description
WebhookRequest
Field
Type
Required
Description
WebhookStatQuery
Field
Type
Required
Description
WebhooksInfo