mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `9.0`: - [[DOCS] Add minimal uptime APIs (#213867)](https://github.com/elastic/kibana/pull/213867) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lisa Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2025-03-17T22:03:33Z","message":"[DOCS] Add minimal uptime APIs (#213867)","sha":"57caf8796cd5633625ccec94b1d77b3b425fec35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","docs","Team:uptime","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[DOCS] Add minimal uptime APIs","number":213867,"url":"https://github.com/elastic/kibana/pull/213867","mergeCommit":{"message":"[DOCS] Add minimal uptime APIs (#213867)","sha":"57caf8796cd5633625ccec94b1d77b3b425fec35"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213867","number":213867,"mergeCommit":{"message":"[DOCS] Add minimal uptime APIs (#213867)","sha":"57caf8796cd5633625ccec94b1d77b3b425fec35"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
parent
a6dda32ef7
commit
d39c519c59
4 changed files with 299 additions and 0 deletions
|
@ -247,6 +247,11 @@ tags:
|
|||
- description: Check the upgrade status of your Elasticsearch cluster and reindex indices that were created in the previous major version. The assistant helps you prepare for the next major version of Elasticsearch.
|
||||
name: upgrade
|
||||
x-displayName: Upgrade assistant
|
||||
- externalDocs:
|
||||
description: Uptime monitoring
|
||||
url: https://www.elastic.co/guide/en/observability/current/uptime-intro.html
|
||||
name: uptime
|
||||
x-displayName: Uptime
|
||||
- name: user session
|
||||
x-displayName: User session management
|
||||
paths:
|
||||
|
@ -43284,6 +43289,139 @@ paths:
|
|||
tags:
|
||||
- upgrade
|
||||
x-state: Technical Preview
|
||||
/api/uptime/settings:
|
||||
get:
|
||||
description: |
|
||||
You must have `read` privileges for the uptime feature in the Observability section of the Kibana feature privileges.
|
||||
operationId: get-uptime-settings
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
getUptimeSettingsResponseExample1:
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
description: Indicates a successful call
|
||||
summary: Get uptime settings
|
||||
tags:
|
||||
- uptime
|
||||
put:
|
||||
description: |
|
||||
Update uptime setting attributes like `heartbeatIndices`, `certExpirationThreshold`, `certAgeThreshold`, `defaultConnectors`, or `defaultEmail`. You must have `all` privileges for the uptime feature in the Observability section of the Kibana feature privileges. A partial update is supported, provided settings keys will be merged with existing settings.
|
||||
operationId: put-uptime-settings
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
putUptimeSettingsRequestExample1:
|
||||
description: Run `PUT api/uptime/settings` to update multiple Uptime settings.
|
||||
summary: Update multiple settings
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
||||
putUptimeSettingsRequestExample2:
|
||||
description: Run `PUT api/uptime/settings` to update a single Uptime setting.
|
||||
summary: Update a setting
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
certAgeThreshold:
|
||||
default: 730
|
||||
description: The number of days after a certificate is created to trigger an alert.
|
||||
type: number
|
||||
certExpirationThreshold:
|
||||
default: 30
|
||||
description: The number of days before a certificate expires to trigger an alert.
|
||||
type: number
|
||||
defaultConnectors:
|
||||
default: []
|
||||
description: A list of connector IDs to be used as default connectors for new alerts.
|
||||
type: array
|
||||
defaultEmail:
|
||||
description: |
|
||||
The default email configuration for new alerts.
|
||||
type: object
|
||||
properties:
|
||||
bcc:
|
||||
default: []
|
||||
items:
|
||||
- type: string
|
||||
type: array
|
||||
cc:
|
||||
default: []
|
||||
items:
|
||||
- type: string
|
||||
type: array
|
||||
to:
|
||||
default: []
|
||||
items:
|
||||
- type: string
|
||||
type: array
|
||||
heartbeatIndices:
|
||||
default: heartbeat-*
|
||||
description: |
|
||||
An index pattern string to be used within the Uptime app and alerts to query Heartbeat data.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
putUptimeSettingsResponseExample1:
|
||||
description: A successful response from `PUT api/uptime/settings`.
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
description: Indicates a successful call
|
||||
summary: Update uptime settings
|
||||
tags:
|
||||
- uptime
|
||||
/s/{spaceId}/api/observability/slos:
|
||||
get:
|
||||
description: |
|
||||
|
|
|
@ -28,6 +28,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
|
|||
// Observability Solution
|
||||
`${REPO_ROOT}/x-pack/solutions/observability/plugins/apm/docs/openapi/apm/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/solutions/observability/plugins/slo/docs/openapi/slo/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/solutions/observability/plugins/uptime/docs/openapi/uptime_apis.yaml`,
|
||||
|
||||
// Security solution
|
||||
`${REPO_ROOT}/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/*.schema.yaml`,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# OpenAPI (Experimental)
|
||||
|
||||
The current self-contained spec file can be used for online tools like those found at https://openapi.tools/. This spec is experimental and may be incomplete or change later.
|
||||
|
||||
A guide about the openApi specification can be found at [https://swagger.io/docs/specification/about/](https://swagger.io/docs/specification/about/).
|
||||
|
||||
These files are joined with the rest of the Kibana APIs per `oas_docs/README.md`
|
|
@ -0,0 +1,153 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Uptime APIs
|
||||
description: Kibana APIs for the Uptime app
|
||||
version: "1.0.1"
|
||||
license:
|
||||
name: Elastic License 2.0
|
||||
url: https://www.elastic.co/licensing/elastic-license
|
||||
tags:
|
||||
- name: uptime
|
||||
x-displayName: Uptime
|
||||
# description:
|
||||
externalDocs:
|
||||
url: https://www.elastic.co/guide/en/observability/current/uptime-intro.html
|
||||
description: Uptime monitoring
|
||||
servers:
|
||||
- url: /
|
||||
paths:
|
||||
/api/uptime/settings:
|
||||
get:
|
||||
summary: Get uptime settings
|
||||
description: >
|
||||
You must have `read` privileges for the uptime feature in the Observability section of the Kibana feature privileges.
|
||||
operationId: get-uptime-settings
|
||||
tags:
|
||||
- uptime
|
||||
responses:
|
||||
'200':
|
||||
description: Indicates a successful call
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
examples:
|
||||
getUptimeSettingsResponseExample1:
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
||||
put:
|
||||
summary: Update uptime settings
|
||||
description: >
|
||||
Update uptime setting attributes like `heartbeatIndices`, `certExpirationThreshold`, `certAgeThreshold`, `defaultConnectors`, or `defaultEmail`.
|
||||
You must have `all` privileges for the uptime feature in the Observability section of the Kibana feature privileges.
|
||||
A partial update is supported, provided settings keys will be merged with existing settings.
|
||||
operationId: put-uptime-settings
|
||||
tags:
|
||||
- uptime
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
certAgeThreshold:
|
||||
type: number
|
||||
description: The number of days after a certificate is created to trigger an alert.
|
||||
default: 730
|
||||
certExpirationThreshold:
|
||||
type: number
|
||||
description: The number of days before a certificate expires to trigger an alert.
|
||||
default: 30
|
||||
defaultConnectors:
|
||||
type: array
|
||||
description: A list of connector IDs to be used as default connectors for new alerts.
|
||||
default: []
|
||||
defaultEmail:
|
||||
type: object
|
||||
description: >
|
||||
The default email configuration for new alerts.
|
||||
properties:
|
||||
bcc:
|
||||
type: array
|
||||
items:
|
||||
- type: string
|
||||
default: []
|
||||
cc:
|
||||
type: array
|
||||
items:
|
||||
- type: string
|
||||
default: []
|
||||
to:
|
||||
type: array
|
||||
items:
|
||||
- type: string
|
||||
default: []
|
||||
heartbeatIndices:
|
||||
type: string
|
||||
description: >
|
||||
An index pattern string to be used within the Uptime app and alerts to query Heartbeat data.
|
||||
default: heartbeat-*
|
||||
examples:
|
||||
putUptimeSettingsRequestExample1:
|
||||
summary: Update multiple settings
|
||||
description: Run `PUT api/uptime/settings` to update multiple Uptime settings.
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
||||
putUptimeSettingsRequestExample2:
|
||||
summary: Update a setting
|
||||
description: Run `PUT api/uptime/settings` to update a single Uptime setting.
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
}
|
||||
responses:
|
||||
'200':
|
||||
description: Indicates a successful call
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
examples:
|
||||
putUptimeSettingsResponseExample1:
|
||||
description: A successful response from `PUT api/uptime/settings`.
|
||||
value: |-
|
||||
{
|
||||
"heartbeatIndices": "heartbeat-8*",
|
||||
"certExpirationThreshold": 30,
|
||||
"certAgeThreshold": 730,
|
||||
"defaultConnectors": [
|
||||
"08990f40-09c5-11ee-97ae-912b222b13d4",
|
||||
"db25f830-2318-11ee-9391-6b0c030836d6"
|
||||
],
|
||||
"defaultEmail": {
|
||||
"to": [],
|
||||
"cc": [],
|
||||
"bcc": []
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue