Servers
Base URL | Description |
---|---|
http://localhost:5622 | |
http://api.example.com | |
https://<KIBANA_URL> |
Schedule a snooze for the rule
When you snooze a rule, the rule checks continue to run but alerts will not generate actions. You can snooze for a specified period of time and schedule single or recurring downtimes.
Path parameters
-
id
string Required Identifier of the rule.
POST
/api/alerting/rule/{id}/snooze_schedule
curl \
--request POST 'http://localhost:5622/api/alerting/rule/{id}/snooze_schedule' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"schedule":{"custom":{"duration":"string","recurring":{"end":"string","every":"string","occurrences":42.0,"onMonth":[42.0],"onMonthDay":[42.0],"onWeekDay":["string"]},"start":"string","timezone":"string"}}}'
Request examples
# Headers
kbn-xsrf: true
# Payload
{
"schedule": {
"custom": {
"duration": "string",
"recurring": {
"end": "string",
"every": "string",
"occurrences": 42.0,
"onMonth": [
42.0
],
"onMonthDay": [
42.0
],
"onWeekDay": [
"string"
]
},
"start": "string",
"timezone": "string"
}
}
}
Response examples (200)
{
"body": {
"schedule": {
"custom": {
"duration": "string",
"recurring": {
"end": "string",
"every": "string",
"occurrences": 42.0,
"onMonth": [
42.0
],
"onMonthDay": [
42.0
],
"onWeekDay": [
"string"
]
},
"start": "string",
"timezone": "string"
},
"id": "string"
}
}
}
POST
/api/alerting/rule/{rule_id}/alert/{alert_id}/_mute
curl \
--request POST 'http://localhost:5622/api/alerting/rule/{rule_id}/alert/{alert_id}/_mute' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Headers
-
elastic-api-version
string Required The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
.
GET
/api/apm/settings/agent-configuration
curl \
--request GET 'http://localhost:5622/api/apm/settings/agent-configuration' \
--header "Authorization: $API_KEY" \
--header "elastic-api-version: 2023-10-31"
Response examples (200)
An example of a successful response from `GET /api/apm/settings/agent-configuration`.
[
{
"agent_name": "go",
"service": {
"name": "opbeans-go",
"environment": "production"
},
"settings": {
"transaction_sample_rate": "1",
"capture_body": "off",
"transaction_max_spans": "200"
},
"@timestamp": 1581934104843,
"applied_by_agent": false,
"etag": "1e58c178efeebae15c25c539da740d21dee422fc"
},
{
"agent_name": "go",
"service": {
"name": "opbeans-go"
},
"settings": {
"transaction_sample_rate": "1",
"capture_body": "off",
"transaction_max_spans": "300"
},
"@timestamp": 1581934111727,
"applied_by_agent": false,
"etag": "3eed916d3db434d9fb7f039daa681c7a04539a64"
},
{
"agent_name": "nodejs",
"service": {
"name": "frontend"
},
"settings": {
"transaction_sample_rate": "1",
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
}
]
Response examples (400)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (404)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}
Get agent name for service
Retrieve agentName
for a service.
Headers
-
elastic-api-version
string Required The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
.
Query parameters
-
serviceName
string Required The name of the service
GET
/api/apm/settings/agent-configuration/agent_name
curl \
--request GET 'http://localhost:5622/api/apm/settings/agent-configuration/agent_name?serviceName=node' \
--header "Authorization: $API_KEY" \
--header "elastic-api-version: 2023-10-31"
Response examples (200)
{
"agentName": "nodejs"
}
Response examples (400)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (404)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}
Headers
-
elastic-api-version
string Required The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
.
Query parameters
-
serviceName
string The name of the service
GET
/api/apm/settings/agent-configuration/environments
curl \
--request GET 'http://localhost:5622/api/apm/settings/agent-configuration/environments' \
--header "Authorization: $API_KEY" \
--header "elastic-api-version: 2023-10-31"
Response examples (200)
{
"environments": [
{
"alreadyConfigured": true,
"name": "ALL_OPTION_VALUE"
}
]
}
Response examples (400)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (404)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}