elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.61k stars 8.21k forks source link

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

Open cnasikas opened 3 days ago

cnasikas commented 3 days ago

[!NOTE]
The issue is WIP.

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")>;
elasticmachine commented 3 days ago

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