Run a connector
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.
Path parameters
-
An identifier for the connector.
Body Required
The properties vary depending on the connector type.
params object Required
One of: Connectors_run_connector_params_acknowledge_resolve_pagerduty object Connectors_run_connector_params_documents object object-1 object object-2 object object-3 object Connectors_run_connector_params_message_serverlog object Connectors_run_connector_params_message_slack object Connectors_run_connector_params_trigger_pagerduty object Connectors_run_connector_subaction_addevent object Connectors_run_connector_subaction_closealert object Connectors_run_connector_subaction_closeincident object Connectors_run_connector_subaction_createalert object Connectors_run_connector_subaction_fieldsbyissuetype object Connectors_run_connector_subaction_getchoices object Connectors_run_connector_subaction_getfields object Connectors_run_connector_subaction_getincident object Connectors_run_connector_subaction_issue object Connectors_run_connector_subaction_issues object Connectors_run_connector_subaction_issuetypes object Connectors_run_connector_subaction_postmessage object Connectors_run_connector_subaction_pushtoservice object Connectors_run_connector_subaction_validchannelid object
POST /api/actions/connector/{connectorId}/_execute
curl \
-X POST https://localhost:5601/api/actions/connector/df770e30-8b8b-11ed-a780-3b746c987a81/_execute \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "kbn-xsrf: string"
Request examples
Run a Webhook - Case Management connector to create a case.
{
"params": {
"subAction": "pushToService",
"subActionParams": {
"comments": [
{
"comment": "A comment about the incident.",
"commentId": 1
}
],
"incident": {
"id": "caseID",
"tags": [
"tag1",
"tag2"
],
"title": "Case title",
"status": "open",
"severity": "low",
"description": "Description of the incident."
}
}
}
}
{
"params": {
"cc": [
"user2@example.com",
"user3@example.com"
],
"to": [
"user4@example.com"
],
"bcc": [
"user1@example.com"
],
"message": "Test email message.",
"subject": "Test message subject"
}
}
{
"params": {
"documents": [
{
"id": "my_doc_id",
"name": "my_doc_name",
"message": "hello, world"
}
]
}
}
{
"params": {
"subAction": "issueTypes"
}
}
{
"params": {
"links": [
{
"href": "http://example.com/pagerduty",
"text": "An example link"
}
],
"summary": "A brief event summary",
"eventAction": "trigger",
"customDetails": {
"my_data_1": "test data"
}
}
}
{
"params": {
"level": "warn",
"message": "Test warning message."
}
}
{
"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)
Response from a pushToService action for a Webhook - Case Management connector.
{
"data": {
"id": 100665,
"url": "https://example.com/browse/TEST-29034",
"title": "TEST-29034",
"comments": [
{
"commentId": 1,
"pushedDate": "2023-12-05T19:43:36.360Z"
}
],
"pushedDate": "2023-12-05T19:43:36.360Z"
},
"status": "ok",
"connector_id": "1824b5b8-c005-4dcc-adac-57f92db46459"
}
{
"data": {
"accepted": [
"user1@example.com",
"user2@example.com",
"user3@example.com",
"user4@example.com"
],
"envelope": {
"to": [
"user1@example.com",
"user2@example.com",
"user3@example.com",
"user4@example.com"
],
"from": "tester@example.com"
},
"rejected": [],
"response": "250 Message queued as QzEXKcGJ",
"messageId": "<08a92d29-642a-0706-750c-de5996bd5cf3@example.com>",
"messageSize": 729,
"messageTime": 3,
"envelopeTime": 8
},
"status": "ok",
"connector_id": "7fc7b9a0-ecc9-11ec-8736-e7d63118c907"
}
{
"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"
}
{
"data": {
"status": "success",
"message": "Event processed",
"dedup_key": "5115e138b26b484a81eaea779faa6016"
},
"status": "ok",
"connector_id": "45de9f70-954f-4608-b12a-db7cf808e49d"
}
{
"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"
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}