/** * 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 EscalationsCheckEscalationPermissionsPayloadV2 } from '../models/EscalationsCheckEscalationPermissionsPayloadV2.js'; import { type EscalationsCheckEscalationPermissionsResultV2 } from '../models/EscalationsCheckEscalationPermissionsResultV2.js'; import { type EscalationsCreatePayloadV2 } from '../models/EscalationsCreatePayloadV2.js'; import { type EscalationsCreateResultV2 } from '../models/EscalationsCreateResultV2.js'; import { type EscalationsListResultV2 } from '../models/EscalationsListResultV2.js'; import { type EscalationsReassignEscalationPayloadV2 } from '../models/EscalationsReassignEscalationPayloadV2.js'; import { type EscalationsReassignEscalationResultV2 } from '../models/EscalationsReassignEscalationResultV2.js'; import { type EscalationsRespondEscalationPayloadV2 } from '../models/EscalationsRespondEscalationPayloadV2.js'; import { type EscalationsShowResultV2 } from '../models/EscalationsShowResultV2.js'; export interface EscalationsV2CancelEscalationRequest { /** * Unique ID of the escalation */ id: string; } export interface EscalationsV2CheckEscalationPermissionsRequest { /** * The ID of the escalation */ escalation_id: string; /** * */ body: EscalationsCheckEscalationPermissionsPayloadV2; } export interface EscalationsV2CreateRequest { /** * */ body: EscalationsCreatePayloadV2; } export interface EscalationsV2ListRequest { /** * Number of escalations to return per page */ page_size?: number; /** * An escalation's ID. This endpoint will return a list of escalations after this ID in relation to the API response order. */ after?: string; /** * Filter on the escalation path for which the escalation was triggered. Accepted operators are 'one_of' and 'not_in'. */ escalation_path?: { [key: string]: Array; }; /** * Filter on the status of the escalation. Accepted operators are 'one_of' and 'not_in'. */ status?: { [key: string]: Array; }; /** * Filter on the alert that created an escalation. Accepted operators are 'one_of' and 'not_in'. */ alert?: { [key: string]: Array; }; /** * Filter on the incident that the escalation is connected to. Accepted operators are 'one_of' and 'not_in'. */ incident?: { [key: string]: Array; }; /** * Filter on the created_at timestamp of the escalation. Accepted operators are 'gte', 'lte' and 'date_range'. */ created_at?: { [key: string]: Array; }; /** * Filter on the updated_at timestamp of the escalation. Accepted operators are 'gte', 'lte' and 'date_range'. */ updated_at?: { [key: string]: Array; }; /** * Filter on the idempotency key of the escalation. This is the key set when creating escalations via the API, and is distinct from alert deduplication keys. Accepted operators are 'is' for exact matches and 'starts_with' for prefix matching. */ idempotency_key?: { [key: string]: Array; }; } export interface EscalationsV2ReassignEscalationRequest { /** * The ID of the escalation to reassign */ escalation_id: string; /** * */ body: EscalationsReassignEscalationPayloadV2; } export interface EscalationsV2RespondEscalationRequest { /** * The ID of the escalation */ escalation_id: string; /** * */ body: EscalationsRespondEscalationPayloadV2; } export interface EscalationsV2ShowRequest { /** * Unique ID of the escalation */ id: string; } /** * */ export declare class EscalationsV2Api extends runtime.BaseAPI { /** * Creates request options for escalationsV2CancelEscalation without sending the request */ escalationsV2CancelEscalationRequestOpts(requestParameters: EscalationsV2CancelEscalationRequest): Promise; /** * Cancel an escalation. Cancelling an escalation stops any further paging: notifications cease and the escalation will not advance to further levels or repeat. This works on escalations that are still paging (for example to silence a page when an incident is resolved before anyone acknowledges it) as well as snoozed ones. Escalations that have already resolved or expired cannot be cancelled, and cancelling an already-cancelled escalation is a no-op. To use this API, you will need an API key with the \"Create and manage escalations\" permission. * CancelEscalation Escalations V2 */ escalationsV2CancelEscalationRaw(requestParameters: EscalationsV2CancelEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Cancel an escalation. Cancelling an escalation stops any further paging: notifications cease and the escalation will not advance to further levels or repeat. This works on escalations that are still paging (for example to silence a page when an incident is resolved before anyone acknowledges it) as well as snoozed ones. Escalations that have already resolved or expired cannot be cancelled, and cancelling an already-cancelled escalation is a no-op. To use this API, you will need an API key with the \"Create and manage escalations\" permission. * CancelEscalation Escalations V2 */ escalationsV2CancelEscalation(requestParameters: EscalationsV2CancelEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2CheckEscalationPermissions without sending the request */ escalationsV2CheckEscalationPermissionsRequestOpts(requestParameters: EscalationsV2CheckEscalationPermissionsRequest): Promise; /** * Check whether the given users can currently acknowledge, decline, or snooze an escalation. This is a read-only projection of the escalation\'s current state, intended for deciding which response actions to surface to each user in a custom integration. To use this API, you will need an API key that can view escalations and users. * CheckEscalationPermissions Escalations V2 */ escalationsV2CheckEscalationPermissionsRaw(requestParameters: EscalationsV2CheckEscalationPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Check whether the given users can currently acknowledge, decline, or snooze an escalation. This is a read-only projection of the escalation\'s current state, intended for deciding which response actions to surface to each user in a custom integration. To use this API, you will need an API key that can view escalations and users. * CheckEscalationPermissions Escalations V2 */ escalationsV2CheckEscalationPermissions(requestParameters: EscalationsV2CheckEscalationPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2Create without sending the request */ escalationsV2CreateRequestOpts(requestParameters: EscalationsV2CreateRequest): Promise; /** * Create an escalation. An escalation pages people, either according to an escalation path, or directly to specific users. You must provide either an escalation_path_id OR user_ids, but not both. When escalating via an escalation path, the escalation will follow the configured path with its levels and timeouts, using your default [alert priority](https://app.incident.io/~/settings/alerts/configuration/priorities). When escalating directly to users, they will receive a high-urgency notification, based on their notification rules. This endpoint is rate-limited to 60 requests per minute, since it is intended for interactive use cases (for example someone clicking a \"escalate to team\" button in your internal developer platform). To escalate based on automated alerts, we recommend sending events to an alert source instead. If your API key\'s permissions are scoped to teams, you can only escalate via an escalation path that one of those teams owns. Escalating directly to user_ids needs the permission at the account level, because an escalation aimed at a person has no owning team. * Create Escalations V2 */ escalationsV2CreateRaw(requestParameters: EscalationsV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Create an escalation. An escalation pages people, either according to an escalation path, or directly to specific users. You must provide either an escalation_path_id OR user_ids, but not both. When escalating via an escalation path, the escalation will follow the configured path with its levels and timeouts, using your default [alert priority](https://app.incident.io/~/settings/alerts/configuration/priorities). When escalating directly to users, they will receive a high-urgency notification, based on their notification rules. This endpoint is rate-limited to 60 requests per minute, since it is intended for interactive use cases (for example someone clicking a \"escalate to team\" button in your internal developer platform). To escalate based on automated alerts, we recommend sending events to an alert source instead. If your API key\'s permissions are scoped to teams, you can only escalate via an escalation path that one of those teams owns. Escalating directly to user_ids needs the permission at the account level, because an escalation aimed at a person has no owning team. * Create Escalations V2 */ escalationsV2Create(requestParameters: EscalationsV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2List without sending the request */ escalationsV2ListRequestOpts(requestParameters: EscalationsV2ListRequest): Promise; /** * List all escalations for your account. This endpoint supports a number of filters, which can help find escalations matching certain criteria. Note that: - Filters may be used together, and the result will be escalations that match all filters. - All query parameters must be URI encoded. To use this API, you will need an API key with the \"View data\" or \"Create and manage on-call resources\" permission. ### By escalation_path Find all escalations that escalated to escalation path with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'escalation_path[one_of]=ABC\' ### By status Find all escalations with a current status of \"triggered\": curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'status[one_of]=triggered\' Possible values are \"pending\", \"triggered\", \"acked\", \"resolved\", \"expired\" and \"cancelled\". Escalations are in \"pending\" when they are in a grace period when the related alert has been grouped in an incident. ### By alert Find all escalations that were created by alert with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'alert[one_of]=ABC\' ### By incident Find all escalations related to incident with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'incident[one_of]=ABC\' An escalation is related to an incident if it is linked to that incident directly, if it is attached to one of the incident\'s alerts, or if it triggered one of those alerts (which is what happens when someone pages by calling in, and that call raises the alert). To find everything that is not related to an incident, use \"not_in\": curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'incident[not_in]=ABC\' ### By created_at and updated_at Find all escalations that follow specified date parameters for created_at and updated_at fields. Possible values are \"gte\" (greater than or equal to), \"lte\" (less than or equal to), and \"date_range\" (between two dates). For example, to find all escalations updated after 2025-01-01: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'updated_at[gte]=2025-01-01\' To find all escalations created between 2025-01-01 and 2025-01-31: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'created_at[date_range]=2025-01-01~2025-01-31\' * List Escalations V2 */ escalationsV2ListRaw(requestParameters: EscalationsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * List all escalations for your account. This endpoint supports a number of filters, which can help find escalations matching certain criteria. Note that: - Filters may be used together, and the result will be escalations that match all filters. - All query parameters must be URI encoded. To use this API, you will need an API key with the \"View data\" or \"Create and manage on-call resources\" permission. ### By escalation_path Find all escalations that escalated to escalation path with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'escalation_path[one_of]=ABC\' ### By status Find all escalations with a current status of \"triggered\": curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'status[one_of]=triggered\' Possible values are \"pending\", \"triggered\", \"acked\", \"resolved\", \"expired\" and \"cancelled\". Escalations are in \"pending\" when they are in a grace period when the related alert has been grouped in an incident. ### By alert Find all escalations that were created by alert with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'alert[one_of]=ABC\' ### By incident Find all escalations related to incident with id=ABC: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'incident[one_of]=ABC\' An escalation is related to an incident if it is linked to that incident directly, if it is attached to one of the incident\'s alerts, or if it triggered one of those alerts (which is what happens when someone pages by calling in, and that call raises the alert). To find everything that is not related to an incident, use \"not_in\": curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'incident[not_in]=ABC\' ### By created_at and updated_at Find all escalations that follow specified date parameters for created_at and updated_at fields. Possible values are \"gte\" (greater than or equal to), \"lte\" (less than or equal to), and \"date_range\" (between two dates). For example, to find all escalations updated after 2025-01-01: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'updated_at[gte]=2025-01-01\' To find all escalations created between 2025-01-01 and 2025-01-31: curl --get \'https://api.incident.io/v2/escalations\' \\ --data \'created_at[date_range]=2025-01-01~2025-01-31\' * List Escalations V2 */ escalationsV2List(requestParameters?: EscalationsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2ReassignEscalation without sending the request */ escalationsV2ReassignEscalationRequestOpts(requestParameters: EscalationsV2ReassignEscalationRequest): Promise; /** * Reassign an escalation to a different escalation path or set of users. Use this when a page reached the wrong people. Reassigning creates a new escalation aimed at the targets you give, linked back to the original, and carries over the original\'s title, description, priority, incident and alert so the page stays attached to the same alert and acknowledgements keep grouping under it. You must provide either an escalation_path_id OR user_ids, but not both. Both name incident.io escalation paths and users, so an escalation cannot be reassigned to an external escalator such as PagerDuty or Opsgenie. By default the original escalation is resolved, so the first targets stop being paged. Pass resolve_original=false to leave it running alongside the new one. Resolving the original additionally needs the \"escalations.respond\" permission, since it stops a page someone else may be responding to. An escalation can only be reassigned once: calling this again for the same escalation is rejected. Retrying a request whose response you never saw is safe in the sense that matters — a reassignment that already happened is never repeated, so nobody is paged twice — but the retry is rejected rather than returning the escalation the first call created, so keep the ID from the original response. To use this API, you will need an API key with the \"Create and manage escalations\" permission. The reassignment is attributed to the key; to attribute it to one of your users instead, set the X-Incident-User header, which needs the \"api_keys.act_on_behalf_of_users\" scope and no team permissions on the key. If your API key\'s permissions are scoped to teams, the escalation you\'re reassigning must be owned by one of those teams, and you can only reassign via an escalation path one of them owns. Reassigning directly to user_ids needs the permission at the account level, because an escalation aimed at a person has no owning team. * ReassignEscalation Escalations V2 */ escalationsV2ReassignEscalationRaw(requestParameters: EscalationsV2ReassignEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Reassign an escalation to a different escalation path or set of users. Use this when a page reached the wrong people. Reassigning creates a new escalation aimed at the targets you give, linked back to the original, and carries over the original\'s title, description, priority, incident and alert so the page stays attached to the same alert and acknowledgements keep grouping under it. You must provide either an escalation_path_id OR user_ids, but not both. Both name incident.io escalation paths and users, so an escalation cannot be reassigned to an external escalator such as PagerDuty or Opsgenie. By default the original escalation is resolved, so the first targets stop being paged. Pass resolve_original=false to leave it running alongside the new one. Resolving the original additionally needs the \"escalations.respond\" permission, since it stops a page someone else may be responding to. An escalation can only be reassigned once: calling this again for the same escalation is rejected. Retrying a request whose response you never saw is safe in the sense that matters — a reassignment that already happened is never repeated, so nobody is paged twice — but the retry is rejected rather than returning the escalation the first call created, so keep the ID from the original response. To use this API, you will need an API key with the \"Create and manage escalations\" permission. The reassignment is attributed to the key; to attribute it to one of your users instead, set the X-Incident-User header, which needs the \"api_keys.act_on_behalf_of_users\" scope and no team permissions on the key. If your API key\'s permissions are scoped to teams, the escalation you\'re reassigning must be owned by one of those teams, and you can only reassign via an escalation path one of them owns. Reassigning directly to user_ids needs the permission at the account level, because an escalation aimed at a person has no owning team. * ReassignEscalation Escalations V2 */ escalationsV2ReassignEscalation(requestParameters: EscalationsV2ReassignEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2RespondEscalation without sending the request */ escalationsV2RespondEscalationRequestOpts(requestParameters: EscalationsV2RespondEscalationRequest): Promise; /** * Respond to an escalation. An API key can acknowledge or snooze an escalation on its own, and the response is attributed to the key. Declining (\"nack\") means \"I personally can\'t take this page\", so it isn\'t available to an API key responding in its own right. To use this API, you will need an API key with the \"Create and manage escalations\" permission. * RespondEscalation Escalations V2 */ escalationsV2RespondEscalationRaw(requestParameters: EscalationsV2RespondEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Respond to an escalation. An API key can acknowledge or snooze an escalation on its own, and the response is attributed to the key. Declining (\"nack\") means \"I personally can\'t take this page\", so it isn\'t available to an API key responding in its own right. To use this API, you will need an API key with the \"Create and manage escalations\" permission. * RespondEscalation Escalations V2 */ escalationsV2RespondEscalation(requestParameters: EscalationsV2RespondEscalationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for escalationsV2Show without sending the request */ escalationsV2ShowRequestOpts(requestParameters: EscalationsV2ShowRequest): Promise; /** * Show a specific escalation. * Show Escalations V2 */ escalationsV2ShowRaw(requestParameters: EscalationsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Show a specific escalation. * Show Escalations V2 */ escalationsV2Show(requestParameters: EscalationsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; }