From fe4ec7e00e526d9f7572f520d53d36aec39266ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:49:44 -0800 Subject: [PATCH] Add Logstash API examples (#3436) (#3447) (cherry picked from commit 254c12f7ea0039a8015fc17c0fd46022edcdccaa) Co-authored-by: Lisa Cawley --- output/openapi/elasticsearch-openapi.json | 2 +- .../elasticsearch-serverless-openapi.json | 2 +- output/schema/schema.json | 21 +++++++++++-------- .../LogstashDeletePipelineRequest.ts | 3 ++- .../LogstashGetPipelineRequest.ts | 2 +- .../LogstashGetPipelineResponseExample1.yaml | 21 +++++++++++++++++++ .../LogstashPutPipelineRequest.ts | 1 + .../LogstashPutPipelineRequestExample1.yaml | 19 +++++++++++++++++ 8 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 specification/logstash/get_pipeline/LogstashGetPipelineResponseExample1.yaml create mode 100644 specification/logstash/put_pipeline/LogstashPutPipelineRequestExample1.yaml diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 06e9875470..78a4b7fc52 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -16840,7 +16840,7 @@ "logstash" ], "summary": "Delete a Logstash pipeline", - "description": "Delete a pipeline that is used for Logstash Central Management.", + "description": "Delete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", "externalDocs": { "url": "https://www.elastic.co/guide/en/logstash/current/logstash-centralized-pipeline-management.html" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 974e05aaaa..b9b6a1ea7d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9576,7 +9576,7 @@ "logstash" ], "summary": "Delete a Logstash pipeline", - "description": "Delete a pipeline that is used for Logstash Central Management.", + "description": "Delete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", "externalDocs": { "url": "https://www.elastic.co/guide/en/logstash/current/logstash-centralized-pipeline-management.html" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 5debca1ab2..d89e1e99d4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9454,8 +9454,9 @@ "stability": "stable" } }, - "description": "Delete a Logstash pipeline.\n\nDelete a pipeline that is used for Logstash Central Management.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html", + "description": "Delete a Logstash pipeline.\nDelete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", + "docId": "logstash-api-delete-pipeline", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-delete-pipeline.html", "extDocId": "logstash-centralized-pipeline-management", "extDocUrl": "https://www.elastic.co/guide/en/logstash/{branch}/logstash-centralized-pipeline-management.html", "name": "logstash.delete_pipeline", @@ -9496,8 +9497,9 @@ "stability": "stable" } }, - "description": "Get Logstash pipelines.\n\nGet pipelines that are used for Logstash Central Management.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html", + "description": "Get Logstash pipelines.\nGet pipelines that are used for Logstash Central Management.", + "docId": "logstash-api-get-pipeline", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-get-pipeline.html", "extDocId": "logstash-centralized-pipeline-management", "extDocUrl": "https://www.elastic.co/guide/en/logstash/{branch}/logstash-centralized-pipeline-management.html", "name": "logstash.get_pipeline", @@ -9545,7 +9547,8 @@ } }, "description": "Create or update a Logstash pipeline.\n\nCreate a pipeline that is used for Logstash Central Management.\nIf the specified pipeline exists, it is replaced.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html", + "docId": "logstash-api-put-pipeline", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-put-pipeline.html", "extDocId": "logstash-centralized-pipeline-management", "extDocUrl": "https://www.elastic.co/guide/en/logstash/{branch}/logstash-centralized-pipeline-management.html", "name": "logstash.put_pipeline", @@ -150469,7 +150472,7 @@ "body": { "kind": "no_body" }, - "description": "Delete a Logstash pipeline.\n\nDelete a pipeline that is used for Logstash Central Management.", + "description": "Delete a Logstash pipeline.\nDelete a pipeline that is used for Logstash Central Management.\nIf the request succeeds, you receive an empty response with an appropriate status code.", "inherits": { "type": { "name": "RequestBase", @@ -150495,7 +150498,7 @@ } ], "query": [], - "specLocation": "logstash/delete_pipeline/LogstashDeletePipelineRequest.ts#L23-L40" + "specLocation": "logstash/delete_pipeline/LogstashDeletePipelineRequest.ts#L23-L41" }, { "kind": "response", @@ -150516,7 +150519,7 @@ "body": { "kind": "no_body" }, - "description": "Get Logstash pipelines.\n\nGet pipelines that are used for Logstash Central Management.", + "description": "Get Logstash pipelines.\nGet pipelines that are used for Logstash Central Management.", "inherits": { "type": { "name": "RequestBase", @@ -150615,7 +150618,7 @@ } ], "query": [], - "specLocation": "logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L44" + "specLocation": "logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L45" }, { "kind": "response", diff --git a/specification/logstash/delete_pipeline/LogstashDeletePipelineRequest.ts b/specification/logstash/delete_pipeline/LogstashDeletePipelineRequest.ts index a94dc2b20e..81506faac6 100644 --- a/specification/logstash/delete_pipeline/LogstashDeletePipelineRequest.ts +++ b/specification/logstash/delete_pipeline/LogstashDeletePipelineRequest.ts @@ -22,12 +22,13 @@ import { Id } from '@_types/common' /** * Delete a Logstash pipeline. - * * Delete a pipeline that is used for Logstash Central Management. + * If the request succeeds, you receive an empty response with an appropriate status code. * @rest_spec_name logstash.delete_pipeline * @availability stack since=7.12.0 stability=stable * @availability serverless stability=stable visibility=public * @cluster_privileges manage_logstash_pipelines + * @doc_id logstash-api-delete-pipeline * @ext_doc_id logstash-centralized-pipeline-management */ export interface Request extends RequestBase { diff --git a/specification/logstash/get_pipeline/LogstashGetPipelineRequest.ts b/specification/logstash/get_pipeline/LogstashGetPipelineRequest.ts index 52b59d2706..8c37c0c8f6 100644 --- a/specification/logstash/get_pipeline/LogstashGetPipelineRequest.ts +++ b/specification/logstash/get_pipeline/LogstashGetPipelineRequest.ts @@ -22,12 +22,12 @@ import { Ids } from '@_types/common' /** * Get Logstash pipelines. - * * Get pipelines that are used for Logstash Central Management. * @rest_spec_name logstash.get_pipeline * @availability stack since=7.12.0 stability=stable * @availability serverless stability=stable visibility=public * @cluster_privileges manage_logstash_pipelines + * @doc_id logstash-api-get-pipeline * @ext_doc_id logstash-centralized-pipeline-management */ export interface Request extends RequestBase { diff --git a/specification/logstash/get_pipeline/LogstashGetPipelineResponseExample1.yaml b/specification/logstash/get_pipeline/LogstashGetPipelineResponseExample1.yaml new file mode 100644 index 0000000000..17a0d29bfc --- /dev/null +++ b/specification/logstash/get_pipeline/LogstashGetPipelineResponseExample1.yaml @@ -0,0 +1,21 @@ +# summary: +description: > + A successful response from `GET _logstash/pipeline/my_pipeline`. +# type: "response" +# response_code: 200 +value: + my_pipeline: + description: Sample pipeline for illustration purposes + last_modified: '2021-01-02T02:50:51.250Z' + pipeline_metadata: + type: logstash_pipeline + version: '1' + username: elastic + pipeline: 'input {}\n filter { grok {} }\n output {}' + pipeline_settings: + pipeline.workers: 1 + pipeline.batch.size: 125 + pipeline.batch.delay: 50 + queue.type: memory + queue.max_bytes: 1gb + queue.checkpoint.writes: 1024 diff --git a/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts b/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts index aac5048de2..001273cb2f 100644 --- a/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts +++ b/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts @@ -30,6 +30,7 @@ import { Id } from '@_types/common' * @availability stack since=7.12.0 stability=stable * @availability serverless stability=stable visibility=public * @cluster_privileges manage_logstash_pipelines + * @doc_id logstash-api-put-pipeline * @ext_doc_id logstash-centralized-pipeline-management */ export interface Request extends RequestBase { diff --git a/specification/logstash/put_pipeline/LogstashPutPipelineRequestExample1.yaml b/specification/logstash/put_pipeline/LogstashPutPipelineRequestExample1.yaml new file mode 100644 index 0000000000..609e3707ef --- /dev/null +++ b/specification/logstash/put_pipeline/LogstashPutPipelineRequestExample1.yaml @@ -0,0 +1,19 @@ +summary: Create a pipeline +# method_request: PUT _logstash/pipeline/my_pipeline +description: Run `PUT _logstash/pipeline/my_pipeline` to create a pipeline. +# type: request +value: + description: Sample pipeline for illustration purposes + last_modified: '2021-01-02T02:50:51.250Z' + pipeline_metadata: + type: logstash_pipeline + version: 1 + username: elastic + pipeline: 'input {}\n filter { grok {} }\n output {}' + pipeline_settings: + pipeline.workers: 1 + pipeline.batch.size: 125 + pipeline.batch.delay: 50 + queue.type: memory + queue.max_bytes: 1gb + queue.checkpoint.writes: 1024