Webhooks
Reference for the webhooks endpoints of the Surfmeter API.
Surfmeter API – Webhooks v1
The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.
Servers
| Description | URL |
|---|---|
| https://surfmeter-server.{host}/client_admin_api/v1 | https://surfmeter-server.{host}/client_admin_api/v1 |
Webhooks
GET /webhooks/event_types
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Response 200 OK
- application/json
{
"groups": [
{
"key": "string",
"label": "string"
}
],
"filters": [
{
"key": "string",
"description": "string"
}
],
"severities": [
"string"
],
"health_metrics": [
"string"
],
"measurement_types": [
"string"
],
"event_types": [
{
"type": "string",
"group": "string",
"description": "string",
"filters": [
"string"
],
"sample": {}
}
]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
GET /webhooks
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Response 200 OK
- application/json
{
"webhooks": [
{
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string"
}
]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
POST /webhooks
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Request body
- application/json
{
"name": "string",
"description": "string",
"url": "string",
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"headers": {},
"enabled": true,
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the request body
Response 201 Created
- application/json
{
"webhook": {
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string",
"secret": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
GET /webhooks/{id}
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
- application/json
{
"webhook": {
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
PUT /webhooks/{id}
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Request body
- application/json
{
"name": "string",
"description": "string",
"url": "string",
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"headers": {},
"enabled": true,
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the request body
Response 200 OK
- application/json
{
"webhook": {
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
DELETE /webhooks/{id}
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
- application/json
Schema of the response body
{
"description": "Response for webhooks destroy action",
"type": "object",
"properties": {}
}
POST /webhooks/{id}/test
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
- application/json
{
"webhook_delivery": {
"id": 0,
"webhook_endpoint_id": 0,
"event_id": "string",
"event_type": "string",
"status": "pending",
"attempts": 0,
"max_attempts": 0,
"next_attempt_at": "string",
"response_status": 0,
"error_message": "string",
"duration_ms": 0,
"delivered_at": "string",
"manual": true,
"created_at": "string",
"updated_at": "string",
"payload": {
"id": "string",
"type": "string",
"timestamp": "string",
"data": {}
},
"response_body": "string",
"rendered_body": "string",
"payload_format": "standard",
"rendered_content_type": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
POST /webhooks/{id}/rotate_secret
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
- application/json
{
"webhook": {
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string",
"secret": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
POST /webhooks/{id}/enable
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
- application/json
{
"webhook": {
"id": 0,
"name": "string",
"description": "string",
"url": "string",
"payload_format": "standard",
"format_options": {
"mention_users": [
"string"
],
"mention_groups": [
"string"
],
"mention_channel": "here"
},
"event_types": [
"string"
],
"filters": {
"client_tags": [
"string"
],
"measurement_types": [
"string"
],
"min_severity": "warning",
"health_metrics": [
"string"
]
},
"enabled": true,
"active": true,
"headers": {},
"secret_hint": "string",
"auto_disabled_at": "string",
"auto_disabled_reason": "string",
"consecutive_failures": 0,
"last_delivery_at": "string",
"last_success_at": "string",
"last_failure_at": "string",
"last_response_status": 0,
"last_error": "string",
"created_by_id": 0,
"created_at": "string",
"updated_at": "string"
}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
Schemas
WebhookCreateData
| Name | Type |
|---|---|
description |
string| null |
enabled |
boolean |
event_types |
Array<string> |
filters |
Properties: client_tags, measurement_types, min_severity, health_metrics |
format_options |
Properties: mention_users, mention_groups, mention_channel |
headers |
|
name |
string |
payload_format |
string |
url |
string |
WebhookCreateResponse
| Name | Type |
|---|---|
webhook |
Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at, secret |
WebhookDestroyResponse
WebhookEnableResponse
| Name | Type |
|---|---|
webhook |
Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at |
WebhookEventTypesResponse
| Name | Type |
|---|---|
event_types |
Array<Properties: type, group, description, filters, sample> |
filters |
Array<Properties: key, description> |
groups |
Array<Properties: key, label> |
health_metrics |
Array<string> |
measurement_types |
Array<string> |
severities |
Array<string> |
WebhookIndexResponse
| Name | Type |
|---|---|
webhooks |
Array<Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at> |
WebhookRotateSecretResponse
| Name | Type |
|---|---|
webhook |
Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at, secret |
WebhookShowResponse
| Name | Type |
|---|---|
webhook |
Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at |
WebhookTestResponse
| Name | Type |
|---|---|
webhook_delivery |
Properties: id, webhook_endpoint_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, response_status, error_message, duration_ms, delivered_at, manual, created_at, updated_at, payload, response_body, rendered_body, payload_format, rendered_content_type |
WebhookUpdateData
| Name | Type |
|---|---|
description |
string| null |
enabled |
boolean |
event_types |
Array<string> |
filters |
Properties: client_tags, measurement_types, min_severity, health_metrics |
format_options |
Properties: mention_users, mention_groups, mention_channel |
headers |
|
name |
string |
payload_format |
string |
url |
string |
WebhookUpdateResponse
| Name | Type |
|---|---|
webhook |
Properties: id, name, description, url, payload_format, format_options, event_types, filters, enabled, active, headers, secret_hint, auto_disabled_at, auto_disabled_reason, consecutive_failures, last_delivery_at, last_success_at, last_failure_at, last_response_status, last_error, created_by_id, created_at, updated_at |
Security schemes
<tr>
<td>ApiKeyAuth</td>
<td>apiKey</td>
<td></td>
<td>API key used on every request. Create keys in the Surfmeter Dashboard
under Keys → Surfmeter API Keys.
</tbody>
| Name | Type | Scheme | Description |
|---|