Skip to content
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

Findings search API draft #368

Conversation

annie3431
Copy link
Contributor

Signed-off-by: Annie Lee leeyun@amazon.com

Issue #, if available:
N/A

Description of changes:
Add data classes related to Findings Search API. Tested locally using Dashboards dev tools to create document returning monitors and put documents.

The command to call Findings Search API is GET _plugins/_alerting/findings/_search

TODO: Need to add parsed documents to FindingWithDoc objects. Currently the search is done, but the document is not yet added to documents list.

CheckList:
[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Annie Lee <leeyun@amazon.com>
@annie3431 annie3431 requested a review from a team March 30, 2022 05:47
Annie Lee added 9 commits March 30, 2022 10:29
Signed-off-by: Annie Lee <leeyun@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
commit 60befe6
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:54:07 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 6838b4c
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:49:38 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit a5d976e
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:49:00 2022 -0700

    Comment out document parsing logic

commit 4a3a7dd
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:24:54 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit e392de5
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:10:23 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 77590ba
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:07:41 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 4c8f68f
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 30 16:02:46 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 2e58bc2
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:10:03 2022 -0700

    Update TransportGetDestinationsAction.kt

commit 91bf628
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:07:47 2022 -0700

    Update Finding.kt

commit 601b015
Merge: 3703839 bc03933
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:06:32 2022 -0700

    Merge branch 'document-level-alerting-dev' into findings-test

commit 3703839
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:05:18 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 055a134
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:03:30 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 0baebc5
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:02:28 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit a43ca25
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 22:00:35 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 18a8e84
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 21:42:34 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 2d2d9ff
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 21:27:40 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 62d7949
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 21:26:41 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit f57a169
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 21:12:42 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit c077f22
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 21:08:13 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit f1997c0
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 20:56:31 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 26014c4
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 20:53:07 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 5d0a99f
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 20:49:36 2022 -0700

    Revert "Update TransportGetFindingsSearchAction.kt"

    This reverts commit 9b91b85.

commit 9b91b85
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 20:45:26 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 1c83299
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 20:28:27 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 0d2d7ca
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:55:33 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 7851fd7
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:55:27 2022 -0700

    Update FindingWithDocs.kt

commit 8764c84
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:45:31 2022 -0700

    Update FindingDocument.kt

commit 108bbbf
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:42:11 2022 -0700

    Update FindingDocument.kt

commit d2079ae
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:40:01 2022 -0700

    update type

commit 56734a3
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 19:26:56 2022 -0700

    Implement parse logic

commit 088811b
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 18:53:33 2022 -0700

    Update response

commit a18252a
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:39:50 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit bbebf3d
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:34:30 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit f95cfd9
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:32:57 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 5ed68b2
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:27:45 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 2f84775
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:24:19 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit c182f05
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:20:16 2022 -0700

    Update searchDocument function

commit 18d5e1d
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 16:01:38 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit e73e4db
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 15:51:09 2022 -0700

    Update response format

commit 79e9029
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 29 11:02:56 2022 -0700

    Add a new data class FindingWithDocs

commit 5d64f96
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 24 15:17:58 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 32eefbe
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 24 15:15:14 2022 -0700

    Update finding document parsing

commit 8c4fc36
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 24 15:02:05 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 598b694
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 24 14:57:13 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 63dba84
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 24 14:53:34 2022 -0700

    Create FindingDocument.kt

commit 1f2937e
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 23 10:55:43 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 0ffca01
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 23 10:55:31 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 9182aa3
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 23 10:55:09 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit babd908
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 23 10:49:46 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 3ea19b6
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 14:56:51 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 84db03e
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 14:16:40 2022 -0700

    Add search document function

commit 8a421fb
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 13:37:28 2022 -0700

    Update TransportGetMonitorAction.kt

commit 36d54f6
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 13:35:09 2022 -0700

    Update TransportGetMonitorAction.kt

commit 2bd19e5
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 13:13:03 2022 -0700

    Revert "Update MonitorRunner.kt"

    This reverts commit 0c2b133.

commit ab5560e
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 22 13:12:55 2022 -0700

    Revert "Revert createFindings changes"

    This reverts commit a7bf3b9.

commit 34e4c9e
Author: Annie Lee <leeyun@amazon.com>
Date:   Mon Mar 21 10:08:43 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 0c2b133
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 13:46:56 2022 -0700

    Update MonitorRunner.kt

commit a7bf3b9
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 13:45:16 2022 -0700

    Revert createFindings changes

commit ce2b0f9
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 13:32:45 2022 -0700

    Revert "Update MonitorRunner.kt"

    This reverts commit 5930eb7.

commit 5f09d86
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 13:27:44 2022 -0700

    Revert "Update MonitorRunner.kt"

    This reverts commit 7892da0.

commit 5930eb7
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 12:03:07 2022 -0700

    Update MonitorRunner.kt

commit ea9cbb3
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 12:01:51 2022 -0700

    Update Findings toXContent function to prse timestamps epochmilli

commit 7892da0
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 11:48:45 2022 -0700

    Update MonitorRunner.kt

commit d20be8c
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 11:28:44 2022 -0700

    Update MonitorRunner.kt

commit c9b36f3
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 18 10:56:48 2022 -0700

    Update Finding.kt

commit 5b108ee
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 17 18:30:00 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 79a418d
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 17 18:01:43 2022 -0700

    Update debug logs

commit 24ee8c5
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 17 16:57:33 2022 -0700

    Update Finding.kt

commit 5a72a6c
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 17 16:42:27 2022 -0700

    Update TransportGetDestinationsAction.kt

commit 592c2b2
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 17 16:21:45 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit bd64bcd
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 16 15:56:09 2022 -0700

    Comment out extra conditions for query builder

commit dcfa2f0
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 16 15:42:10 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 20f1cbd
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 16 15:40:32 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 63ad8a0
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 16 15:15:04 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit cdacac6
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 17:31:38 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit 9e20bfc
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 17:30:31 2022 -0700

    Update TransportGetFindingsSearchAction.kt

commit bb60a99
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 16:42:26 2022 -0700

    Update query

commit 6e87b73
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 16:09:37 2022 -0700

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 1e5f720
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 15:57:28 2022 -0700

    Add debug info

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 7aac788
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:55:51 2022 -0700

    Add debug msg

commit c7d33c1
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:55:00 2022 -0700

    Revert "Update TransportGetFindingsSearchAction.kt"

    This reverts commit 2c21988.

commit 98eeb72
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:54:55 2022 -0700

    Revert "Update TransportGetFindingsSearchAction.kt"

    This reverts commit 6c81d1d.

commit 0b20901
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:54:51 2022 -0700

    Revert "Update TransportGetFindingsSearchAction.kt"

    This reverts commit 0f912c1.

commit f1562d5
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:54:29 2022 -0700

    Revert "Update TransportGetFindingsSearchAction.kt"

    This reverts commit c59d6fe.

commit 0f912c1
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:39:05 2022 -0700

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit c59d6fe
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:31:33 2022 -0700

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 6c81d1d
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:29:33 2022 -0700

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 2c21988
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:28:09 2022 -0700

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 1f585cc
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 14:09:19 2022 -0700

    Add debug msg

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 18cd6d8
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 13:54:03 2022 -0700

    Use id.keyword field

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 222360a
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 13:48:05 2022 -0700

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 7f44ec7
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 13:31:05 2022 -0700

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 508e341
Author: Annie Lee <leeyun@amazon.com>
Date:   Tue Mar 15 13:24:52 2022 -0700

    Comment out sortString

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit b06cf84
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 11 17:00:10 2022 -0800

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 2a7ba8b
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 11 16:37:05 2022 -0800

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 6f1d9b7
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 11 16:35:35 2022 -0800

    Add logs and try to add routes

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 64faf12
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 11 11:30:33 2022 -0800

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 55f54fc
Author: Annie Lee <leeyun@amazon.com>
Date:   Fri Mar 11 11:20:19 2022 -0800

    Update TransportGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 57d4c71
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 10 17:16:18 2022 -0800

    Add debug logs

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit a60d665
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 10 16:47:39 2022 -0800

    Update AlertingPlugin.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit f13282a
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 10 16:43:09 2022 -0800

    Update build.gradle

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 3834cdd
Author: Annie Lee <leeyun@amazon.com>
Date:   Thu Mar 10 13:42:10 2022 -0800

    Update some findings related filed and add transport action

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 5b72de0
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:30:23 2022 -0800

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 4fc8aee
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:28:12 2022 -0800

    Update RestGetFindingsSearchAction.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 53206e8
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:07:54 2022 -0800

    Update AlertingPlugin.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 61fd19b
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:06:52 2022 -0800

    Update variables

commit 9f8305f
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:03:53 2022 -0800

    Update ktlint

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 043fd22
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 17:01:26 2022 -0800

    Add more findings related classes

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit b9104f1
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 16:50:22 2022 -0800

    Update InputService.kt

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 0557577
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 16:41:01 2022 -0800

    Add getFindingsSearch class

    Signed-off-by: Annie Lee <leeyun@amazon.com>

commit 65f224c
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 13:08:35 2022 -0800

    Add debug log

commit b771487
Author: Annie Lee <leeyun@amazon.com>
Date:   Wed Mar 9 13:05:18 2022 -0800

    modify build.gradlew with snapshot version

commit 4ba370d
Author: Ashish Agrawal <ashisagr@amazon.com>
Date:   Tue Mar 1 09:08:38 2022 -0800

    remove comments

    Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

commit 7550c7b
Author: Ashish Agrawal <ashisagr@amazon.com>
Date:   Tue Mar 1 09:02:05 2022 -0800

    Add connection to triggers for doc level alerting

    Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
Signed-off-by: Annie Lee <leeyun@amazon.com>
@lezzago
Copy link
Member

lezzago commented Apr 7, 2022

Closing for this PR: #385

@lezzago lezzago closed this Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants