kibana/oas_docs/overlays/kibana.overlays.yaml

213 lines
8.2 KiB
YAML

# 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: localhost:5601
# Add an introduction to spaces
- target: '$'
description: Add an extra page about spaces
update:
x-topics:
- title: Kibana spaces
content: |
Spaces enable you to organize your dashboards and other saved objects into meaningful categories.
You can use the default space or create your own spaces.
To run APIs in non-default spaces, you must add `s/{space_id}/` to the path.
For example:
```
curl -X GET "http://localhost:5601/s/marketing/api/data_views"
```
If you use the Kibana console to send API requests, it automatically adds the appropriate space identifier.
To learn more, check out [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces).
# Add some tag descriptions and displayNames
- target: '$.tags[?(@.name=="streams")]'
description: Change tag description and displayName
update:
description: >
Streams is a new and experimental way to manage your data in Kibana (currently experimental - expect changes).
x-displayName: "Streams"
- 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/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles
- 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.
externalDocs:
url: https://www.elastic.co/docs/deploy-manage/manage-spaces
description: Space overview
- target: '$.tags[?(@.name=="system")]'
description: Change displayName and description
update:
x-displayName: "System"
description: >
Get information about the system status, resource usage, features, and installed plugins.
- target: '$.tags[?(@.name=="user session")]'
description: Change displayName
update:
x-displayName: "User session management"
- target: '$.tags[?(@.name=="saved objects")]'
description: Change displayName and description
update:
x-displayName: "Saved objects"
description: |
Export sets of saved objects that you want to import into Kibana, resolve import errors, and rotate an encryption key for encrypted saved objects with the saved objects APIs.
To manage a specific type of saved object, use the corresponding APIs.
For example, use:
* [Data views](../group/endpoint-data-views)
* [Spaces](../group/endpoint-spaces)
* [Short URLs](../group/endpoint-short-url)
Warning: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future Kibana versions
- target: '$.tags[?(@.name=="synthetics")]'
description: Add tag info
update:
x-displayName: Synthetics
externalDocs:
description: Synthetic monitoring
url: https://www.elastic.co/docs/solutions/observability/synthetics
# Remove extra tags from operations
- target: "$.paths[*][*].tags[1:]"
description: Remove all but first tag from operations
remove: true
# Examples that are not applicable to serverless
- target: "$.paths['/api/spaces/_copy_saved_objects']['post']"
description: "Add example to copy saved objects to space API"
update:
requestBody:
content:
application/json:
examples:
copySavedObjectsRequestExample1:
$ref: "../examples/copy_saved_objects_request1.yaml"
copySavedObjectsRequestExample2:
$ref: "../examples/copy_saved_objects_request2.yaml"
responses:
200:
content:
application/json:
examples:
copySavedObjectsResponseExample1:
$ref: "../examples/copy_saved_objects_response1.yaml"
copySavedObjectsResponseExample2:
$ref: "../examples/copy_saved_objects_response2.yaml"
copySavedObjectsResponseExample3:
$ref: "../examples/copy_saved_objects_response3.yaml"
copySavedObjectsResponseExample4:
$ref: "../examples/copy_saved_objects_response4.yaml"
- target: "$.paths['/api/spaces/_resolve_copy_saved_objects_errors']['post']"
description: "Add example to resolve copy saved objects to space conflicts API"
update:
requestBody:
content:
application/json:
examples:
resolveCopySavedObjectsRequestExample1:
$ref: "../examples/resolve_copy_saved_objects_request1.yaml"
resolveCopySavedObjectsRequestExample2:
$ref: "../examples/resolve_copy_saved_objects_request2.yaml"
responses:
200:
content:
application/json:
examples:
resolveCopySavedObjectsResponseExample1:
$ref: "../examples/copy_saved_objects_response1.yaml"
resolveCopySavedObjectsResponseExample2:
$ref: "../examples/copy_saved_objects_response2.yaml"
- target: "$.paths['/api/spaces/_disable_legacy_url_aliases']['post']"
description: "Add example to disable legacy URL aliases API"
update:
requestBody:
content:
application/json:
examples:
disableLegacyURLRequestExample1:
$ref: "../examples/disable_legacy_url_request1.yaml"
- target: "$.paths['/api/spaces/_update_objects_spaces']['post']"
description: "Add example to update saved object spaces API"
update:
requestBody:
content:
application/json:
examples:
updateObjectSpacesRequestExample1:
$ref: "../examples/update_saved_objects_spaces_request1.yaml"
responses:
200:
content:
application/json:
examples:
updateObjectSpacesResponseExample1:
$ref: "../examples/update_saved_objects_spaces_response1.yaml"
- target: "$.paths['/api/security/role/{name}']['put']"
description: "Add examples to create role API"
update:
requestBody:
content:
application/json:
examples:
createRoleRequest1:
$ref: "../examples/create_role_request1.yaml"
createRoleRequest2:
$ref: "../examples/create_role_request2.yaml"
createRoleRequest3:
$ref: "../examples/create_role_request3.yaml"
createRoleRequest4:
$ref: "../examples/create_role_request4.yaml"
- target: "$.paths['/api/security/role/{name}']['get']"
description: "Add example to get role API"
update:
responses:
200:
content:
application/json:
examples:
getRoleResponse1:
$ref: '../examples/get_role_response1.yaml'
- target: "$.paths['/api/security/role']['get']"
description: "Add example to get roles API"
update:
responses:
200:
content:
application/json:
examples:
getRolesResponse1:
$ref: '../examples/get_roles_response1.yaml'