Run a connector

POST /api/actions/connector/{id}/_execute

Spaces method and path for this operation:

post /s/{space_id}/api/actions/connector/{id}/_execute

Refer to Spaces for more information.

You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • id string Required

    An identifier for the connector.

application/json

Body

  • params object Required

    One of:

Responses

  • 200 application/json

    Indicates a successful call.

    Hide response attributes Show response attributes object
    • config object

      Additional properties are allowed.

    • connector_type_id string Required

      The connector type identifier.

    • id string Required

      The identifier for the connector.

    • is_deprecated boolean Required

      Indicates whether the connector is deprecated.

    • is_missing_secrets boolean

      Indicates whether the connector is missing secrets.

    • is_preconfigured boolean Required

      Indicates whether the connector is preconfigured. If true, the config and is_missing_secrets properties are omitted from the response.

    • is_system_action boolean Required

      Indicates whether the connector is used for system actions.

    • name string Required

      The name of the rule.

POST /api/actions/connector/{id}/_execute
curl \ --request POST 'https://localhost:5601/api/actions/connector/{id}/_execute' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: true" \ --data '{"params":{"documents":[{"id":"my_doc_id","name":"my_doc_name","message":"hello, world"}]}}'
Request examples
{ "params": { "documents": [ { "id": "my_doc_id", "name": "my_doc_name", "message": "hello, world" } ] } }
{ "params": { "subAction": "issueTypes" } }
{ "params": { "subAction": "getChoices", "subActionParams": { "fields": [ "severity", "urgency" ] } } }
{ "params": { "subAction": "postMessage", "subActionParams": { "text": "A test message.", "channelIds": [ "C123ABC456" ] } } }
{ "params": { "subAction": "pushToService", "subActionParams": { "comments": [ { "comment": "A comment about the incident.", "commentId": 1 } ], "incident": { "caseId": "1000", "caseName": "Case name", "description": "Description of the incident." } } } }
Response examples (200)
{ "data": { "took": 135, "items": [ { "create": { "_id": "4JtvwYUBrcyxt2NnfW3y", "_index": "my-index", "result": "created", "status": 201, "_seq_no": 0, "_shards": { "total": 2, "failed": 0, "successful": 1 }, "_version": 1, "_primary_term": 1 } } ], "errors": false }, "status": "ok", "connector_id": "fd38c600-96a5-11ed-bb79-353b74189cba" }
{ "data": [ { "id": 10024, "name": "Improvement" }, { "id": 10006, "name": "Task" }, { "id": 10007, "name": "Sub-task" }, { "id": 10025, "name": "New Feature" }, { "id": 10023, "name": "Bug" }, { "id": 10000, "name": "Epic" } ], "status": "ok", "connector_id": "b3aad810-edbe-11ec-82d1-11348ecbf4a6" }
{ "status": "ok", "connector_id": "7fc7b9a0-ecc9-11ec-8736-e7d63118c907" }
{ "data": [ { "label": "Critical", "value": 1, "element": "severity", "dependent_value": "" }, { "label": "Major", "value": 2, "element": "severity", "dependent_value": "" }, { "label": "Minor", "value": 3, "element": "severity", "dependent_value": "" }, { "label": "Warning", "value": 4, "element": "severity", "dependent_value": "" }, { "label": "OK", "value": 5, "element": "severity", "dependent_value": "" }, { "label": "Clear", "value": 0, "element": "severity", "dependent_value": "" }, { "label": "1 - High", "value": 1, "element": "urgency", "dependent_value": "" }, { "label": "2 - Medium", "value": 2, "element": "urgency", "dependent_value": "" }, { "label": "3 - Low", "value": 3, "element": "urgency", "dependent_value": "" } ], "status": "ok", "connector_id": "9d9be270-2fd2-11ed-b0e0-87533c532698" }
{ "data": { "ok": true, "ts": "1234567890.123456", "channel": "C123ABC456", "message": { "ts": "1234567890.123456", "team": "T01ABCDE2F", "text": "A test message", "type": "message", "user": "U12A345BC6D", "app_id": "A01BC2D34EF", "blocks": [ { "type": "rich_text", "block_id": "/NXe", "elements": [ { "type": "rich_text_section", "elements": [ { "text": "A test message.", "type": "text" } ] } ] } ], "bot_id": "B12BCDEFGHI", "bot_profile": { "id": "B12BCDEFGHI", "name": "test", "icons": { "image_36": "https://a.slack-edge.com/80588/img/plugins/app/bot_36.png" }, "app_id": "A01BC2D34EF", "deleted": false, "team_id": "T01ABCDE2F", "updated": 1672169705 } } }, "status": "ok", "connector_id": ".slack_api" }
{ "data": { "id": "aKPmBHWzmdRQtx6Mx", "url": "https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx", "title": "TEST-457", "comments": [ { "commentId": 1, "pushedDate": "2022-09-08T16:52:27.865Z" } ], "pushedDate": "2022-09-08T16:52:27.866Z" }, "status": "ok", "connector_id": "a4746470-2f94-11ed-b0e0-87533c532698" }