Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTTP] Make connector APIs public #184068

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/connector/get/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export const getConnectorRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}/connector/{id}`,
options: {
access: 'public',
description: `Get connector information`,
},
validate: {
params: getConnectorParamsSchemaV1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const getAllConnectorsRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}/connectors`,
options: {
access: 'public',
description: `Get all connectors`,
},
validate: {},
},
router.handleLegacyErrors(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const listTypesRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}/connector_types`,
options: {
access: 'public',
description: `Get connector types`,
},
validate: {
query: connectorTypesQuerySchemaV1,
},
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export const createActionRoute = (
router.post(
{
path: `${BASE_ACTION_API_PATH}/connector/{id?}`,
options: {
access: 'public',
description: 'Create a connector',
},
validate: {
params: schema.maybe(
schema.object({
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export const deleteActionRoute = (
router.delete(
{
path: `${BASE_ACTION_API_PATH}/connector/{id}`,
options: {
access: 'public',
description: `Delete a connector`,
},
validate: {
params: paramSchema,
},
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const executeActionRoute = (
router.post(
{
path: `${BASE_ACTION_API_PATH}/connector/{id}/_execute`,
options: {
access: 'public',
description: `Run a connector`,
},
validate: {
body: bodySchema,
params: paramSchema,
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const createActionRoute = (
router.post(
{
path: `${BASE_ACTION_API_PATH}/action`,
options: {
access: 'public',
description: `Create a connector`,
},
validate: {
body: bodySchema,
},
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const deleteActionRoute = (
router.delete(
{
path: `${BASE_ACTION_API_PATH}/action/{id}`,
options: {
access: 'public',
description: `Delete a connector`,
},
validate: {
params: paramSchema,
},
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const executeActionRoute = (
router.post(
{
path: `${BASE_ACTION_API_PATH}/action/{id}/_execute`,
options: {
access: 'public',
description: `Run a connector`,
},
validate: {
body: bodySchema,
params: paramSchema,
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const getActionRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}/action/{id}`,
options: {
access: 'public',
description: `Get connector information`,
},
validate: {
params: paramSchema,
},
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/get_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const getAllActionRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}`,
options: {
access: 'public',
description: `Get all connectors`,
},
validate: {},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const listActionTypesRoute = (
router.get(
{
path: `${BASE_ACTION_API_PATH}/list_action_types`,
options: {
access: 'public',
description: `Get connector types`,
},
validate: {},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/legacy/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const updateActionRoute = (
router.put(
{
path: `${BASE_ACTION_API_PATH}/action/{id}`,
options: {
access: 'public',
description: `Update a connector`,
},
validate: {
body: bodySchema,
params: paramSchema,
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/actions/server/routes/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const updateActionRoute = (
router.put(
{
path: `${BASE_ACTION_API_PATH}/connector/{id}`,
options: {
access: 'public',
description: `Update a connector`,
},
validate: {
body: bodySchema,
params: paramSchema,
Expand Down