-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:elastic/kibana into apm-error-tab…
…le-api
- Loading branch information
Showing
2,006 changed files
with
49,494 additions
and
19,924 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,34 +18,20 @@ jobs: | |
) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Get backport config' | ||
run: | | ||
curl 'https://raw.githubusercontent.com/elastic/kibana/master/.backportrc.json' > .backportrc.json | ||
- name: Use Node.js 14.x | ||
uses: actions/setup-node@v1 | ||
- name: Checkout Actions | ||
uses: actions/checkout@v2 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Install backport CLI | ||
run: npm install -g [email protected] | ||
repository: 'elastic/kibana-github-actions' | ||
ref: main | ||
path: ./actions | ||
|
||
- name: Backport PR | ||
run: | | ||
git config --global user.name "kibanamachine" | ||
git config --global user.email "[email protected]" | ||
backport --fork true --username kibanamachine --accessToken "${{ secrets.KIBANAMACHINE_TOKEN }}" --ci --pr "$PR_NUMBER" --labels backport --assignee "$PR_OWNER" | tee 'output.log' | ||
env: | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
PR_OWNER: ${{ github.event.pull_request.user.login }} | ||
- name: Install Actions | ||
run: npm install --production --prefix ./actions | ||
|
||
- name: Report backport status | ||
run: | | ||
COMMENT="Backport result | ||
\`\`\` | ||
$(cat output.log) | ||
\`\`\`" | ||
GITHUB_TOKEN="${{ secrets.KIBANAMACHINE_TOKEN }}" gh api -X POST repos/elastic/kibana/issues/$PR_NUMBER/comments -F body="$COMMENT" | ||
env: | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
- name: Run Backport | ||
uses: ./actions/backport | ||
with: | ||
branch: master | ||
github_token: ${{secrets.KIBANAMACHINE_TOKEN}} | ||
commit_user: kibanamachine | ||
commit_email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[[actions-and-connectors-api]] | ||
== Action and connector APIs | ||
|
||
Manage Actions and Connectors. | ||
|
||
The following action APIs are available: | ||
|
||
* <<actions-and-connectors-api-get, Get action API>> to retrieve a single action by ID | ||
|
||
* <<actions-and-connectors-api-get-all, Get all actions API>> to retrieve all actions | ||
|
||
* <<actions-and-connectors-api-list, List all action types API>> to retrieve a list of all action types | ||
|
||
* <<actions-and-connectors-api-create, Create action API>> to create actions | ||
|
||
* <<actions-and-connectors-api-update, Update action API>> to update the attributes for an existing action | ||
|
||
* <<actions-and-connectors-api-execute, Execute action API>> to execute an action by ID | ||
|
||
* <<actions-and-connectors-api-delete, Delete action API>> to delete an action by ID | ||
|
||
For information about the actions and connectors that {kib} supports, refer to <<action-types,Action and connector types>>. | ||
|
||
include::actions-and-connectors/get.asciidoc[] | ||
include::actions-and-connectors/get_all.asciidoc[] | ||
include::actions-and-connectors/list.asciidoc[] | ||
include::actions-and-connectors/create.asciidoc[] | ||
include::actions-and-connectors/update.asciidoc[] | ||
include::actions-and-connectors/execute.asciidoc[] | ||
include::actions-and-connectors/delete.asciidoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[[actions-and-connectors-api-create]] | ||
=== Create action API | ||
++++ | ||
<titleabbrev>Create action API</titleabbrev> | ||
++++ | ||
|
||
Creates an action. | ||
|
||
[[actions-and-connectors-api-create-request]] | ||
==== Request | ||
|
||
`POST <kibana host>:<port>/api/actions/action` | ||
|
||
[[actions-and-connectors-api-create-request-body]] | ||
==== Request body | ||
|
||
`name`:: | ||
(Required, string) The display name for the action. | ||
|
||
`actionTypeId`:: | ||
(Required, string) The action type ID for the action. | ||
|
||
`config`:: | ||
(Required, object) The configuration for the action. Configuration properties vary depending on | ||
the action type. For information about the configuration properties, refer to <<action-types,Action and connector types>>. | ||
|
||
`secrets`:: | ||
(Required, object) The secrets configuration for the action. Secrets configuration properties vary | ||
depending on the action type. For information about the secrets configuration properties, refer to <<action-types,Action and connector types>>. | ||
|
||
[[actions-and-connectors-api-create-request-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[actions-and-connectors-api-create-example]] | ||
==== Example | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X POST api/actions/action -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' | ||
{ | ||
"name": "my-action", | ||
"actionTypeId": ".index", | ||
"config": { | ||
"index": "test-index" | ||
} | ||
}' | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns the following: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
"id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", | ||
"actionTypeId": ".index", | ||
"name": "my-action", | ||
"config": { | ||
"index": "test-index", | ||
"refresh": false, | ||
"executionTimeField": null | ||
}, | ||
"isPreconfigured": false | ||
} | ||
-------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[[actions-and-connectors-api-delete]] | ||
=== Delete action API | ||
++++ | ||
<titleabbrev>Delete action API</titleabbrev> | ||
++++ | ||
|
||
Deletes an action by ID. | ||
|
||
WARNING: When you delete an action, _it cannot be recovered_. | ||
|
||
[[actions-and-connectors-api-delete-request]] | ||
==== Request | ||
|
||
`DELETE <kibana host>:<port>/api/actions/action/<id>` | ||
|
||
[[actions-and-connectors-api-delete-path-params]] | ||
==== Path parameters | ||
|
||
`id`:: | ||
(Required, string) The ID of the action. | ||
|
||
[[actions-and-connectors-api-delete-response-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
==== Example | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X DELETE api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[[actions-and-connectors-api-execute]] | ||
=== Execute action API | ||
++++ | ||
<titleabbrev>Execute action API</titleabbrev> | ||
++++ | ||
|
||
Executes an action by ID. | ||
|
||
[[actions-and-connectors-api-execute-request]] | ||
==== Request | ||
|
||
`POST <kibana host>:<port>/api/actions/action/<id>/_execute` | ||
|
||
[[actions-and-connectors-api-execute-params]] | ||
==== Path parameters | ||
|
||
`id`:: | ||
(Required, string) The ID of the action. | ||
|
||
[[actions-and-connectors-api-execute-request-body]] | ||
==== Request body | ||
|
||
`params`:: | ||
(Required, object) The parameters of the action. Parameter properties vary depending on | ||
the action type. For information about the parameter properties, refer to <<action-types,Action and connector types>>. | ||
|
||
[[actions-and-connectors-api-execute-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[actions-and-connectors-api-execute-example]] | ||
==== Example | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X POST api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' | ||
{ | ||
"params": { | ||
"documents": [ | ||
{ | ||
"id": "test_doc_id", | ||
"name": "test_doc_name", | ||
"message": "hello, world" | ||
} | ||
] | ||
} | ||
}' | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns the following: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
"status": "ok", | ||
"data": { | ||
"took": 197, | ||
"errors": false, | ||
"items": [ | ||
{ | ||
"index": { | ||
"_index": "updated-index", | ||
"_id": "iKyijHcBKCsmXNFrQe3T", | ||
"_version": 1, | ||
"result": "created", | ||
"_shards": { | ||
"total": 2, | ||
"successful": 1, | ||
"failed": 0 | ||
}, | ||
"_seq_no": 0, | ||
"_primary_term": 1, | ||
"status": 201 | ||
} | ||
} | ||
] | ||
}, | ||
"actionId": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" | ||
} | ||
-------------------------------------------------- |
Oops, something went wrong.