Skip to content

Commit

Permalink
[8.x] [Threat Hunting Investigations] Use OpenAPI types in more timel…
Browse files Browse the repository at this point in the history
…ine routes (#189977) (#194581)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Threat Hunting Investigations] Use OpenAPI types in more timeline
routes (#189977)](#189977)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-24T06:49:44Z","message":"[Threat
Hunting Investigations] Use OpenAPI types in more timeline routes
(#189977)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/security-team/issues/10133\r\n\r\nMigrates
some timeline routes to use the newly generated OpenAPI types.\r\nThe
changes mostly affect pinned event and note routes to keep
the\r\nchanges small. Routes that actually accept and return timeline
objects\r\nwill come in a next step.\r\n\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"caad89426c0e790a54cfb6055f09decc3fd9733b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","Team:Threat
Hunting:Investigations","v8.16.0"],"number":189977,"url":"https://github.com/elastic/kibana/pull/189977","mergeCommit":{"message":"[Threat
Hunting Investigations] Use OpenAPI types in more timeline routes
(#189977)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/security-team/issues/10133\r\n\r\nMigrates
some timeline routes to use the newly generated OpenAPI types.\r\nThe
changes mostly affect pinned event and note routes to keep
the\r\nchanges small. Routes that actually accept and return timeline
objects\r\nwill come in a next step.\r\n\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"caad89426c0e790a54cfb6055f09decc3fd9733b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189977","number":189977,"mergeCommit":{"message":"[Threat
Hunting Investigations] Use OpenAPI types in more timeline routes
(#189977)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/security-team/issues/10133\r\n\r\nMigrates
some timeline routes to use the newly generated OpenAPI types.\r\nThe
changes mostly affect pinned event and note routes to keep
the\r\nchanges small. Routes that actually accept and return timeline
objects\r\nwill come in a next step.\r\n\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"caad89426c0e790a54cfb6055f09decc3fd9733b"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
  • Loading branch information
janmonschke authored Oct 1, 2024
1 parent f4260f1 commit 45b67b9
Show file tree
Hide file tree
Showing 45 changed files with 673 additions and 558 deletions.
133 changes: 86 additions & 47 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14772,7 +14772,8 @@ paths:
type: string
required:
- noteId
- type: object
- nullable: true
type: object
properties:
noteIds:
items:
Expand Down Expand Up @@ -14803,19 +14804,18 @@ paths:
parameters:
- in: query
name: documentIds
required: true
schema:
$ref: '#/components/schemas/Security_Timeline_API_DocumentIds'
- in: query
name: page
schema:
nullable: true
type: number
type: string
- in: query
name: perPage
schema:
nullable: true
type: number
type: string
- in: query
name: search
schema:
Expand All @@ -14838,6 +14838,12 @@ paths:
type: string
responses:
'200':
content:
application/json; Elastic-Api-Version=2023-10-31:
schema:
oneOf:
- $ref: '#/components/schemas/Security_Timeline_API_GetNotesResult'
- type: object
description: Indicates the requested notes were returned.
summary: Get all notes for a given document.
tags:
Expand Down Expand Up @@ -14886,18 +14892,8 @@ paths:
type: object
properties:
persistNote:
type: object
properties:
code:
type: number
message:
type: string
note:
$ref: '#/components/schemas/Security_Timeline_API_Note'
required:
- code
- message
- note
$ref: >-
#/components/schemas/Security_Timeline_API_ResponseNote
required:
- persistNote
required:
Expand Down Expand Up @@ -15265,15 +15261,8 @@ paths:
type: object
properties:
persistPinnedEventOnTimeline:
allOf:
- $ref: >-
#/components/schemas/Security_Timeline_API_PinnedEvent
- type: object
properties:
code:
type: number
message:
type: string
$ref: >-
#/components/schemas/Security_Timeline_API_PersistPinnedEventResponse
required:
- persistPinnedEventOnTimeline
required:
Expand Down Expand Up @@ -31180,7 +31169,27 @@ components:
nullable: true
type: string
timelineId:
type: string
updated:
nullable: true
type: number
updatedBy:
nullable: true
type: string
required:
- timelineId
Security_Timeline_API_BarePinnedEvent:
type: object
properties:
created:
nullable: true
type: number
createdBy:
nullable: true
type: string
eventId:
type: string
timelineId:
type: string
updated:
nullable: true
Expand All @@ -31189,6 +31198,7 @@ components:
nullable: true
type: string
required:
- eventId
- timelineId
Security_Timeline_API_ColumnHeaderResult:
type: object
Expand Down Expand Up @@ -31362,6 +31372,18 @@ components:
type: string
script:
type: string
Security_Timeline_API_GetNotesResult:
type: object
properties:
notes:
items:
$ref: '#/components/schemas/Security_Timeline_API_Note'
type: array
totalCount:
type: number
required:
- totalCount
- notes
Security_Timeline_API_ImportTimelineResult:
type: object
properties:
Expand Down Expand Up @@ -31422,34 +31444,38 @@ components:
type: string
version:
type: string
required:
- noteId
- version
Security_Timeline_API_PersistPinnedEventResponse:
oneOf:
- allOf:
- $ref: '#/components/schemas/Security_Timeline_API_PinnedEvent'
- $ref: >-
#/components/schemas/Security_Timeline_API_PinnedEventBaseResponseBody
- nullable: true
type: object
Security_Timeline_API_PinnedEvent:
allOf:
- $ref: '#/components/schemas/Security_Timeline_API_BarePinnedEvent'
- type: object
properties:
pinnedEventId:
type: string
version:
type: string
required:
- pinnedEventId
- version
Security_Timeline_API_PinnedEventBaseResponseBody:
type: object
properties:
created:
nullable: true
type: number
createdBy:
nullable: true
type: string
eventId:
type: string
pinnedEventId:
type: string
timelineId:
type: string
updated:
nullable: true
code:
type: number
updatedBy:
nullable: true
type: string
version:
message:
type: string
required:
- eventId
- pinnedEventId
- timelineId
- version
- code
Security_Timeline_API_QueryMatchResult:
type: object
properties:
Expand Down Expand Up @@ -31494,6 +31520,19 @@ components:
type: object
readable:
type: boolean
Security_Timeline_API_ResponseNote:
type: object
properties:
code:
type: number
message:
type: string
note:
$ref: '#/components/schemas/Security_Timeline_API_Note'
required:
- code
- message
- note
Security_Timeline_API_RowRendererId:
enum:
- alert
Expand Down
Loading

0 comments on commit 45b67b9

Please sign in to comment.