-
Notifications
You must be signed in to change notification settings - Fork 205
Adds missing Update Timeline & Timeline template API docs #3692
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
Changes from 12 commits
4734360
bed2245
1befe81
cad52e5
2a5f5c7
d288c35
bd0c286
3b3e0ac
7543d49
5f4f84c
385130f
f4240a8
b6acc92
ecc509e
172d66c
6b4bf58
ffae741
704bfb6
85e8c02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,385 @@ | ||||||
| [[timeline-template-api-update]] | ||||||
| === Update Timeline or Timeline template | ||||||
|
|
||||||
| Updates an existing Timeline or Timeline template. | ||||||
|
|
||||||
| Use the `timeline` object's <<timeline-object-typeField, `timelineType`>> field | ||||||
| to specify whether you're updating a Timeline or a Timeline template: | ||||||
|
|
||||||
| * `"timelineType": "default"` updates an existing Timeline | ||||||
| * `"timelineType": "template"` updates an existing Timeline template | ||||||
|
|
||||||
| ==== Request URL | ||||||
|
|
||||||
| `PATCH <kibana host>:<port>/api/timeline` | ||||||
|
|
||||||
| ==== Request body | ||||||
|
|
||||||
| A JSON object defining the Timeline or Timeline template query and time filter. | ||||||
|
|
||||||
| NOTE: For detailed information about the Timeline object schema and its | ||||||
| corresponding UI components, refer to <<timeline-object-schema>>. | ||||||
|
|
||||||
| [width="100%",options="header"] | ||||||
| |============================================== | ||||||
| |Name |Type |Description |Required | ||||||
|
|
||||||
| |`timeline` |<<timeline-object-schema, timeline>> a|The timeline object, which | ||||||
natasha-moore-elastic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| defines the search criteria and time range. | ||||||
natasha-moore-elastic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| If you're updating a Timeline template, provide these fields so you can | ||||||
| easily <<timeline-api-import, import template>> updates: | ||||||
|
|
||||||
| * `templateTimelineId`: Use the unique identifier (UUID) of the Timeline template that you're updating. | ||||||
| * `templateTimelineVersion`: Specify a new version number for the template. It must be greater than the existing version number. | ||||||
|
|
||||||
| |Yes | ||||||
| |`timelineId` |String |The `savedObjectId` of the Timeline that you're updating. | ||||||
| |Yes | ||||||
| |`version` |String |The version of the Timeline that you're updating. | ||||||
| |Yes | ||||||
| |============================================== | ||||||
|
|
||||||
| ===== Example requests | ||||||
|
|
||||||
| *Example 1* | ||||||
|
|
||||||
| Updates an existing Timeline. | ||||||
|
|
||||||
| [source,console] | ||||||
| -------------------------------------------------- | ||||||
| PATCH api/timeline | ||||||
| { | ||||||
| "timeline": { | ||||||
| "columns": [ | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "@timestamp" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "message" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "event.category" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "event.action" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "host.name" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "source.ip" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "destination.ip" | ||||||
| }, | ||||||
| { | ||||||
| "columnHeaderType": "not-filtered", | ||||||
| "id": "user.name" | ||||||
| } | ||||||
| ], | ||||||
| "dataProviders": [], | ||||||
| "description": "", | ||||||
| "eventType": "all", | ||||||
| "filters": [], | ||||||
| "kqlMode": "filter", | ||||||
| "kqlQuery": { | ||||||
| "filterQuery": null | ||||||
| }, | ||||||
| "title": "abd", | ||||||
| "dateRange": { | ||||||
| "start": 1587370079200, | ||||||
| "end": 1587456479201 | ||||||
| }, | ||||||
| "savedQueryId": null, | ||||||
| "sort": { | ||||||
| "columnId": "@timestamp", | ||||||
| "sortDirection": "desc" | ||||||
| }, | ||||||
| "created": 1587468588922, | ||||||
| "createdBy": "casetester", | ||||||
| "updated": 1587468588922, | ||||||
| "updatedBy": "casetester", | ||||||
| "timelineType": "default" | ||||||
| }, | ||||||
| "timelineId": "4bc294e0-3516-11ee-9f62-49614d8a84fd", <1> | ||||||
| "version": "WzE5MTUsMV0=" <2> | ||||||
| } | ||||||
| -------------------------------------------------- | ||||||
|
|
||||||
| <1> `timelineId` must match the existing Timeline's `savedObjectId`. | ||||||
| <2> `version` must match the existing Timeline version. | ||||||
|
||||||
| <2> `version` must match the existing Timeline version. | |
| <2> `version` must match the version of the Timeline that you're updating. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, you want to update the title of an existing timeline
{
"timeline": {
....
"title": "abd",
....
},
"timelineId": "4bc294e0-3516-11ee-9f62-49614d8a84fd",
"version": "WzE5MTUsMV0="
}
In your request, just leave timelineId and version as it is and update the title to the new value.
Uh oh!
There was an error while loading. Please reload this page.