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

Add Create Rule API Logic #17335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Feb 12, 2025

Description

This PR introduces the create Rule API Logic.

An exampe API request is:

curl -XPUT "localhost:9200/_wlm/rule" -H 'Content-Type: application/json' -d '    
{
     "index_pattern": ["log*", "event*"],
     "query_group": "dev_query_group_id_2"
}'

And the return would be

{
    "_id":"zLKS95QBqTh9lO4Pl_FO",
    "index_pattern":["log*","event*"],
    "query_group":"dev_query_group_id_2",
    "updated_at":"2025-02-12T00:32:46.586Z"
}

Rule Schema PR:
#17238
RFC:
#16797

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

Copy link
Contributor

❌ Gradle check result for bab1e6e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ruai0511 ruai0511 added the backport 2.x Backport to 2.x branch label Feb 12, 2025
Signed-off-by: Ruirui Zhang <[email protected]>

d
Copy link
Contributor

❌ Gradle check result for 3c4c098: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant