mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[HTTP] Make connector APIs public (#184068)
This commit is contained in:
parent
2899faeb2a
commit
c86e32c376
14 changed files with 56 additions and 0 deletions
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue