diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 902b4e96655e6..043d287b6e1d6 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -87,6 +87,15 @@ tags: - description: Data view APIs enable you to manage data views, formerly known as Kibana index patterns. name: data views x-displayName: Data views + - description: | + Programmatically integrate with Logstash configuration management. + > warn + > Do not directly access the `.logstash` index. The structure of the `.logstash` index is subject to change, which could cause your integration to break. Instead, use the Logstash configuration management APIs. + externalDocs: + description: Centralized pipeline management + url: https://www.elastic.co/guide/en/logstash/current/logstash-centralized-pipeline-management.html + name: logstash + x-displayName: Logstash configuration management - description: Machine learning name: ml x-displayName: Machine learning @@ -16492,6 +16501,169 @@ paths: summary: Get list privileges tags: - Security Lists API + /api/logstash/pipeline/{id}: + delete: + description: | + Delete a centrally-managed Logstash pipeline. + If your Elasticsearch cluster is protected with basic authentication, you must have either the `logstash_admin` built-in role or a customized Logstash writer role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: delete-logstash-pipeline + parameters: + - description: An identifier for the pipeline. + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: Indicates a successful call + summary: Delete a Logstash pipeline + tags: + - logstash + x-state: Technical Preview + get: + description: | + Get information for a centrally-managed Logstash pipeline. + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: get-logstash-pipeline + parameters: + - description: An identifier for the pipeline. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getLogstashPipelineResponseExample1: + value: |- + { + "id": "hello-world", + "description": "Just a simple pipeline", + "username": "elastic", + "pipeline": "input { stdin {} } output { stdout {} }", + "settings": { + "queue.type": "persistent" + } + } + schema: + type: object + description: Indicates a successful call + summary: Get a Logstash pipeline + tags: + - logstash + x-state: Technical Preview + put: + description: | + Create a centrally-managed Logstash pipeline or update a pipeline. + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash writer role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: put-logstash-pipeline + parameters: + - description: | + An identifier for the pipeline. Only alphanumeric characters, hyphens, and underscores are supported. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + putLogstashPipelineRequestExample1: + value: |- + { + "pipeline": "input { stdin {} } output { stdout {} }", + "settings": { + "queue.type": "persisted" + } + } + schema: + type: object + properties: + description: + description: A description of the pipeline. + type: string + pipeline: + description: A definition for the pipeline. + type: string + settings: + description: | + Supported settings, represented as object keys, include the following: + + - `pipeline.workers` + - `pipeline.batch.size` + - `pipeline.batch.delay` + - `pipeline.ecs_compatibility` + - `pipeline.ordered` + - `queue.type` + - `queue.max_bytes` + - `queue.checkpoint.writes` + type: object + required: + - pipeline + responses: + '204': + description: Indicates a successful call + summary: Create or update a Logstash pipeline + tags: + - logstash + x-state: Technical Preview + /api/logstash/pipelines: + get: + description: | + Get a list of all centrally-managed Logstash pipelines. + + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role. + > info + > Limit the number of pipelines to 10,000 or fewer. As the number of pipelines nears and surpasses 10,000, you may see performance issues on Kibana. + + The `username` property appears in the response when security is enabled and depends on when the pipeline was created or last updated. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: get-logstash-pipelines + responses: + '200': + content: + application/json: + examples: + getLogstashPipelinesResponseExample1: + value: |- + { + "pipelines": [ + { + "id": "hello-world", + "description": "Just a simple pipeline", + "last_modified": "2018-04-14T12:23:29.772Z", + "username": "elastic" + }, + { + "id": "sleepy-pipeline", + "description": "", + "last_modified": "2018-03-24T03:41:30.554Z" + } + ] + } + schema: + type: object + description: Indicates a successful call + summary: Get all Logstash pipelines + tags: + - logstash + x-state: Technical Preview /api/ml/saved_objects/sync: get: description: | diff --git a/x-pack/platform/plugins/private/logstash/docs/openapi/README.md b/x-pack/platform/plugins/private/logstash/docs/openapi/README.md new file mode 100644 index 0000000000000..a1f212de75b7d --- /dev/null +++ b/x-pack/platform/plugins/private/logstash/docs/openapi/README.md @@ -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` diff --git a/x-pack/platform/plugins/private/logstash/docs/openapi/logstash_apis.yaml b/x-pack/platform/plugins/private/logstash/docs/openapi/logstash_apis.yaml new file mode 100644 index 0000000000000..54b1d630bf59a --- /dev/null +++ b/x-pack/platform/plugins/private/logstash/docs/openapi/logstash_apis.yaml @@ -0,0 +1,188 @@ +openapi: 3.0.3 +info: + title: Logstash configuration management APIs + description: Kibana APIs for the Logstash configuration management feature + version: "1.0.0" + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license +tags: + - name: logstash + description: | + Programmatically integrate with Logstash configuration management. + > warn + > Do not directly access the `.logstash` index. The structure of the `.logstash` index is subject to change, which could cause your integration to break. Instead, use the Logstash configuration management APIs. + x-displayName: Logstash configuration management + externalDocs: + description: Centralized pipeline management + url: https://www.elastic.co/guide/en/logstash/current/logstash-centralized-pipeline-management.html +servers: + - url: / +paths: + /api/logstash/pipeline/{id}: + delete: + summary: Delete a Logstash pipeline + description: > + Delete a centrally-managed Logstash pipeline. + + If your Elasticsearch cluster is protected with basic authentication, you must have either the `logstash_admin` built-in role or a customized Logstash writer role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: delete-logstash-pipeline + x-state: Technical Preview + tags: + - logstash + parameters: + - in: path + name: id + description: An identifier for the pipeline. + required: true + schema: + type: string + responses: + '204': + description: Indicates a successful call + get: + summary: Get a Logstash pipeline + description: > + Get information for a centrally-managed Logstash pipeline. + + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: get-logstash-pipeline + x-state: Technical Preview + tags: + - logstash + parameters: + - in: path + name: id + description: An identifier for the pipeline. + required: true + schema: + type: string + responses: + '200': + description: Indicates a successful call + content: + application/json: + schema: + type: object + examples: + getLogstashPipelineResponseExample1: + value: |- + { + "id": "hello-world", + "description": "Just a simple pipeline", + "username": "elastic", + "pipeline": "input { stdin {} } output { stdout {} }", + "settings": { + "queue.type": "persistent" + } + } + put: + summary: Create or update a Logstash pipeline + description: > + Create a centrally-managed Logstash pipeline or update a pipeline. + + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash writer role. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: put-logstash-pipeline + x-state: Technical Preview + tags: + - logstash + parameters: + - in: path + name: id + description: > + An identifier for the pipeline. + Only alphanumeric characters, hyphens, and underscores are supported. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + required: + - pipeline + properties: + description: + type: string + description: A description of the pipeline. + pipeline: + type: string + description: A definition for the pipeline. + settings: + type: object + description: | + Supported settings, represented as object keys, include the following: + + - `pipeline.workers` + - `pipeline.batch.size` + - `pipeline.batch.delay` + - `pipeline.ecs_compatibility` + - `pipeline.ordered` + - `queue.type` + - `queue.max_bytes` + - `queue.checkpoint.writes` + examples: + putLogstashPipelineRequestExample1: + value: |- + { + "pipeline": "input { stdin {} } output { stdout {} }", + "settings": { + "queue.type": "persisted" + } + } + responses: + '204': + description: Indicates a successful call + /api/logstash/pipelines: + get: + summary: Get all Logstash pipelines + description: | + Get a list of all centrally-managed Logstash pipelines. + + To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash reader role. + > info + > Limit the number of pipelines to 10,000 or fewer. As the number of pipelines nears and surpasses 10,000, you may see performance issues on Kibana. + + The `username` property appears in the response when security is enabled and depends on when the pipeline was created or last updated. + externalDocs: + description: Secure your connection + url: https://www.elastic.co/guide/en/logstash/current/ls-security.html + operationId: get-logstash-pipelines + x-state: Technical Preview + tags: + - logstash + responses: + '200': + description: Indicates a successful call + content: + application/json: + schema: + type: object + examples: + getLogstashPipelinesResponseExample1: + value: |- + { + "pipelines": [ + { + "id": "hello-world", + "description": "Just a simple pipeline", + "last_modified": "2018-04-14T12:23:29.772Z", + "username": "elastic" + }, + { + "id": "sleepy-pipeline", + "description": "", + "last_modified": "2018-03-24T03:41:30.554Z" + } + ] + }