mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `9.0`: - [[DOCS] Removes Serverless API x-beta overlay (#215587)](https://github.com/elastic/kibana/pull/215587) It also contains some commits to clean up the unnecessary serverless-specific files and commands from this branch. <!--- 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-22T00:30:25Z","message":"[DOCS] Removes Serverless API x-beta overlay (#215587)","sha":"bce77d761a3bf5f4c5738b882395f7c7feb2540e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v9.0.0","docs","backport:version","v9.1.0","v8.18.1"],"title":"[DOCS] Removes Serverless API x-beta overlay","number":215587,"url":"https://github.com/elastic/kibana/pull/215587","mergeCommit":{"message":"[DOCS] Removes Serverless API x-beta overlay (#215587)","sha":"bce77d761a3bf5f4c5738b882395f7c7feb2540e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.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/215587","number":215587,"mergeCommit":{"message":"[DOCS] Removes Serverless API x-beta overlay (#215587)","sha":"bce77d761a3bf5f4c5738b882395f7c7feb2540e"}},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
6394cf763b
commit
bbb51454e0
6 changed files with 5 additions and 474 deletions
|
@ -1,47 +0,0 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Kibana Serverless APIs
|
||||
description: |
|
||||
The Kibana REST APIs for Elastic serverless enable you to manage resources
|
||||
such as connectors, data views, and saved objects. The API calls are
|
||||
stateless. Each request that you make happens in isolation from other calls
|
||||
and must include all of the necessary information for Kibana to fulfill the
|
||||
request. API requests return JSON output, which is a format that is
|
||||
machine-readable and works well for automation.
|
||||
|
||||
To interact with Kibana APIs, use the following operations:
|
||||
|
||||
- GET: Fetches the information.
|
||||
- POST: Adds new information.
|
||||
- PUT: Updates the existing information.
|
||||
- DELETE: Removes the information.
|
||||
|
||||
You can prepend any Kibana API endpoint with `kbn:` and run the request in
|
||||
**Dev Tools → Console**. For example:
|
||||
|
||||
```
|
||||
GET kbn:/api/data_views
|
||||
```
|
||||
|
||||
## Documentation source and versions
|
||||
|
||||
This documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.
|
||||
It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).
|
||||
version: "1.0.2"
|
||||
x-doc-license:
|
||||
name: Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
url: https://creativecommons.org/licenses/by-nc-nd/4.0/
|
||||
contact:
|
||||
name: Kibana Team
|
||||
x-feedbackLink:
|
||||
label: Feedback
|
||||
url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
|
||||
security:
|
||||
- apiKeyAuth: []
|
||||
components:
|
||||
securitySchemes:
|
||||
apiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: Authorization
|
||||
description: You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).
|
|
@ -34,7 +34,7 @@ rules:
|
|||
operation-4xx-response: off
|
||||
operation-2xx-response: off
|
||||
# Schema
|
||||
spec: off
|
||||
struct: off
|
||||
spec-strict-refs: off
|
||||
# Tags
|
||||
operation-tag-defined: off
|
||||
|
|
|
@ -14,23 +14,18 @@
|
|||
# permission is obtained from Elasticsearch B.V.
|
||||
|
||||
.PHONY: api-docs
|
||||
api-docs: ## Generate Serverless and ESS Kibana OpenAPI bundles
|
||||
api-docs: ## Generate ESS Kibana OpenAPI bundles
|
||||
$(MAKE) merge-api-docs
|
||||
$(MAKE) api-docs-overlay
|
||||
|
||||
.PHONY: merge-api-docs
|
||||
merge-api-docs: ## Merge Serverless and ESS Kibana OpenAPI bundles with kbn-openapi-bundler
|
||||
@node scripts/merge_serverless_oas.js
|
||||
merge-api-docs: ## Merge ESS Kibana OpenAPI bundles with kbn-openapi-bundler
|
||||
@node scripts/merge_ess_oas.js
|
||||
|
||||
.PHONY: merge-api-docs-stateful
|
||||
merge-api-docs-stateful: ## Merge only kibana.yaml
|
||||
@node scripts/merge_ess_oas.js
|
||||
|
||||
.PHONY: merge-api-docs-serverless
|
||||
merge-api-docs-serverless: ## Merge only kibana.serverless.yaml
|
||||
@node scripts/merge_serverless_oas.js
|
||||
|
||||
.PHONY: api-docs-lint
|
||||
api-docs-lint: ## Run redocly API docs linter
|
||||
@npx @redocly/cli lint "output/*.yaml" --config "linters/redocly.yaml" --format stylish --max-problems 500
|
||||
|
@ -39,31 +34,19 @@ api-docs-lint: ## Run redocly API docs linter
|
|||
api-docs-lint-stateful: ## Run redocly API docs linter on kibana.yaml
|
||||
@npx @redocly/cli lint "output/kibana.yaml" --config "linters/redocly.yaml" --format stylish --max-problems 500
|
||||
|
||||
.PHONY: api-docs-lint-serverless
|
||||
api-docs-lint-serverless: ## Run redocly API docs linter on kibana.serverless.yaml
|
||||
@npx @redocly/cli lint "output/kibana.serverless.yaml" --config "linters/redocly.yaml" --format stylish --max-problems 500
|
||||
|
||||
.PHONY: api-docs-overlay
|
||||
api-docs-overlay: ## Apply all overlays
|
||||
@npx bump-cli overlay "output/kibana.serverless.yaml" "overlays/kibana.overlays.serverless.yaml" > "output/kibana.serverless.tmp1.yaml"
|
||||
@npx bump-cli overlay "output/kibana.serverless.tmp1.yaml" "overlays/alerting.overlays.yaml" > "output/kibana.serverless.tmp2.yaml"
|
||||
@npx bump-cli overlay "output/kibana.serverless.tmp2.yaml" "overlays/connectors.overlays.yaml" > "output/kibana.serverless.tmp3.yaml"
|
||||
@npx bump-cli overlay "output/kibana.serverless.tmp3.yaml" "overlays/kibana.overlays.shared.yaml" > "output/kibana.serverless.tmp4.yaml"
|
||||
@npx bump-cli overlay "output/kibana.yaml" "overlays/kibana.overlays.yaml" > "output/kibana.tmp1.yaml"
|
||||
@npx bump-cli overlay "output/kibana.tmp1.yaml" "overlays/alerting.overlays.yaml" > "output/kibana.tmp2.yaml"
|
||||
@npx bump-cli overlay "output/kibana.tmp2.yaml" "overlays/connectors.overlays.yaml" > "output/kibana.tmp3.yaml"
|
||||
@npx bump-cli overlay "output/kibana.tmp3.yaml" "overlays/kibana.overlays.shared.yaml" > "output/kibana.tmp4.yaml"
|
||||
@npx @redocly/cli bundle output/kibana.serverless.tmp4.yaml --ext yaml -o output/kibana.serverless.yaml
|
||||
@npx @redocly/cli bundle output/kibana.tmp4.yaml --ext yaml -o output/kibana.yaml
|
||||
rm output/kibana.tmp*.yaml
|
||||
rm output/kibana.serverless.tmp*.yaml
|
||||
|
||||
.PHONY: api-docs-preview
|
||||
api-docs-preview: ## Generate a preview for kibana.yaml and kibana.serverless.yaml
|
||||
api-docs-preview: ## Generate a preview for kibana.yaml
|
||||
@echo "Rendering stateful docs preview..."
|
||||
@npx bump-cli preview "output/kibana.yaml"
|
||||
@echo "Rendering serverless docs preview..."
|
||||
@npx bump-cli preview "output/kibana.serverless.yaml"
|
||||
|
||||
help: ## Display help
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,79 +0,0 @@
|
|||
# overlays.yaml
|
||||
overlay: 1.0.0
|
||||
info:
|
||||
title: Overlays for the Kibana API document
|
||||
version: 0.0.1
|
||||
actions:
|
||||
# Clean up server definitions
|
||||
- target: '$.servers.*'
|
||||
description: Remove all servers so we can add our own.
|
||||
remove: true
|
||||
- target: '$.servers'
|
||||
description: Add server into the now empty server array.
|
||||
update:
|
||||
- url: https://{kibana_url}
|
||||
variables:
|
||||
kibana_url:
|
||||
default: <KIBANA_URL>
|
||||
# Mark all operations as beta
|
||||
- target: "$.paths[*]['get','put','post','delete','options','head','patch','trace']"
|
||||
description: Add x-beta
|
||||
update:
|
||||
x-beta: true
|
||||
# Add some tag descriptions and displayNames
|
||||
- target: '$.tags[?(@.name=="alerting")]'
|
||||
description: Change tag description and displayName
|
||||
update:
|
||||
description: >
|
||||
Alerting enables you to define rules, which detect complex conditions within your data.
|
||||
When a condition is met, the rule tracks it as an alert and runs the actions that are defined in the rule.
|
||||
Actions typically involve the use of connectors to interact with Kibana services or third party integrations.
|
||||
externalDocs:
|
||||
description: Alerting documentation
|
||||
url: https://www.elastic.co/docs/current/serverless/rules
|
||||
x-displayName: "Alerting"
|
||||
- target: '$.tags[?(@.name=="connectors")]'
|
||||
description: Change tag description and displayName
|
||||
update:
|
||||
description: >
|
||||
Connectors provide a central place to store connection information for services and integrations with Elastic or third party systems.
|
||||
Alerting rules can use connectors to run actions when rule conditions are met.
|
||||
externalDocs:
|
||||
description: Connector documentation
|
||||
url: https://www.elastic.co/docs/current/serverless/action-connectors
|
||||
x-displayName: "Connectors"
|
||||
- target: '$.tags[?(@.name=="data views")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Data views"
|
||||
- target: '$.tags[?(@.name=="ml")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Machine learning"
|
||||
- target: '$.tags[?(@.name=="roles")]'
|
||||
description: Change displayName and description
|
||||
update:
|
||||
x-displayName: "Roles"
|
||||
description: Manage the roles that grant Elasticsearch and Kibana privileges.
|
||||
externalDocs:
|
||||
description: Kibana role management
|
||||
url: https://www.elastic.co/guide/en/kibana/master/kibana-role-management.html
|
||||
- target: '$.tags[?(@.name=="slo")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Service level objectives"
|
||||
- target: '$.tags[?(@.name=="spaces")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Spaces"
|
||||
description: Manage your Kibana spaces.
|
||||
- target: '$.tags[?(@.name=="system")]'
|
||||
description: Change displayName and description
|
||||
update:
|
||||
x-displayName: "System"
|
||||
description: >
|
||||
Get information about the system status, resource usage, and installed plugins.
|
||||
# Remove extra tags from operations
|
||||
- target: "$.paths[*][*].tags[1:]"
|
||||
description: Remove all but first tag from operations
|
||||
remove: true
|
|
@ -32,8 +32,6 @@ const { REPO_ROOT } = require('@kbn/repo-info');
|
|||
`${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/serverless/*.schema.yaml`,
|
||||
],
|
||||
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.yaml`,
|
||||
options: {
|
||||
prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.serverless.yaml`,
|
||||
},
|
||||
options: {},
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue