/** * incident.io * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime.js'; import { type AlertsAddTagsPayloadV2 } from '../models/AlertsAddTagsPayloadV2.js'; import { type AlertsAddTagsResultV2 } from '../models/AlertsAddTagsResultV2.js'; import { type AlertsCreateIncidentAlertPayloadV2 } from '../models/AlertsCreateIncidentAlertPayloadV2.js'; import { type AlertsCreateIncidentAlertResultV2 } from '../models/AlertsCreateIncidentAlertResultV2.js'; import { type AlertsListAlertTagsResultV2 } from '../models/AlertsListAlertTagsResultV2.js'; import { type AlertsListIncidentAlertsResultV2 } from '../models/AlertsListIncidentAlertsResultV2.js'; import { type AlertsListResultV2 } from '../models/AlertsListResultV2.js'; import { type AlertsRemoveTagsPayloadV2 } from '../models/AlertsRemoveTagsPayloadV2.js'; import { type AlertsRemoveTagsResultV2 } from '../models/AlertsRemoveTagsResultV2.js'; import { type AlertsResolveResultV2 } from '../models/AlertsResolveResultV2.js'; import { type AlertsSetTagsPayloadV2 } from '../models/AlertsSetTagsPayloadV2.js'; import { type AlertsSetTagsResultV2 } from '../models/AlertsSetTagsResultV2.js'; import { type AlertsShowResultV2 } from '../models/AlertsShowResultV2.js'; import { type AlertsTransitionIncidentAlertPayloadV2 } from '../models/AlertsTransitionIncidentAlertPayloadV2.js'; import { type AlertsTransitionIncidentAlertResultV2 } from '../models/AlertsTransitionIncidentAlertResultV2.js'; export interface AlertsV2AddTagsRequest { /** * Unique identifier for the alert */ id: string; /** * */ body: AlertsAddTagsPayloadV2; } export interface AlertsV2CreateIncidentAlertRequest { /** * */ body: AlertsCreateIncidentAlertPayloadV2; } export interface AlertsV2ListRequest { /** * Number of alerts to return per page */ page_size: number; /** * If provided, pass this as the 'after' param to load the next page */ after?: string; /** * Filter on alert deduplication key. The accepted operator is 'is'. */ deduplication_key?: { [key: string]: Array; }; /** * Filter on alert status. The accepted operators are 'one_of', or 'not_in'. */ status?: { [key: string]: Array; }; /** * Filter on alert source by ID. The accepted operators are 'one_of', or 'not_in'. */ alert_source?: { [key: string]: Array; }; /** * Filter on alert group ID. Returns alerts that belong to any of the specified groups. The accepted operator is 'one_of'. */ alert_group_id?: { [key: string]: Array; }; /** * Filter on alert created at timestamp. Accepted operators are 'gte', 'lte' and 'date_range'. */ created_at?: { [key: string]: Array; }; /** * Filter on alert updated at timestamp. Accepted operators are 'gte', 'lte' and 'date_range'. */ updated_at?: { [key: string]: Array; }; /** * Filter on an alerts attributes. Alert attribute ID should be sent, followed by the operator and values. Accepted operator will depend on the attribute type. */ attributes?: { [key: string]: { [key: string]: Array; }; }; /** * Filter on whether an alert has notes. The accepted operator is 'is'. */ has_notes?: { [key: string]: Array; }; /** * Filter on the tags applied to an alert, by tag name. The accepted operators are 'one_of', 'all_of' and 'not_in'. */ tags?: { [key: string]: Array; }; /** * Filter on whether to include maintenance window alerts. The accepted operator is 'is'. */ include_maintenance_window?: { [key: string]: Array; }; } export interface AlertsV2ListAlertTagsRequest { /** * Integer number of records to return */ page_size?: number; /** * A tag's ID. This endpoint will return a list of tags after this ID in relation to the API response order. */ after?: string; /** * Filter to tags whose name contains this value (case-insensitive) */ search?: string; } export interface AlertsV2ListIncidentAlertsRequest { /** * Number of incident alerts to return per page */ page_size: number; /** * If provided, pass this as the 'after' param to load the next page */ after?: string; /** * Alert that this incident alert refers to */ alert_id?: string; /** * Incident that this incident alert is attached to */ incident_id?: string; } export interface AlertsV2RemoveTagsRequest { /** * Unique identifier for the alert */ id: string; /** * */ body: AlertsRemoveTagsPayloadV2; } export interface AlertsV2ResolveRequest { /** * Unique identifier for the alert */ id: string; } export interface AlertsV2SetTagsRequest { /** * Unique identifier for the alert */ id: string; /** * */ body: AlertsSetTagsPayloadV2; } export interface AlertsV2ShowRequest { /** * Unique identifier for the alert */ id: string; } export interface AlertsV2TransitionIncidentAlertRequest { /** * Unique identifier for the incident alert */ id: string; /** * */ body: AlertsTransitionIncidentAlertPayloadV2; } /** * */ export declare class AlertsV2Api extends runtime.BaseAPI { /** * Creates request options for alertsV2AddTags without sending the request */ alertsV2AddTagsRequestOpts(requestParameters: AlertsV2AddTagsRequest): Promise; /** * Add tags to an alert without changing its existing tags. Each tag is a name. A name that does not exist is created, except on private alerts, where only names already in the organisation\'s tag vocabulary can be used. Tags that are already present are ignored. * AddTags Alerts V2 */ alertsV2AddTagsRaw(requestParameters: AlertsV2AddTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Add tags to an alert without changing its existing tags. Each tag is a name. A name that does not exist is created, except on private alerts, where only names already in the organisation\'s tag vocabulary can be used. Tags that are already present are ignored. * AddTags Alerts V2 */ alertsV2AddTags(requestParameters: AlertsV2AddTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2CreateIncidentAlert without sending the request */ alertsV2CreateIncidentAlertRequestOpts(requestParameters: AlertsV2CreateIncidentAlertRequest): Promise; /** * Attach an alert to an incident, creating the connection between them. The API key also needs the \'manage incident alerts\' scope, which is what actually relates the alert once the connection exists. If the alert is already related to this incident, the existing connection is returned unchanged. If someone previously marked the alert as unrelated to this incident, that decision is preserved and this endpoint returns a 422 — set re_relate to override it. Private alerts can only be attached to private incidents, including when re_relate is set. An API key that cannot see the alert or the incident receives a 404. Busy incidents can be locked by another operation, in which case this endpoint returns a 409 and the request can be retried. Note that this endpoint returns 201 even when it re-relates or returns an existing connection rather than creating a new one. * CreateIncidentAlert Alerts V2 */ alertsV2CreateIncidentAlertRaw(requestParameters: AlertsV2CreateIncidentAlertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Attach an alert to an incident, creating the connection between them. The API key also needs the \'manage incident alerts\' scope, which is what actually relates the alert once the connection exists. If the alert is already related to this incident, the existing connection is returned unchanged. If someone previously marked the alert as unrelated to this incident, that decision is preserved and this endpoint returns a 422 — set re_relate to override it. Private alerts can only be attached to private incidents, including when re_relate is set. An API key that cannot see the alert or the incident receives a 404. Busy incidents can be locked by another operation, in which case this endpoint returns a 409 and the request can be retried. Note that this endpoint returns 201 even when it re-relates or returns an existing connection rather than creating a new one. * CreateIncidentAlert Alerts V2 */ alertsV2CreateIncidentAlert(requestParameters: AlertsV2CreateIncidentAlertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2List without sending the request */ alertsV2ListRequestOpts(requestParameters: AlertsV2ListRequest): Promise; /** * List all alerts for your account. This endpoint supports a number of filters, which can help find alerts matching certain criteria. These filters work similarly to the filters on the incidents endpoint, where a field is specified alongside a comparison operator in the query string. Note that: - Filters may be used together, and the result will be alerts that match all filters. - All query parameters must be URI encoded. ### By deduplication_key Find all alerts with deduplication_key ABC: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'deduplication_key[is]=ABC\' ### By status Find all alerts in a firing state: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'status[one_of]=firing\' ### By alert_source Find all alerts from a specific alert source (by alert source ID): curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_source[one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' Find all alerts not from a specific alert source: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_source[not_in]=01GBSQF3FHF7FWZQNWGHAVQ804\' ### By alert_group_id Find all alerts in a specific alert group: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_group_id[one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' ### By created_at Find all alerts that follow specified date parameters for created_at field. Possible values are \"gte\" (greater than or equal to), \"lte\" (less than or equal to), and \"date_range\" (between two dates). The following example finds all alerts created after 2025-01-01: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'created_at[gte]=2025-01-01\' To find alerts created within a specific date range, use the date_range option with tilde-separated dates: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'created_at[date_range]=2024-12-02~2024-12-08\' ### By updated_at Find all alerts that follow specified date parameters for updated_at field, using the same \"gte\", \"lte\" and \"date_range\" operators as created_at. This is useful for incrementally syncing alerts: poll with updated_at[gte] set to your last sync time instead of re-fetching the full history. Note that updated_at moves whenever the alert row is written, which can happen without a visible change to the alert payload, so treat matches as candidates to re-fetch rather than guaranteed changes — and overlap your sync window by a few minutes to allow for writes that commit out of timestamp order: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'updated_at[gte]=2025-01-01T00:00:00Z\' ### By has_notes Find all alerts that have notes attached: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'has_notes[is]=true\' Find all alerts that have no notes attached: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'has_notes[is]=false\' ### By tags Filter by tag name, matched case-insensitively. Find all alerts that have any of the given tags: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[one_of]=known issue\' Find all alerts that have all of the given tags: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[all_of]=known issue\' \\ --data \'tags[all_of]=customer impacting\' Find all alerts that do not have any of the given tags. Untagged alerts are included: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[not_in]=known issue\' ### By attributes Alerts can be filtered by their attribute values. Each filter is keyed by the alert attribute ID, followed by an operator and the values to match. The accepted operators depend on the attribute\'s type. Find all alerts where attribute 01GBSQF3FHF7FWZQNWGHAVQ804 is one of two catalog entries: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'attributes[01GBSQF3FHF7FWZQNWGHAVQ804][one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' \\ --data \'attributes[01GBSQF3FHF7FWZQNWGHAVQ804][one_of]=01ET65M7ZARSFZ6TFDFVQDN9AA\' You can filter on multiple attributes at once, and the result will be alerts that match all of them. ### Maintenance windows By default, all alerts are returned including those held by a maintenance window. To exclude alerts that are held by a maintenance window: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'include_maintenance_window[is]=false\' * List Alerts V2 */ alertsV2ListRaw(requestParameters: AlertsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * List all alerts for your account. This endpoint supports a number of filters, which can help find alerts matching certain criteria. These filters work similarly to the filters on the incidents endpoint, where a field is specified alongside a comparison operator in the query string. Note that: - Filters may be used together, and the result will be alerts that match all filters. - All query parameters must be URI encoded. ### By deduplication_key Find all alerts with deduplication_key ABC: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'deduplication_key[is]=ABC\' ### By status Find all alerts in a firing state: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'status[one_of]=firing\' ### By alert_source Find all alerts from a specific alert source (by alert source ID): curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_source[one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' Find all alerts not from a specific alert source: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_source[not_in]=01GBSQF3FHF7FWZQNWGHAVQ804\' ### By alert_group_id Find all alerts in a specific alert group: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'alert_group_id[one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' ### By created_at Find all alerts that follow specified date parameters for created_at field. Possible values are \"gte\" (greater than or equal to), \"lte\" (less than or equal to), and \"date_range\" (between two dates). The following example finds all alerts created after 2025-01-01: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'created_at[gte]=2025-01-01\' To find alerts created within a specific date range, use the date_range option with tilde-separated dates: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'created_at[date_range]=2024-12-02~2024-12-08\' ### By updated_at Find all alerts that follow specified date parameters for updated_at field, using the same \"gte\", \"lte\" and \"date_range\" operators as created_at. This is useful for incrementally syncing alerts: poll with updated_at[gte] set to your last sync time instead of re-fetching the full history. Note that updated_at moves whenever the alert row is written, which can happen without a visible change to the alert payload, so treat matches as candidates to re-fetch rather than guaranteed changes — and overlap your sync window by a few minutes to allow for writes that commit out of timestamp order: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'updated_at[gte]=2025-01-01T00:00:00Z\' ### By has_notes Find all alerts that have notes attached: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'has_notes[is]=true\' Find all alerts that have no notes attached: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'has_notes[is]=false\' ### By tags Filter by tag name, matched case-insensitively. Find all alerts that have any of the given tags: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[one_of]=known issue\' Find all alerts that have all of the given tags: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[all_of]=known issue\' \\ --data \'tags[all_of]=customer impacting\' Find all alerts that do not have any of the given tags. Untagged alerts are included: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'tags[not_in]=known issue\' ### By attributes Alerts can be filtered by their attribute values. Each filter is keyed by the alert attribute ID, followed by an operator and the values to match. The accepted operators depend on the attribute\'s type. Find all alerts where attribute 01GBSQF3FHF7FWZQNWGHAVQ804 is one of two catalog entries: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'attributes[01GBSQF3FHF7FWZQNWGHAVQ804][one_of]=01GBSQF3FHF7FWZQNWGHAVQ804\' \\ --data \'attributes[01GBSQF3FHF7FWZQNWGHAVQ804][one_of]=01ET65M7ZARSFZ6TFDFVQDN9AA\' You can filter on multiple attributes at once, and the result will be alerts that match all of them. ### Maintenance windows By default, all alerts are returned including those held by a maintenance window. To exclude alerts that are held by a maintenance window: curl --get \'https://api.incident.io/v2/alerts\' \\ --data \'include_maintenance_window[is]=false\' * List Alerts V2 */ alertsV2List(requestParameters: AlertsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2ListAlertTags without sending the request */ alertsV2ListAlertTagsRequestOpts(requestParameters: AlertsV2ListAlertTagsRequest): Promise; /** * List the alert tags in your organisation\'s vocabulary. Alert tags are the reusable labels you can apply to alerts. This endpoint lists the organisation\'s active tags, ordered by name, and excludes archived tags. To narrow the list, filter by search, which matches tags whose name contains the given value (case-insensitive): curl --get \'https://api.incident.io/v2/alert_tags\' \\ --data \'search=noisy\' * ListAlertTags Alerts V2 */ alertsV2ListAlertTagsRaw(requestParameters: AlertsV2ListAlertTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * List the alert tags in your organisation\'s vocabulary. Alert tags are the reusable labels you can apply to alerts. This endpoint lists the organisation\'s active tags, ordered by name, and excludes archived tags. To narrow the list, filter by search, which matches tags whose name contains the given value (case-insensitive): curl --get \'https://api.incident.io/v2/alert_tags\' \\ --data \'search=noisy\' * ListAlertTags Alerts V2 */ alertsV2ListAlertTags(requestParameters?: AlertsV2ListAlertTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2ListIncidentAlerts without sending the request */ alertsV2ListIncidentAlertsRequestOpts(requestParameters: AlertsV2ListIncidentAlertsRequest): Promise; /** * List the connections between incidents and alerts * ListIncidentAlerts Alerts V2 */ alertsV2ListIncidentAlertsRaw(requestParameters: AlertsV2ListIncidentAlertsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * List the connections between incidents and alerts * ListIncidentAlerts Alerts V2 */ alertsV2ListIncidentAlerts(requestParameters: AlertsV2ListIncidentAlertsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2RemoveTags without sending the request */ alertsV2RemoveTagsRequestOpts(requestParameters: AlertsV2RemoveTagsRequest): Promise; /** * Remove tags from an alert without changing its other tags. Each tag is a name. Tags that are not present on the alert are ignored. * RemoveTags Alerts V2 */ alertsV2RemoveTagsRaw(requestParameters: AlertsV2RemoveTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Remove tags from an alert without changing its other tags. Each tag is a name. Tags that are not present on the alert are ignored. * RemoveTags Alerts V2 */ alertsV2RemoveTags(requestParameters: AlertsV2RemoveTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2Resolve without sending the request */ alertsV2ResolveRequestOpts(requestParameters: AlertsV2ResolveRequest): Promise; /** * Resolve a currently firing alert. This marks the alert as resolved with the current time, attributing the resolution to the API key that made the request. Resolving an already-resolved alert is a no-op and returns the alert unchanged. Some alert sources are \'externally resolved\' (for example, Datadog) — those alerts can only be resolved by the third-party system itself, and this endpoint will return a 422 explaining that. Private alerts: an API key without the \'view all alerts\' scope can only resolve non-private alerts; private alerts will return a 404. Grant the API key a role that includes the global alerts access scope to resolve private alerts. * Resolve Alerts V2 */ alertsV2ResolveRaw(requestParameters: AlertsV2ResolveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Resolve a currently firing alert. This marks the alert as resolved with the current time, attributing the resolution to the API key that made the request. Resolving an already-resolved alert is a no-op and returns the alert unchanged. Some alert sources are \'externally resolved\' (for example, Datadog) — those alerts can only be resolved by the third-party system itself, and this endpoint will return a 422 explaining that. Private alerts: an API key without the \'view all alerts\' scope can only resolve non-private alerts; private alerts will return a 404. Grant the API key a role that includes the global alerts access scope to resolve private alerts. * Resolve Alerts V2 */ alertsV2Resolve(requestParameters: AlertsV2ResolveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2SetTags without sending the request */ alertsV2SetTagsRequestOpts(requestParameters: AlertsV2SetTagsRequest): Promise; /** * Replace all tags on an alert. Each tag is a name. A name that does not exist is created, except on private alerts, where only names already in the organisation\'s tag vocabulary can be used. Passing an empty list removes every tag. * SetTags Alerts V2 */ alertsV2SetTagsRaw(requestParameters: AlertsV2SetTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Replace all tags on an alert. Each tag is a name. A name that does not exist is created, except on private alerts, where only names already in the organisation\'s tag vocabulary can be used. Passing an empty list removes every tag. * SetTags Alerts V2 */ alertsV2SetTags(requestParameters: AlertsV2SetTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2Show without sending the request */ alertsV2ShowRequestOpts(requestParameters: AlertsV2ShowRequest): Promise; /** * Show a single alert for your account * Show Alerts V2 */ alertsV2ShowRaw(requestParameters: AlertsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Show a single alert for your account * Show Alerts V2 */ alertsV2Show(requestParameters: AlertsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for alertsV2TransitionIncidentAlert without sending the request */ alertsV2TransitionIncidentAlertRequestOpts(requestParameters: AlertsV2TransitionIncidentAlertRequest): Promise; /** * Confirm or detach the connection between an alert and an incident. Set state to \'related\' to confirm the connection, or \'unrelated\' to detach the alert from the incident. The API key also needs the \'manage incident alerts\' scope. A detached connection no longer appears in the list endpoint, which returns related connections only. Busy incidents can be locked by another operation, in which case this endpoint returns a 409 and the request can be retried. * TransitionIncidentAlert Alerts V2 */ alertsV2TransitionIncidentAlertRaw(requestParameters: AlertsV2TransitionIncidentAlertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Confirm or detach the connection between an alert and an incident. Set state to \'related\' to confirm the connection, or \'unrelated\' to detach the alert from the incident. The API key also needs the \'manage incident alerts\' scope. A detached connection no longer appears in the list endpoint, which returns related connections only. Busy incidents can be locked by another operation, in which case this endpoint returns a 409 and the request can be retried. * TransitionIncidentAlert Alerts V2 */ alertsV2TransitionIncidentAlert(requestParameters: AlertsV2TransitionIncidentAlertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; }