-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[SIEM] Create template timeline #63136
Conversation
Pinging @elastic/siem (Team:SIEM) |
x-pack/legacy/plugins/siem/server/lib/timeline/pick_saved_timeline.ts
Outdated
Show resolved
Hide resolved
Sure, I'll do that in another PR. |
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.
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* init routes for template timeline * create template timeline * add create/update timelines route * update api entry point * fix types * add template type * fix types * add types and template timeline id * fix types * update import timeline to handle template timeline * unit test * sudo code * remove class for savedobject * add template timeline version * clean up arguments * fix types for framework request * show filter in find * fix create template timeline * update mock data * handle missing timeline when exporting * update the order for timeline routes * update schemas * move type to common folder so we can re-use them on UI and server side * fix types + integrate persist with epic timeline * update all timeline when persit timeline * add timeline api readme * fix validation error * fix unit test * display error if unexpected format is given * fix issue with reftech all timeline query * fix flashing timeline while refetch * fix types * fix types * fix dependency * fix timeline deletion * remove redundant dependency * add i18n message * fix unit test Co-authored-by: Xavier Mouligneau <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* master: (60 commits) [SIEM] Create template timeline (elastic#63136) load react component lazily in so management section (elastic#64285) Cleanup .eslingignore and add target (elastic#64617) [Ingest] Support yaml variables in datasource (elastic#64459) typescript-ify portions of src/optimize (elastic#64688) [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546) Consolidate downloading plugin bundles to bootstrap script (elastic#64685) [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230) chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292) [Maps] fix edit filter (elastic#64586) [SIEM][Detections] Adds large list support using REST endpoints Replace a number of any-ed styled(eui*) with accurate types (elastic#64555) [Endpoint] Recursive resolver children (elastic#61914) [ML] Fix new job wizard with multiple indices (elastic#64567) Use short URLs for legacy plugin deprecation warning (elastic#64540) [Uptime] Update uptime ml job id to limit to 64 char (elastic#64394) [Ingest] Fix GET /enrollment-api-keys/null error (elastic#64595) Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin (elastic#64123) ES UI new platform cleanup (elastic#64332) [Event Log] use @timestamp field for queries (elastic#64391) ...
* alerting/np-migration: (64 commits) [ML] Changes Machine learning overview UI text (elastic#64625) [Uptime] Migrate client to New Platform (elastic#55086) Slim vis type timeseries (elastic#64631) [Telemetry] Fix inconsistent search behaviour in Advanced Settings (elastic#64510) removed unneeded dep and file [SIEM] Create template timeline (elastic#63136) load react component lazily in so management section (elastic#64285) Cleanup .eslingignore and add target (elastic#64617) [Ingest] Support yaml variables in datasource (elastic#64459) typescript-ify portions of src/optimize (elastic#64688) [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546) Consolidate downloading plugin bundles to bootstrap script (elastic#64685) [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230) chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292) [Maps] fix edit filter (elastic#64586) [SIEM][Detections] Adds large list support using REST endpoints Replace a number of any-ed styled(eui*) with accurate types (elastic#64555) [Endpoint] Recursive resolver children (elastic#61914) [ML] Fix new job wizard with multiple indices (elastic#64567) Use short URLs for legacy plugin deprecation warning (elastic#64540) ...
* init routes for template timeline * create template timeline * add create/update timelines route * update api entry point * fix types * add template type * fix types * add types and template timeline id * fix types * update import timeline to handle template timeline * unit test * sudo code * remove class for savedobject * add template timeline version * clean up arguments * fix types for framework request * show filter in find * fix create template timeline * update mock data * handle missing timeline when exporting * update the order for timeline routes * update schemas * move type to common folder so we can re-use them on UI and server side * fix types + integrate persist with epic timeline * update all timeline when persit timeline * add timeline api readme * fix validation error * fix unit test * display error if unexpected format is given * fix issue with reftech all timeline query * fix flashing timeline while refetch * fix types * fix types * fix dependency * fix timeline deletion * remove redundant dependency * add i18n message * fix unit test Co-authored-by: Xavier Mouligneau <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Xavier Mouligneau <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Pinging @elastic/security-solution (Team: SecuritySolution) |
Update timeline apirequest body:
Respose:
Update timeline template apirequest body:
Response:
|
Summary
Timeline apis
Create timeline api
POST /api/timeline
Authorization
Type: Basic Auth
username: Your Kibana username
password: Your Kibana password
Request header
Request body
Update timeline api
PATCH /api/timeline
Authorization
Type: Basic Auth
username: Your Kibana username
password: Your Kibana password
Request header
Request body
Create template timeline api
POST /api/timeline
Authorization
Type: Basic Auth
username: Your Kibana username
password: Your Kibana password
Request header
Request body
Update template timeline api
PATCH /api/timeline
Authorization
Type: Basic Auth
username: Your Kibana username
password: Your Kibana password
Request header
Request body
Implementation details:
Add a post and a patch endpoints to create/update timeline - (Refactor) Move away from graphQL to request handler.
case 1 Create timeline - POST:
undefined
/null
) => Create a new timelineUPDATE timeline with POST is not allowed, please use PATCH instead
case 2 Update timeline - PATCH - Timeline is not allowed to be updated via import timeline ATM:
if timeline-id is NOT provided (timeline-id is
undefined
/null
) =>CREATE timeline with PATCH is not allowed, please use POST instead
if timeline-id is provided (timeline-id`) => Check if the timeline id exists or not?
CREATE timeline with PATCH is not allowed, please use POST instead
timelineType
field to timeline saved object mapping - can bedefault
ortemplate
.create template timeline
by adding thetimelineType
and template timeline id argument.Keep globalNote and favourite for template timeline
case 1 Create template timeline - POST:
undefined
/null
) => Create a new template timelineUPDATE template timeline with POST is not allowed, please use PATCH instead
case 2 Update template timeline - PATCH - Template Timeline is not allowed to be updated via import timeline ATM:
TimelineVersion conflict: The given version template timeline id not match with existing timeline
Timeline id doesn't match with existing template timeline
CREATE template timeline with PATCH is not allowed, please use POST instead
"Template timelineVersion conflict: The given version is older then existing version"
CREATE template timeline with PATCH is not allowed, please use POST instead
timelineType
andtemplate timeline id
case 1 timeline-id is provided
case 2 timeline id is NOT provided
timelineType
andtemplate timeline id
Checklist
Delete any items that are not applicable to this PR.
This was checked for keyboard-only and screenreader accessibilityThis renders correctly on smaller devices using a responsive layout. (You can test this in your browserThis was checked for cross-browser compatibility, including a check against IE11For maintainers
This was checked for breaking API changes and was labeled appropriately