diff --git a/x-pack/plugins/actions/server/routes/connector/get/get.ts b/x-pack/plugins/actions/server/routes/connector/get/get.ts index 29d917702af4..4519673a400f 100644 --- a/x-pack/plugins/actions/server/routes/connector/get/get.ts +++ b/x-pack/plugins/actions/server/routes/connector/get/get.ts @@ -27,11 +27,16 @@ export const getConnectorRoute = ( access: 'public', summary: `Get connector information`, tags: ['oas-tag:connectors'], - // description: - // 'You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.', }, validate: { - params: getConnectorParamsSchemaV1, + request: { + params: getConnectorParamsSchemaV1, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( diff --git a/x-pack/plugins/actions/server/routes/create.ts b/x-pack/plugins/actions/server/routes/create.ts index 2803c5d31d60..f7e8b61707d7 100644 --- a/x-pack/plugins/actions/server/routes/create.ts +++ b/x-pack/plugins/actions/server/routes/create.ts @@ -63,16 +63,21 @@ export const createActionRoute = ( access: 'public', summary: 'Create a connector', tags: ['oas-tag:connectors'], - // description: - // 'You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.', }, validate: { - params: schema.maybe( - schema.object({ - id: schema.maybe(schema.string()), - }) - ), - body: bodySchema, + request: { + params: schema.maybe( + schema.object({ + id: schema.maybe(schema.string()), + }) + ), + body: bodySchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( diff --git a/x-pack/plugins/actions/server/routes/delete.ts b/x-pack/plugins/actions/server/routes/delete.ts index 8e2dd21952ab..8b25fe66c9eb 100644 --- a/x-pack/plugins/actions/server/routes/delete.ts +++ b/x-pack/plugins/actions/server/routes/delete.ts @@ -29,11 +29,17 @@ export const deleteActionRoute = ( access: 'public', summary: `Delete a connector`, description: 'WARNING: When you delete a connector, it cannot be recovered.', - // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: ['oas-tag:connectors'], }, validate: { - params: paramSchema, + request: { + params: paramSchema, + }, + response: { + 204: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( diff --git a/x-pack/plugins/actions/server/routes/execute.ts b/x-pack/plugins/actions/server/routes/execute.ts index 83b6e72652b0..6f2ad11e2058 100644 --- a/x-pack/plugins/actions/server/routes/execute.ts +++ b/x-pack/plugins/actions/server/routes/execute.ts @@ -46,12 +46,18 @@ export const executeActionRoute = ( summary: `Run a connector`, description: 'You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.', - // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. tags: ['oas-tag:connectors'], }, validate: { - body: bodySchema, - params: paramSchema, + request: { + body: bodySchema, + params: paramSchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( diff --git a/x-pack/plugins/actions/server/routes/legacy/create.ts b/x-pack/plugins/actions/server/routes/legacy/create.ts index 3fd8c7775912..d668b1fbc19d 100644 --- a/x-pack/plugins/actions/server/routes/legacy/create.ts +++ b/x-pack/plugins/actions/server/routes/legacy/create.ts @@ -40,7 +40,14 @@ export const createActionRoute = ( deprecated: true, }, validate: { - body: bodySchema, + request: { + body: bodySchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( diff --git a/x-pack/plugins/actions/server/routes/legacy/delete.ts b/x-pack/plugins/actions/server/routes/legacy/delete.ts index e2df62e5ec4b..2204095e0380 100644 --- a/x-pack/plugins/actions/server/routes/legacy/delete.ts +++ b/x-pack/plugins/actions/server/routes/legacy/delete.ts @@ -35,7 +35,14 @@ export const deleteActionRoute = ( deprecated: true, }, validate: { - params: paramSchema, + request: { + params: paramSchema, + }, + response: { + 204: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors(async function (context, req, res) { diff --git a/x-pack/plugins/actions/server/routes/legacy/execute.ts b/x-pack/plugins/actions/server/routes/legacy/execute.ts index abe8971baf1c..88e75aadb627 100644 --- a/x-pack/plugins/actions/server/routes/legacy/execute.ts +++ b/x-pack/plugins/actions/server/routes/legacy/execute.ts @@ -40,8 +40,15 @@ export const executeActionRoute = ( tags: ['oas-tag:connectors'], }, validate: { - body: bodySchema, - params: paramSchema, + request: { + body: bodySchema, + params: paramSchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors(async function (context, req, res) { diff --git a/x-pack/plugins/actions/server/routes/legacy/get.ts b/x-pack/plugins/actions/server/routes/legacy/get.ts index e95c88fca7c4..524b3522ed54 100644 --- a/x-pack/plugins/actions/server/routes/legacy/get.ts +++ b/x-pack/plugins/actions/server/routes/legacy/get.ts @@ -34,7 +34,14 @@ export const getActionRoute = ( tags: ['oas-tag:connectors'], }, validate: { - params: paramSchema, + request: { + params: paramSchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors(async function (context, req, res) { diff --git a/x-pack/plugins/actions/server/routes/legacy/update.ts b/x-pack/plugins/actions/server/routes/legacy/update.ts index f07682706fc1..5f234c8bf55a 100644 --- a/x-pack/plugins/actions/server/routes/legacy/update.ts +++ b/x-pack/plugins/actions/server/routes/legacy/update.ts @@ -40,8 +40,15 @@ export const updateActionRoute = ( tags: ['oas-tag:connectors'], }, validate: { - body: bodySchema, - params: paramSchema, + request: { + body: bodySchema, + params: paramSchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors(async function (context, req, res) { diff --git a/x-pack/plugins/actions/server/routes/update.ts b/x-pack/plugins/actions/server/routes/update.ts index 0077c1632877..efb4d036b1e4 100644 --- a/x-pack/plugins/actions/server/routes/update.ts +++ b/x-pack/plugins/actions/server/routes/update.ts @@ -58,12 +58,17 @@ export const updateActionRoute = ( access: 'public', summary: `Update a connector`, tags: ['oas-tag:connectors'], - // description: - // 'You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.', }, validate: { - body: bodySchema, - params: paramSchema, + request: { + body: bodySchema, + params: paramSchema, + }, + response: { + 200: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors(