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

[ResponseOps][MW] Maintenance window public APIs #198685

Open
Tracked by #184988
cnasikas opened this issue Nov 1, 2024 · 1 comment
Open
Tracked by #184988

[ResponseOps][MW] Maintenance window public APIs #198685

cnasikas opened this issue Nov 1, 2024 · 1 comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Nov 1, 2024

Note

The issue is WIP.

Proposal

Request

title: string;
duration: string; // 30m, 1h, 2m, etc
start: string;
end?: string;
every?: string; // 1d, 2w, etc
onWeekDay?: string[];
onMonthDay?: number[];
onMonth?: string[];
scope?: {
  query: { kql?: string; dsl?: string; }
}

Response

title: string;
duration: string; // 30m, 1h, 2m, etc
start: string;
end?: string;
every?: string; // 1d, 2w, etc
created_by?: string;
updated_by?: string;
created_at: string;
updated_at: string;
status: 'running' | 'upcoming' | 'upcoming' | 'archived';
scope?: {
  query: { kql?: string; dsl?: string; }
}
Current schema

Request

title: string;
duration: number;
r_rule: {
    freq?: 0 | 1 | 2 | 3;
    interval?: number;
    until?: string;
    count?: number;
    byweekday?: string[];
    bymonthday?: number[];
    bymonth?: number[];
    dtstart: string;
    tzid: string;
},
scoped_query?: {
 dsl?: string;
 kql: string;
 filters: Array<{ query?: Record<string, any>; meta?: Record<string, any>; $state: { store: 'appState' | 'globalState'; } }>
}
category_ids?: Array<"observability" | "securitySolution" | "management")>;

Response

id: string;
title: string;
enabled: boolean;
duration: number;
expiration_date: string;
events: Array<{ gte: string; lte: string }>;
r_rule: {
    freq?: 0 | 1 | 2 | 3;
    interval?: number;
    until?: string;
    count?: number;
    byweekday?: string[];
    bymonthday?: number[];
    bymonth?: number[];
    dtstart: string;
    tzid: string;
},
created_by?: string;
updated_by?: string;
created_at: string;
updated_at: string;
event_start_time?: string;
event_end_time?: string;
status: 'running' | 'upcoming' | 'upcoming' | 'archived' 
scoped_query?: {
 dsl?: string;
 kql: string;
 filters: Array<{ query?: Record<string, any>; meta?: Record<string, any>; $state: { store: 'appState' | 'globalState'; } }>
}
category_ids?: Array<"observability" | "securitySolution" | "management")>;
@cnasikas cnasikas added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Nov 1, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@cnasikas cnasikas changed the title [ResponseOps][MW] New API schema [ResponseOps][MW] Maintenance window public APIs Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

2 participants