From ecd4738fe57511494aaf5bfd4f57b6757178aeb7 Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 13 Jun 2024 23:23:33 +0100 Subject: [PATCH] add path item support --- client/client.gen.go | 2965 +++- client/openapi3.json | 26437 +++++++++++++++++++---------- cmd/catalog-importer/cmd/sync.go | 13 + 3 files changed, 19960 insertions(+), 9455 deletions(-) diff --git a/client/client.gen.go b/client/client.gen.go index 87f165b..bca685a 100644 --- a/client/client.gen.go +++ b/client/client.gen.go @@ -34,6 +34,21 @@ const ( ActionV2StatusOutstanding ActionV2Status = "outstanding" ) +// Defines values for AlertResultDeduplicationKey. +const ( + UniqueKey AlertResultDeduplicationKey = "unique-key" +) + +// Defines values for AlertResultMessage. +const ( + EventAcceptedForProcessing AlertResultMessage = "Event accepted for processing" +) + +// Defines values for AlertResultStatus. +const ( + Success AlertResultStatus = "success" +) + // Defines values for CatalogResourceV2Category. const ( CatalogResourceV2CategoryCustom CatalogResourceV2Category = "custom" @@ -49,16 +64,18 @@ const ( CatalogTypeAttributePayloadV2ModeExternal CatalogTypeAttributePayloadV2Mode = "external" CatalogTypeAttributePayloadV2ModeInternal CatalogTypeAttributePayloadV2Mode = "internal" CatalogTypeAttributePayloadV2ModeManual CatalogTypeAttributePayloadV2Mode = "manual" + CatalogTypeAttributePayloadV2ModePath CatalogTypeAttributePayloadV2Mode = "path" ) // Defines values for CatalogTypeAttributeV2Mode. const ( - Backlink CatalogTypeAttributeV2Mode = "backlink" - Dynamic CatalogTypeAttributeV2Mode = "dynamic" - Empty CatalogTypeAttributeV2Mode = "" - External CatalogTypeAttributeV2Mode = "external" - Internal CatalogTypeAttributeV2Mode = "internal" - Manual CatalogTypeAttributeV2Mode = "manual" + CatalogTypeAttributeV2ModeBacklink CatalogTypeAttributeV2Mode = "backlink" + CatalogTypeAttributeV2ModeDynamic CatalogTypeAttributeV2Mode = "dynamic" + CatalogTypeAttributeV2ModeEmpty CatalogTypeAttributeV2Mode = "" + CatalogTypeAttributeV2ModeExternal CatalogTypeAttributeV2Mode = "external" + CatalogTypeAttributeV2ModeInternal CatalogTypeAttributeV2Mode = "internal" + CatalogTypeAttributeV2ModeManual CatalogTypeAttributeV2Mode = "manual" + CatalogTypeAttributeV2ModePath CatalogTypeAttributeV2Mode = "path" ) // Defines values for CatalogTypeV2Color. @@ -106,21 +123,6 @@ const ( Resolved CreateHTTPRequestBodyStatus = "resolved" ) -// Defines values for CreateHTTPResponseBodyDeduplicationKey. -const ( - UniqueKey CreateHTTPResponseBodyDeduplicationKey = "unique-key" -) - -// Defines values for CreateHTTPResponseBodyMessage. -const ( - EventAcceptedForProcessing CreateHTTPResponseBodyMessage = "Event accepted for processing" -) - -// Defines values for CreateHTTPResponseBodyStatus. -const ( - Success CreateHTTPResponseBodyStatus = "success" -) - // Defines values for CreateRequestBody10Mode. const ( CreateRequestBody10ModeRetrospective CreateRequestBody10Mode = "retrospective" @@ -174,6 +176,7 @@ const ( CreateRequestBody4ResourceResourceTypeGithubPullRequest CreateRequestBody4ResourceResourceType = "github_pull_request" CreateRequestBody4ResourceResourceTypeGitlabMergeRequest CreateRequestBody4ResourceResourceType = "gitlab_merge_request" CreateRequestBody4ResourceResourceTypeGoogleCalendarEvent CreateRequestBody4ResourceResourceType = "google_calendar_event" + CreateRequestBody4ResourceResourceTypeJiraIssue CreateRequestBody4ResourceResourceType = "jira_issue" CreateRequestBody4ResourceResourceTypeOpsgenieAlert CreateRequestBody4ResourceResourceType = "opsgenie_alert" CreateRequestBody4ResourceResourceTypePagerDutyIncident CreateRequestBody4ResourceResourceType = "pager_duty_incident" CreateRequestBody4ResourceResourceTypeScrubbed CreateRequestBody4ResourceResourceType = "scrubbed" @@ -250,6 +253,27 @@ const ( CreateTypeRequestBodyIconUsers CreateTypeRequestBodyIcon = "users" ) +// Defines values for CreateWorkflowRequestBodyRunsOnIncidentModes. +const ( + CreateWorkflowRequestBodyRunsOnIncidentModesRetrospective CreateWorkflowRequestBodyRunsOnIncidentModes = "retrospective" + CreateWorkflowRequestBodyRunsOnIncidentModesStandard CreateWorkflowRequestBodyRunsOnIncidentModes = "standard" + CreateWorkflowRequestBodyRunsOnIncidentModesTest CreateWorkflowRequestBodyRunsOnIncidentModes = "test" +) + +// Defines values for CreateWorkflowRequestBodyRunsOnIncidents. +const ( + CreateWorkflowRequestBodyRunsOnIncidentsNewlyCreated CreateWorkflowRequestBodyRunsOnIncidents = "newly_created" + CreateWorkflowRequestBodyRunsOnIncidentsNewlyCreatedAndActive CreateWorkflowRequestBodyRunsOnIncidents = "newly_created_and_active" +) + +// Defines values for CreateWorkflowRequestBodyState. +const ( + CreateWorkflowRequestBodyStateActive CreateWorkflowRequestBodyState = "active" + CreateWorkflowRequestBodyStateDisabled CreateWorkflowRequestBodyState = "disabled" + CreateWorkflowRequestBodyStateDraft CreateWorkflowRequestBodyState = "draft" + CreateWorkflowRequestBodyStateError CreateWorkflowRequestBodyState = "error" +) + // Defines values for CustomFieldTypeInfoV1FieldType. const ( CustomFieldTypeInfoV1FieldTypeLink CustomFieldTypeInfoV1FieldType = "link" @@ -291,6 +315,32 @@ const ( Text CustomFieldV2FieldType = "text" ) +// Defines values for ExpressionOperationPayloadV2OperationType. +const ( + ExpressionOperationPayloadV2OperationTypeBranches ExpressionOperationPayloadV2OperationType = "branches" + ExpressionOperationPayloadV2OperationTypeCount ExpressionOperationPayloadV2OperationType = "count" + ExpressionOperationPayloadV2OperationTypeFilter ExpressionOperationPayloadV2OperationType = "filter" + ExpressionOperationPayloadV2OperationTypeFirst ExpressionOperationPayloadV2OperationType = "first" + ExpressionOperationPayloadV2OperationTypeMax ExpressionOperationPayloadV2OperationType = "max" + ExpressionOperationPayloadV2OperationTypeMin ExpressionOperationPayloadV2OperationType = "min" + ExpressionOperationPayloadV2OperationTypeNavigate ExpressionOperationPayloadV2OperationType = "navigate" + ExpressionOperationPayloadV2OperationTypeParse ExpressionOperationPayloadV2OperationType = "parse" + ExpressionOperationPayloadV2OperationTypeRandom ExpressionOperationPayloadV2OperationType = "random" +) + +// Defines values for ExpressionOperationV2OperationType. +const ( + ExpressionOperationV2OperationTypeBranches ExpressionOperationV2OperationType = "branches" + ExpressionOperationV2OperationTypeCount ExpressionOperationV2OperationType = "count" + ExpressionOperationV2OperationTypeFilter ExpressionOperationV2OperationType = "filter" + ExpressionOperationV2OperationTypeFirst ExpressionOperationV2OperationType = "first" + ExpressionOperationV2OperationTypeMax ExpressionOperationV2OperationType = "max" + ExpressionOperationV2OperationTypeMin ExpressionOperationV2OperationType = "min" + ExpressionOperationV2OperationTypeNavigate ExpressionOperationV2OperationType = "navigate" + ExpressionOperationV2OperationTypeParse ExpressionOperationV2OperationType = "parse" + ExpressionOperationV2OperationTypeRandom ExpressionOperationV2OperationType = "random" +) + // Defines values for ExternalIssueReferenceV1Provider. const ( ExternalIssueReferenceV1ProviderAsana ExternalIssueReferenceV1Provider = "asana" @@ -322,6 +372,7 @@ const ( ExternalResourceV1ResourceTypeGithubPullRequest ExternalResourceV1ResourceType = "github_pull_request" ExternalResourceV1ResourceTypeGitlabMergeRequest ExternalResourceV1ResourceType = "gitlab_merge_request" ExternalResourceV1ResourceTypeGoogleCalendarEvent ExternalResourceV1ResourceType = "google_calendar_event" + ExternalResourceV1ResourceTypeJiraIssue ExternalResourceV1ResourceType = "jira_issue" ExternalResourceV1ResourceTypeOpsgenieAlert ExternalResourceV1ResourceType = "opsgenie_alert" ExternalResourceV1ResourceTypePagerDutyIncident ExternalResourceV1ResourceType = "pager_duty_incident" ExternalResourceV1ResourceTypeScrubbed ExternalResourceV1ResourceType = "scrubbed" @@ -347,7 +398,11 @@ const ( IdentityV1RolesIncidentEditor IdentityV1Roles = "incident_editor" IdentityV1RolesIncidentMembershipsEditor IdentityV1Roles = "incident_memberships_editor" IdentityV1RolesManageSettings IdentityV1Roles = "manage_settings" + IdentityV1RolesPrivateWorkflowsEditor IdentityV1Roles = "private_workflows_editor" + IdentityV1RolesSchedulesEditor IdentityV1Roles = "schedules_editor" + IdentityV1RolesSchedulesReader IdentityV1Roles = "schedules_reader" IdentityV1RolesViewer IdentityV1Roles = "viewer" + IdentityV1RolesWorkflowsEditor IdentityV1Roles = "workflows_editor" ) // Defines values for IncidentRoleV1RoleType. @@ -419,6 +474,42 @@ const ( IncidentV2VisibilityPublic IncidentV2Visibility = "public" ) +// Defines values for ManagementMetaV2ManagedBy. +const ( + ManagementMetaV2ManagedByDashboard ManagementMetaV2ManagedBy = "dashboard" + ManagementMetaV2ManagedByExternal ManagementMetaV2ManagedBy = "external" + ManagementMetaV2ManagedByTerraform ManagementMetaV2ManagedBy = "terraform" +) + +// Defines values for ScheduleRotationHandoverV2IntervalType. +const ( + Daily ScheduleRotationHandoverV2IntervalType = "daily" + Hourly ScheduleRotationHandoverV2IntervalType = "hourly" + Weekly ScheduleRotationHandoverV2IntervalType = "weekly" +) + +// Defines values for ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday. +const ( + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdayFriday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "friday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdayMonday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "monday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdaySaturday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "saturday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdaySunday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "sunday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdayThursday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "thursday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdayTuesday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "tuesday" + ScheduleRotationWorkingIntervalUpdatePayloadV2WeekdayWednesday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "wednesday" +) + +// Defines values for ScheduleRotationWorkingIntervalV2Weekday. +const ( + ScheduleRotationWorkingIntervalV2WeekdayFriday ScheduleRotationWorkingIntervalV2Weekday = "friday" + ScheduleRotationWorkingIntervalV2WeekdayMonday ScheduleRotationWorkingIntervalV2Weekday = "monday" + ScheduleRotationWorkingIntervalV2WeekdaySaturday ScheduleRotationWorkingIntervalV2Weekday = "saturday" + ScheduleRotationWorkingIntervalV2WeekdaySunday ScheduleRotationWorkingIntervalV2Weekday = "sunday" + ScheduleRotationWorkingIntervalV2WeekdayThursday ScheduleRotationWorkingIntervalV2Weekday = "thursday" + ScheduleRotationWorkingIntervalV2WeekdayTuesday ScheduleRotationWorkingIntervalV2Weekday = "tuesday" + ScheduleRotationWorkingIntervalV2WeekdayWednesday ScheduleRotationWorkingIntervalV2Weekday = "wednesday" +) + // Defines values for UpdateRequestBody2Required. const ( UpdateRequestBody2RequiredAlways UpdateRequestBody2Required = "always" @@ -472,6 +563,27 @@ const ( Users UpdateTypeRequestBodyIcon = "users" ) +// Defines values for UpdateWorkflowRequestBodyRunsOnIncidentModes. +const ( + UpdateWorkflowRequestBodyRunsOnIncidentModesRetrospective UpdateWorkflowRequestBodyRunsOnIncidentModes = "retrospective" + UpdateWorkflowRequestBodyRunsOnIncidentModesStandard UpdateWorkflowRequestBodyRunsOnIncidentModes = "standard" + UpdateWorkflowRequestBodyRunsOnIncidentModesTest UpdateWorkflowRequestBodyRunsOnIncidentModes = "test" +) + +// Defines values for UpdateWorkflowRequestBodyRunsOnIncidents. +const ( + UpdateWorkflowRequestBodyRunsOnIncidentsNewlyCreated UpdateWorkflowRequestBodyRunsOnIncidents = "newly_created" + UpdateWorkflowRequestBodyRunsOnIncidentsNewlyCreatedAndActive UpdateWorkflowRequestBodyRunsOnIncidents = "newly_created_and_active" +) + +// Defines values for UpdateWorkflowRequestBodyState. +const ( + UpdateWorkflowRequestBodyStateActive UpdateWorkflowRequestBodyState = "active" + UpdateWorkflowRequestBodyStateDisabled UpdateWorkflowRequestBodyState = "disabled" + UpdateWorkflowRequestBodyStateDraft UpdateWorkflowRequestBodyState = "draft" + UpdateWorkflowRequestBodyStateError UpdateWorkflowRequestBodyState = "error" +) + // Defines values for UserV1Role. const ( UserV1RoleAdministrator UserV1Role = "administrator" @@ -490,6 +602,48 @@ const ( Viewer UserWithRolesV2Role = "viewer" ) +// Defines values for WorkflowRunsOnIncidentModes. +const ( + WorkflowRunsOnIncidentModesRetrospective WorkflowRunsOnIncidentModes = "retrospective" + WorkflowRunsOnIncidentModesStandard WorkflowRunsOnIncidentModes = "standard" + WorkflowRunsOnIncidentModesTest WorkflowRunsOnIncidentModes = "test" +) + +// Defines values for WorkflowRunsOnIncidents. +const ( + WorkflowRunsOnIncidentsNewlyCreated WorkflowRunsOnIncidents = "newly_created" + WorkflowRunsOnIncidentsNewlyCreatedAndActive WorkflowRunsOnIncidents = "newly_created_and_active" +) + +// Defines values for WorkflowState. +const ( + WorkflowStateActive WorkflowState = "active" + WorkflowStateDisabled WorkflowState = "disabled" + WorkflowStateDraft WorkflowState = "draft" + WorkflowStateError WorkflowState = "error" +) + +// Defines values for WorkflowSlimRunsOnIncidentModes. +const ( + WorkflowSlimRunsOnIncidentModesRetrospective WorkflowSlimRunsOnIncidentModes = "retrospective" + WorkflowSlimRunsOnIncidentModesStandard WorkflowSlimRunsOnIncidentModes = "standard" + WorkflowSlimRunsOnIncidentModesTest WorkflowSlimRunsOnIncidentModes = "test" +) + +// Defines values for WorkflowSlimRunsOnIncidents. +const ( + WorkflowSlimRunsOnIncidentsNewlyCreated WorkflowSlimRunsOnIncidents = "newly_created" + WorkflowSlimRunsOnIncidentsNewlyCreatedAndActive WorkflowSlimRunsOnIncidents = "newly_created_and_active" +) + +// Defines values for WorkflowSlimState. +const ( + WorkflowSlimStateActive WorkflowSlimState = "active" + WorkflowSlimStateDisabled WorkflowSlimState = "disabled" + WorkflowSlimStateDraft WorkflowSlimState = "draft" + WorkflowSlimStateError WorkflowSlimState = "error" +) + // Defines values for ActionsV1ListParamsIncidentMode. const ( ActionsV1ListParamsIncidentModeReal ActionsV1ListParamsIncidentMode = "real" @@ -504,6 +658,7 @@ const ( GithubPullRequest IncidentAttachmentsV1ListParamsResourceType = "github_pull_request" GitlabMergeRequest IncidentAttachmentsV1ListParamsResourceType = "gitlab_merge_request" GoogleCalendarEvent IncidentAttachmentsV1ListParamsResourceType = "google_calendar_event" + JiraIssue IncidentAttachmentsV1ListParamsResourceType = "jira_issue" OpsgenieAlert IncidentAttachmentsV1ListParamsResourceType = "opsgenie_alert" PagerDutyIncident IncidentAttachmentsV1ListParamsResourceType = "pager_duty_incident" Scrubbed IncidentAttachmentsV1ListParamsResourceType = "scrubbed" @@ -516,6 +671,7 @@ const ( const ( ActionsV2ListParamsIncidentModeRetrospective ActionsV2ListParamsIncidentMode = "retrospective" ActionsV2ListParamsIncidentModeStandard ActionsV2ListParamsIncidentMode = "standard" + ActionsV2ListParamsIncidentModeStream ActionsV2ListParamsIncidentMode = "stream" ActionsV2ListParamsIncidentModeTest ActionsV2ListParamsIncidentMode = "test" ActionsV2ListParamsIncidentModeTutorial ActionsV2ListParamsIncidentMode = "tutorial" ) @@ -524,6 +680,7 @@ const ( const ( Retrospective FollowUpsV2ListParamsIncidentMode = "retrospective" Standard FollowUpsV2ListParamsIncidentMode = "standard" + Stream FollowUpsV2ListParamsIncidentMode = "stream" Test FollowUpsV2ListParamsIncidentMode = "test" Tutorial FollowUpsV2ListParamsIncidentMode = "tutorial" ) @@ -605,6 +762,75 @@ type ActorV2 struct { User *UserV1 `json:"user,omitempty"` } +// AfterPaginationMetaResultV2 defines model for AfterPaginationMetaResultV2. +type AfterPaginationMetaResultV2 struct { + // After The time, if it exists, of the last entry's end time + After string `json:"after"` + + // AfterUrl The URL to fetch the next page of entries + AfterUrl string `json:"after_url"` +} + +// AlertResult defines model for AlertResult. +type AlertResult struct { + // DeduplicationKey The deduplication key that the event has been processed with + DeduplicationKey AlertResultDeduplicationKey `json:"deduplication_key"` + + // Message Human readable message giving detail about the event + Message AlertResultMessage `json:"message"` + + // Status Status of the event + Status AlertResultStatus `json:"status"` +} + +// AlertResultDeduplicationKey The deduplication key that the event has been processed with +type AlertResultDeduplicationKey string + +// AlertResultMessage Human readable message giving detail about the event +type AlertResultMessage string + +// AlertResultStatus Status of the event +type AlertResultStatus string + +// CatalogEntryEngineParamBindingV2 defines model for CatalogEntryEngineParamBindingV2. +type CatalogEntryEngineParamBindingV2 struct { + // ArrayValue If array_value is set, this helps render the values + ArrayValue *[]CatalogEntryEngineParamBindingValueV2 `json:"array_value,omitempty"` + Value *CatalogEntryEngineParamBindingValueV2 `json:"value,omitempty"` +} + +// CatalogEntryEngineParamBindingValueV2 defines model for CatalogEntryEngineParamBindingValueV2. +type CatalogEntryEngineParamBindingValueV2 struct { + CatalogEntry *CatalogEntryReferenceV2 `json:"catalog_entry,omitempty"` + + // Helptext Gives a description of the option to the user + Helptext *string `json:"helptext,omitempty"` + + // ImageUrl If appropriate, URL to an image that can be displayed alongside the option + ImageUrl *string `json:"image_url,omitempty"` + + // IsImageSlackIcon If true, the image_url is a Slack icon and should be displayed as such + IsImageSlackIcon *bool `json:"is_image_slack_icon,omitempty"` + + // Label Human readable label to be displayed for user to select + Label string `json:"label"` + + // Literal If set, this is the literal value of the step parameter + Literal *string `json:"literal,omitempty"` + + // Reference If set, this is the reference into the trigger scope that is the value of this parameter + Reference *string `json:"reference,omitempty"` + + // SortKey Gives an indication of how to sort the options when displayed to the user + SortKey string `json:"sort_key"` + + // Unavailable Unavailable is true if we've failed to build the value for this binding + Unavailable *bool `json:"unavailable,omitempty"` + + // Value Either the reference or the literal: this field is designed purely to make working with react-select easier + Value *string `json:"value,omitempty"` +} + // CatalogEntryReferenceV2 defines model for CatalogEntryReferenceV2. type CatalogEntryReferenceV2 struct { // ArchivedAt When this entry was archived @@ -629,7 +855,7 @@ type CatalogEntryV2 struct { ArchivedAt *time.Time `json:"archived_at,omitempty"` // AttributeValues Values of this entry - AttributeValues map[string]EngineParamBindingV2 `json:"attribute_values"` + AttributeValues map[string]CatalogEntryEngineParamBindingV2 `json:"attribute_values"` // CatalogTypeId ID of this catalog type CatalogTypeId string `json:"catalog_type_id"` @@ -674,6 +900,21 @@ type CatalogResourceV2 struct { // CatalogResourceV2Category Which category of resource type CatalogResourceV2Category string +// CatalogTypeAttributePathItemPayloadV2 defines model for CatalogTypeAttributePathItemPayloadV2. +type CatalogTypeAttributePathItemPayloadV2 struct { + // AttributeId the ID of the attribute to use + AttributeId string `json:"attribute_id"` +} + +// CatalogTypeAttributePathItemV2 defines model for CatalogTypeAttributePathItemV2. +type CatalogTypeAttributePathItemV2 struct { + // AttributeId the ID of the attribute to use + AttributeId string `json:"attribute_id"` + + // AttributeName the name of the attribute to use + AttributeName string `json:"attribute_name"` +} + // CatalogTypeAttributePayloadV2 defines model for CatalogTypeAttributePayloadV2. type CatalogTypeAttributePayloadV2 struct { // Array Whether this attribute is an array @@ -691,6 +932,9 @@ type CatalogTypeAttributePayloadV2 struct { // Name Unique name of this attribute Name string `json:"name"` + // Path The path to use (if this is an path) + Path *[]CatalogTypeAttributePathItemPayloadV2 `json:"path,omitempty"` + // Type Catalog type name for this attribute Type string `json:"type"` } @@ -715,6 +959,9 @@ type CatalogTypeAttributeV2 struct { // Name Unique name of this attribute Name string `json:"name"` + // Path The path to use (if this is a path attribute) + Path *[]CatalogTypeAttributePathItemV2 `json:"path,omitempty"` + // Type Catalog type name for this attribute Type string `json:"type"` } @@ -795,6 +1042,57 @@ type CatalogTypeV2Color string // CatalogTypeV2Icon Sets the display icon of this type in the dashboard type CatalogTypeV2Icon string +// ConditionGroupPayloadV2 defines model for ConditionGroupPayloadV2. +type ConditionGroupPayloadV2 struct { + // Conditions All conditions in this list must be satisfied for the group to be satisfied + Conditions []ConditionPayloadV2 `json:"conditions"` +} + +// ConditionGroupV2 defines model for ConditionGroupV2. +type ConditionGroupV2 struct { + // Conditions All conditions in this list must be satisfied for the group to be satisfied + Conditions []ConditionV2 `json:"conditions"` +} + +// ConditionOperationV2 defines model for ConditionOperationV2. +type ConditionOperationV2 struct { + // Label Human readable label to be displayed for user to select + Label string `json:"label"` + + // Value Unique identifier for this option + Value string `json:"value"` +} + +// ConditionPayloadV2 defines model for ConditionPayloadV2. +type ConditionPayloadV2 struct { + // Operation The name of the operation on the subject + Operation string `json:"operation"` + + // ParamBindings List of parameter bindings + ParamBindings []EngineParamBindingPayloadV2 `json:"param_bindings"` + + // Subject The reference of the subject in the trigger scope + Subject string `json:"subject"` +} + +// ConditionSubjectV2 defines model for ConditionSubjectV2. +type ConditionSubjectV2 struct { + // Label Human readable identifier for the subject + Label string `json:"label"` + + // Reference Reference into the scope for the value of the subject + Reference string `json:"reference"` +} + +// ConditionV2 defines model for ConditionV2. +type ConditionV2 struct { + Operation ConditionOperationV2 `json:"operation"` + + // ParamBindings Bindings for the operation parameters + ParamBindings []EngineParamBindingV2 `json:"param_bindings"` + Subject ConditionSubjectV2 `json:"subject"` +} + // CreateEntryRequestBody defines model for CreateEntryRequestBody. type CreateEntryRequestBody struct { // Aliases Optional aliases that can be used to reference this entry @@ -845,27 +1143,6 @@ type CreateHTTPRequestBody struct { // CreateHTTPRequestBodyStatus Current status of this alert type CreateHTTPRequestBodyStatus string -// CreateHTTPResponseBody defines model for CreateHTTPResponseBody. -type CreateHTTPResponseBody struct { - // DeduplicationKey The deduplication key that the event has been processed with - DeduplicationKey CreateHTTPResponseBodyDeduplicationKey `json:"deduplication_key"` - - // Message Human readable message giving detail about the event - Message CreateHTTPResponseBodyMessage `json:"message"` - - // Status Status of the event - Status CreateHTTPResponseBodyStatus `json:"status"` -} - -// CreateHTTPResponseBodyDeduplicationKey The deduplication key that the event has been processed with -type CreateHTTPResponseBodyDeduplicationKey string - -// CreateHTTPResponseBodyMessage Human readable message giving detail about the event -type CreateHTTPResponseBodyMessage string - -// CreateHTTPResponseBodyStatus Status of the event -type CreateHTTPResponseBodyStatus string - // CreateRequestBody defines model for CreateRequestBody. type CreateRequestBody struct { // CustomFieldId ID of the custom field this option belongs to @@ -932,6 +1209,11 @@ type CreateRequestBody10Visibility string // CreateRequestBody11 defines model for CreateRequestBody11. type CreateRequestBody11 struct { + Schedule ScheduleCreatePayloadV2 `json:"schedule"` +} + +// CreateRequestBody12 defines model for CreateRequestBody12. +type CreateRequestBody12 struct { // Description Description of the severity Description string `json:"description"` @@ -1023,7 +1305,7 @@ type CreateRequestBody6 struct { // Description Describes the purpose of the role Description string `json:"description"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role @@ -1032,7 +1314,7 @@ type CreateRequestBody6 struct { // Required DEPRECATED: this will always be false. Required bool `json:"required"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` } @@ -1041,13 +1323,13 @@ type CreateRequestBody7 struct { // Description Describes the purpose of the role Description string `json:"description"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role Name string `json:"name"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` } @@ -1165,6 +1447,58 @@ type CreateTypeResponseBody struct { CatalogType CatalogTypeV2 `json:"catalog_type"` } +// CreateWorkflowRequestBody defines model for CreateWorkflowRequestBody. +type CreateWorkflowRequestBody struct { + // Annotations Annotations that track metadata about this resource + Annotations *map[string]string `json:"annotations,omitempty"` + + // ConditionGroups List of conditions to apply to the workflow + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` + + // ContinueOnStepError Whether to continue executing the workflow if a step fails + ContinueOnStepError bool `json:"continue_on_step_error"` + Delay *WorkflowDelay `json:"delay,omitempty"` + + // Expressions The expressions used in the workflow + Expressions []ExpressionPayloadV2 `json:"expressions"` + + // Folder Folder to display the workflow in + Folder *string `json:"folder,omitempty"` + + // IncludePrivateIncidents Whether to include private incidents + IncludePrivateIncidents bool `json:"include_private_incidents"` + + // Name The human-readable name of the workflow + Name string `json:"name"` + + // OnceFor Once For strategy to apply to this workflow + OnceFor []string `json:"once_for"` + + // RunsOnIncidentModes Which modes of incident this should run on (defaults to just standard incidents) + RunsOnIncidentModes []CreateWorkflowRequestBodyRunsOnIncidentModes `json:"runs_on_incident_modes"` + + // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) + RunsOnIncidents CreateWorkflowRequestBodyRunsOnIncidents `json:"runs_on_incidents"` + + // State The state of the workflow (e.g. is it draft, or disabled) + State *CreateWorkflowRequestBodyState `json:"state,omitempty"` + + // Steps List of step to execute as part of the workflow + Steps []StepConfigPayload `json:"steps"` + + // Trigger Trigger to set on the workflow + Trigger string `json:"trigger"` +} + +// CreateWorkflowRequestBodyRunsOnIncidentModes defines model for CreateWorkflowRequestBody.RunsOnIncidentModes. +type CreateWorkflowRequestBodyRunsOnIncidentModes string + +// CreateWorkflowRequestBodyRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type CreateWorkflowRequestBodyRunsOnIncidents string + +// CreateWorkflowRequestBodyState The state of the workflow (e.g. is it draft, or disabled) +type CreateWorkflowRequestBodyState string + // CustomFieldEntryPayloadV1 defines model for CustomFieldEntryPayloadV1. type CustomFieldEntryPayloadV1 struct { // CustomFieldId ID of the custom field this entry is linked against @@ -1386,17 +1720,6 @@ type EngineParamBindingValuePayloadV2 struct { // EngineParamBindingValueV2 defines model for EngineParamBindingValueV2. type EngineParamBindingValueV2 struct { - CatalogEntry *CatalogEntryReferenceV2 `json:"catalog_entry,omitempty"` - - // Helptext Gives a description of the option to the user - Helptext *string `json:"helptext,omitempty"` - - // ImageUrl If appropriate, URL to an image that can be displayed alongside the option - ImageUrl *string `json:"image_url,omitempty"` - - // IsImageSlackIcon If true, the image_url is a Slack icon and should be displayed as such - IsImageSlackIcon *bool `json:"is_image_slack_icon,omitempty"` - // Label Human readable label to be displayed for user to select Label string `json:"label"` @@ -1405,15 +1728,154 @@ type EngineParamBindingValueV2 struct { // Reference If set, this is the reference into the trigger scope that is the value of this parameter Reference *string `json:"reference,omitempty"` +} - // SortKey Gives an indication of how to sort the options when displayed to the user - SortKey string `json:"sort_key"` +// EngineReferenceV2 defines model for EngineReferenceV2. +type EngineReferenceV2 struct { + // Array If true, the reference can refer to 0 to many items + Array bool `json:"array"` - // Unavailable Unavailable is true if we've failed to build the value for this binding - Unavailable *bool `json:"unavailable,omitempty"` + // Key The key of the field this is a reference to + Key string `json:"key"` - // Value Either the reference or the literal: this field is designed purely to make working with react-select easier - Value *string `json:"value,omitempty"` + // Label Human readable label for the field (with context) + Label string `json:"label"` + + // Type The type of this resource in the engine + Type string `json:"type"` +} + +// ExpressionBranchPayloadV2 defines model for ExpressionBranchPayloadV2. +type ExpressionBranchPayloadV2 struct { + // ConditionGroups When one of these condition groups are satisfied, this branch will be evaluated + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` + Result EngineParamBindingPayloadV2 `json:"result"` +} + +// ExpressionBranchV2 defines model for ExpressionBranchV2. +type ExpressionBranchV2 struct { + // ConditionGroups When one of these condition groups are satisfied, this branch will be evaluated + ConditionGroups []ConditionGroupV2 `json:"condition_groups"` + Result EngineParamBindingV2 `json:"result"` +} + +// ExpressionBranchesOptsPayloadV2 defines model for ExpressionBranchesOptsPayloadV2. +type ExpressionBranchesOptsPayloadV2 struct { + // Branches The branches to apply for this operation + Branches []ExpressionBranchPayloadV2 `json:"branches"` + Returns ReturnsMetaV2 `json:"returns"` +} + +// ExpressionBranchesOptsV2 defines model for ExpressionBranchesOptsV2. +type ExpressionBranchesOptsV2 struct { + // Branches The branches to apply for this operation + Branches []ExpressionBranchV2 `json:"branches"` + Returns ReturnsMetaV2 `json:"returns"` +} + +// ExpressionElseBranchPayloadV2 defines model for ExpressionElseBranchPayloadV2. +type ExpressionElseBranchPayloadV2 struct { + Result EngineParamBindingPayloadV2 `json:"result"` +} + +// ExpressionElseBranchV2 defines model for ExpressionElseBranchV2. +type ExpressionElseBranchV2 struct { + Result EngineParamBindingV2 `json:"result"` +} + +// ExpressionFilterOptsPayloadV2 defines model for ExpressionFilterOptsPayloadV2. +type ExpressionFilterOptsPayloadV2 struct { + // ConditionGroups The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass. + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` +} + +// ExpressionFilterOptsV2 defines model for ExpressionFilterOptsV2. +type ExpressionFilterOptsV2 struct { + // ConditionGroups The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass. + ConditionGroups []ConditionGroupV2 `json:"condition_groups"` +} + +// ExpressionNavigateOptsPayloadV2 defines model for ExpressionNavigateOptsPayloadV2. +type ExpressionNavigateOptsPayloadV2 struct { + // Reference The reference that you want to navigate to + Reference string `json:"reference"` +} + +// ExpressionNavigateOptsV2 defines model for ExpressionNavigateOptsV2. +type ExpressionNavigateOptsV2 struct { + // Reference The reference within the scope to navigate to + Reference string `json:"reference"` + + // ReferenceLabel The name of the reference to navigate to + ReferenceLabel string `json:"reference_label"` +} + +// ExpressionOperationPayloadV2 defines model for ExpressionOperationPayloadV2. +type ExpressionOperationPayloadV2 struct { + Branches *ExpressionBranchesOptsPayloadV2 `json:"branches,omitempty"` + Filter *ExpressionFilterOptsPayloadV2 `json:"filter,omitempty"` + Navigate *ExpressionNavigateOptsPayloadV2 `json:"navigate,omitempty"` + + // OperationType The type of the operation + OperationType ExpressionOperationPayloadV2OperationType `json:"operation_type"` + Parse *ExpressionParseOptsV2 `json:"parse,omitempty"` +} + +// ExpressionOperationPayloadV2OperationType The type of the operation +type ExpressionOperationPayloadV2OperationType string + +// ExpressionOperationV2 defines model for ExpressionOperationV2. +type ExpressionOperationV2 struct { + Branches *ExpressionBranchesOptsV2 `json:"branches,omitempty"` + Filter *ExpressionFilterOptsV2 `json:"filter,omitempty"` + Navigate *ExpressionNavigateOptsV2 `json:"navigate,omitempty"` + + // OperationType The type of the operation + OperationType ExpressionOperationV2OperationType `json:"operation_type"` + Parse *ExpressionParseOptsV2 `json:"parse,omitempty"` + Returns ReturnsMetaV2 `json:"returns"` +} + +// ExpressionOperationV2OperationType The type of the operation +type ExpressionOperationV2OperationType string + +// ExpressionParseOptsV2 defines model for ExpressionParseOptsV2. +type ExpressionParseOptsV2 struct { + Returns ReturnsMetaV2 `json:"returns"` + + // Source Source expression that is evaluated to a result + Source string `json:"source"` +} + +// ExpressionPayloadV2 defines model for ExpressionPayloadV2. +type ExpressionPayloadV2 struct { + ElseBranch *ExpressionElseBranchPayloadV2 `json:"else_branch,omitempty"` + + // Label The human readable label of the expression + Label string `json:"label"` + Operations []ExpressionOperationPayloadV2 `json:"operations"` + + // Reference A short ID that can be used to reference the expression + Reference string `json:"reference"` + + // RootReference The root reference for this expression (i.e. where the expression starts) + RootReference string `json:"root_reference"` +} + +// ExpressionV2 defines model for ExpressionV2. +type ExpressionV2 struct { + ElseBranch *ExpressionElseBranchV2 `json:"else_branch,omitempty"` + + // Label The human readable label of the expression + Label string `json:"label"` + Operations []ExpressionOperationV2 `json:"operations"` + + // Reference A short ID that can be used to reference the expression + Reference string `json:"reference"` + Returns ReturnsMetaV2 `json:"returns"` + + // RootReference The root reference for this expression (i.e. where the expression starts) + RootReference string `json:"root_reference"` } // ExternalIssueReferenceV1 defines model for ExternalIssueReferenceV1. @@ -1607,7 +2069,7 @@ type IncidentMembership struct { type IncidentRoleAssignmentPayloadV1 struct { Assignee UserReferencePayloadV1 `json:"assignee"` - // IncidentRoleId Unique ID of an incident role + // IncidentRoleId Unique ID of an incident role. Note that the 'reporter' role can only be assigned when creating an incident. IncidentRoleId string `json:"incident_role_id"` } @@ -1627,7 +2089,7 @@ type IncidentRoleAssignmentV1 struct { // IncidentRoleV1 defines model for IncidentRoleV1. type IncidentRoleV1 struct { - // CreatedAt When the action was created + // CreatedAt When the role was created CreatedAt time.Time `json:"created_at"` // Description Describes the purpose of the role @@ -1636,7 +2098,7 @@ type IncidentRoleV1 struct { // Id Unique identifier for the role Id string `json:"id"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role @@ -1648,10 +2110,10 @@ type IncidentRoleV1 struct { // RoleType Type of incident role RoleType IncidentRoleV1RoleType `json:"role_type"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` - // UpdatedAt When the action was last updated + // UpdatedAt When the role was last updated UpdatedAt time.Time `json:"updated_at"` } @@ -1660,7 +2122,7 @@ type IncidentRoleV1RoleType string // IncidentRoleV2 defines model for IncidentRoleV2. type IncidentRoleV2 struct { - // CreatedAt When the action was created + // CreatedAt When the role was created CreatedAt time.Time `json:"created_at"` // Description Describes the purpose of the role @@ -1669,7 +2131,7 @@ type IncidentRoleV2 struct { // Id Unique identifier for the role Id string `json:"id"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role @@ -1678,10 +2140,10 @@ type IncidentRoleV2 struct { // RoleType Type of incident role RoleType IncidentRoleV2RoleType `json:"role_type"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` - // UpdatedAt When the action was last updated + // UpdatedAt When the role was last updated UpdatedAt time.Time `json:"updated_at"` } @@ -1794,6 +2256,9 @@ type IncidentUpdateV2 struct { // IncidentId The incident this update relates to IncidentId string `json:"incident_id"` + // MergedIntoIncidentId The ID of the incident that this incident was merged into, if it was merged in to another incident + MergedIntoIncidentId *string `json:"merged_into_incident_id,omitempty"` + // Message Message that explains the context behind the update Message *string `json:"message,omitempty"` NewIncidentStatus IncidentStatusV1 `json:"new_incident_status"` @@ -1836,7 +2301,7 @@ type IncidentV1 struct { Reference string `json:"reference"` Severity *SeverityV2 `json:"severity,omitempty"` - // SlackChannelId ID of the Slack channel in the organisation Slack workspace + // SlackChannelId ID of the Slack channel in the organisation Slack workspace. Note that the channel is sometimes created asynchronously, so may not be present when the incident is just created. SlackChannelId string `json:"slack_channel_id"` // SlackChannelName Name of the slack channel @@ -1913,7 +2378,7 @@ type IncidentV2 struct { Reference string `json:"reference"` Severity *SeverityV2 `json:"severity,omitempty"` - // SlackChannelId ID of the Slack channel in the organisation Slack workspace + // SlackChannelId ID of the Slack channel in the organisation Slack workspace. Note that the channel is sometimes created asynchronously, so may not be present when the incident is just created. SlackChannelId string `json:"slack_channel_id"` // SlackChannelName Name of the slack channel @@ -2002,11 +2467,17 @@ type ListResponseBody15 struct { // ListResponseBody16 defines model for ListResponseBody16. type ListResponseBody16 struct { - Severities []SeverityV2 `json:"severities"` + PaginationMeta *PaginationMetaResultWithTotal `json:"pagination_meta,omitempty"` + Schedules []ScheduleV2 `json:"schedules"` } // ListResponseBody17 defines model for ListResponseBody17. type ListResponseBody17 struct { + Severities []SeverityV2 `json:"severities"` +} + +// ListResponseBody18 defines model for ListResponseBody18. +type ListResponseBody18 struct { PaginationMeta PaginationMetaResult `json:"pagination_meta"` Users []UserWithRolesV2 `json:"users"` } @@ -2052,13 +2523,39 @@ type ListResponseBody9 struct { IncidentRoles []IncidentRoleV2 `json:"incident_roles"` } +// ListScheduleEntriesResponseBody defines model for ListScheduleEntriesResponseBody. +type ListScheduleEntriesResponseBody struct { + PaginationMeta *AfterPaginationMetaResultV2 `json:"pagination_meta,omitempty"` + ScheduleEntries ScheduleEntriesListPayloadV2 `json:"schedule_entries"` +} + // ListTypesResponseBody defines model for ListTypesResponseBody. type ListTypesResponseBody struct { CatalogTypes []CatalogTypeV2 `json:"catalog_types"` } -// PaginationMetaResult defines model for PaginationMetaResult. -type PaginationMetaResult struct { +// ListWorkflowsResponseBody defines model for ListWorkflowsResponseBody. +type ListWorkflowsResponseBody struct { + Workflows []WorkflowSlim `json:"workflows"` +} + +// ManagementMetaV2 defines model for ManagementMetaV2. +type ManagementMetaV2 struct { + // Annotations Annotations that track metadata about this resource + Annotations map[string]string `json:"annotations"` + + // ManagedBy How is this resource managed + ManagedBy ManagementMetaV2ManagedBy `json:"managed_by"` + + // SourceUrl The url of the external repository where this resource is managed (if there is one) + SourceUrl *string `json:"source_url,omitempty"` +} + +// ManagementMetaV2ManagedBy How is this resource managed +type ManagementMetaV2ManagedBy string + +// PaginationMetaResult defines model for PaginationMetaResult. +type PaginationMetaResult struct { // After If provided, pass this as the 'after' param to load the next page After *string `json:"after,omitempty"` @@ -2095,10 +2592,223 @@ type RBACRoleV2 struct { // RetrospectiveIncidentOptionsV2 defines model for RetrospectiveIncidentOptionsV2. type RetrospectiveIncidentOptionsV2 struct { + // PostmortemDocumentUrl If the incident mode is 'retrospective', pass the URL of the postmortem to attach it to the incident + PostmortemDocumentUrl *string `json:"postmortem_document_url,omitempty"` + // SlackChannelId If the incident mode is 'retrospective', pass the ID of a Slack channel in your workspace to attach the incident to an existing channel, rather than creating a new one SlackChannelId *string `json:"slack_channel_id,omitempty"` } +// ReturnsMetaV2 defines model for ReturnsMetaV2. +type ReturnsMetaV2 struct { + // Array Whether the return value should be single or multi-value + Array bool `json:"array"` + + // Type Expected return type of this expression (what to try casting the result to) + Type string `json:"type"` +} + +// ScheduleConfigCreatePayloadV2 defines model for ScheduleConfigCreatePayloadV2. +type ScheduleConfigCreatePayloadV2 struct { + Rotations *[]ScheduleRotationCreatePayloadV2 `json:"rotations,omitempty"` +} + +// ScheduleConfigUpdatePayloadV2 defines model for ScheduleConfigUpdatePayloadV2. +type ScheduleConfigUpdatePayloadV2 struct { + Rotations *[]ScheduleRotationUpdatePayloadV2 `json:"rotations,omitempty"` +} + +// ScheduleConfigV2 defines model for ScheduleConfigV2. +type ScheduleConfigV2 struct { + // Rotations Rotas in this schedule + Rotations []ScheduleRotationV2 `json:"rotations"` +} + +// ScheduleCreatePayloadV2 defines model for ScheduleCreatePayloadV2. +type ScheduleCreatePayloadV2 struct { + // Annotations Annotations that can track metadata about the schedule + Annotations *map[string]string `json:"annotations,omitempty"` + Config *ScheduleConfigCreatePayloadV2 `json:"config,omitempty"` + + // Name Name of the schedule + Name *string `json:"name,omitempty"` + + // Timezone Timezone of the schedule + Timezone *string `json:"timezone,omitempty"` +} + +// ScheduleEntriesListPayloadV2 defines model for ScheduleEntriesListPayloadV2. +type ScheduleEntriesListPayloadV2 struct { + Final []ScheduleEntryV2 `json:"final"` + Overrides []ScheduleEntryV2 `json:"overrides"` + Scheduled []ScheduleEntryV2 `json:"scheduled"` +} + +// ScheduleEntryV2 defines model for ScheduleEntryV2. +type ScheduleEntryV2 struct { + EndAt time.Time `json:"end_at"` + + // EntryId Unique identifier of the schedule entry + EntryId *string `json:"entry_id,omitempty"` + + // Fingerprint A unique identifier for this entry, used to determine a unique shift + Fingerprint *string `json:"fingerprint,omitempty"` + + // LayerId If present, the layer this entry applies to on the rota + LayerId *string `json:"layer_id,omitempty"` + + // RotationId If present, the rotation this entry applies to on the schedule + RotationId *string `json:"rotation_id,omitempty"` + StartAt time.Time `json:"start_at"` + User *UserV1 `json:"user,omitempty"` +} + +// ScheduleLayerCreatePayloadV2 defines model for ScheduleLayerCreatePayloadV2. +type ScheduleLayerCreatePayloadV2 struct { + // Id Unique identifier of the layer + Id *string `json:"id,omitempty"` + + // Name Name of the layer + Name string `json:"name"` +} + +// ScheduleLayerV2 defines model for ScheduleLayerV2. +type ScheduleLayerV2 struct { + // Id Unique identifier of the layer + Id *string `json:"id,omitempty"` + + // Name Name of the layer + Name *string `json:"name,omitempty"` +} + +// ScheduleRotationCreatePayloadV2 defines model for ScheduleRotationCreatePayloadV2. +type ScheduleRotationCreatePayloadV2 struct { + EffectiveFrom *time.Time `json:"effective_from,omitempty"` + HandoverStartAt *time.Time `json:"handover_start_at,omitempty"` + Handovers *[]ScheduleRotationHandoverV2 `json:"handovers,omitempty"` + + // Id Unique identifier of the rotation + Id *string `json:"id,omitempty"` + Layers *[]ScheduleLayerCreatePayloadV2 `json:"layers,omitempty"` + + // Name Name of the rotation + Name string `json:"name"` + Users *[]UserReferencePayloadV1 `json:"users,omitempty"` + WorkingInterval *[]ScheduleRotationWorkingIntervalV2 `json:"working_interval,omitempty"` +} + +// ScheduleRotationHandoverV2 defines model for ScheduleRotationHandoverV2. +type ScheduleRotationHandoverV2 struct { + Interval *int64 `json:"interval,omitempty"` + IntervalType *ScheduleRotationHandoverV2IntervalType `json:"interval_type,omitempty"` +} + +// ScheduleRotationHandoverV2IntervalType defines model for ScheduleRotationHandoverV2.IntervalType. +type ScheduleRotationHandoverV2IntervalType string + +// ScheduleRotationUpdatePayloadV2 defines model for ScheduleRotationUpdatePayloadV2. +type ScheduleRotationUpdatePayloadV2 struct { + EffectiveFrom *time.Time `json:"effective_from,omitempty"` + HandoverStartAt *time.Time `json:"handover_start_at,omitempty"` + Handovers *[]ScheduleRotationHandoverV2 `json:"handovers,omitempty"` + + // Id Unique identifier of the rotation + Id *string `json:"id,omitempty"` + Layers *[]ScheduleLayerV2 `json:"layers,omitempty"` + + // Name Name of the rotation + Name *string `json:"name,omitempty"` + Users *[]UserReferencePayloadV1 `json:"users,omitempty"` + WorkingInterval *[]ScheduleRotationWorkingIntervalUpdatePayloadV2 `json:"working_interval,omitempty"` +} + +// ScheduleRotationV2 defines model for ScheduleRotationV2. +type ScheduleRotationV2 struct { + // EffectiveFrom When this rotation config will be effective from + EffectiveFrom *time.Time `json:"effective_from,omitempty"` + + // HandoverStartAt Defines the next moment we'll trigger a handover + HandoverStartAt time.Time `json:"handover_start_at"` + + // Handovers Defines the handover intervals for this rota, in order they should apply + Handovers []ScheduleRotationHandoverV2 `json:"handovers"` + + // Id Unique internal ID of the rotation + Id string `json:"id"` + + // Layers Controls how many people are on-call concurrently + Layers []ScheduleLayerV2 `json:"layers"` + + // Name Human readable name synced from external provider + Name string `json:"name"` + Users *[]UserV1 `json:"users,omitempty"` + WorkingInterval *[]ScheduleRotationWorkingIntervalV2 `json:"working_interval,omitempty"` +} + +// ScheduleRotationWorkingIntervalUpdatePayloadV2 defines model for ScheduleRotationWorkingIntervalUpdatePayloadV2. +type ScheduleRotationWorkingIntervalUpdatePayloadV2 struct { + // EndTime End time of the interval, in 24hr format + EndTime *string `json:"end_time,omitempty"` + + // StartTime Start time of the interval, in 24hr format + StartTime *string `json:"start_time,omitempty"` + + // Weekday Weekday this interval applies to + Weekday *ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday `json:"weekday,omitempty"` +} + +// ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday Weekday this interval applies to +type ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday string + +// ScheduleRotationWorkingIntervalV2 defines model for ScheduleRotationWorkingIntervalV2. +type ScheduleRotationWorkingIntervalV2 struct { + // EndTime End time of the interval, in 24hr format + EndTime string `json:"end_time"` + + // StartTime Start time of the interval, in 24hr format + StartTime string `json:"start_time"` + + // Weekday Weekday this interval applies to + Weekday ScheduleRotationWorkingIntervalV2Weekday `json:"weekday"` +} + +// ScheduleRotationWorkingIntervalV2Weekday Weekday this interval applies to +type ScheduleRotationWorkingIntervalV2Weekday string + +// ScheduleUpdatePayloadV2 defines model for ScheduleUpdatePayloadV2. +type ScheduleUpdatePayloadV2 struct { + // Annotations Annotations that can track metadata about the schedule + Annotations *map[string]string `json:"annotations,omitempty"` + Config *ScheduleConfigUpdatePayloadV2 `json:"config,omitempty"` + + // Name Name of the schedule + Name *string `json:"name,omitempty"` + + // Timezone Timezone of the schedule + Timezone *string `json:"timezone,omitempty"` +} + +// ScheduleV2 defines model for ScheduleV2. +type ScheduleV2 struct { + // Annotations Annotations that track metadata about this resource + Annotations map[string]string `json:"annotations"` + Config *ScheduleConfigV2 `json:"config,omitempty"` + CreatedAt time.Time `json:"created_at"` + + // CurrentShifts Shifts that are on-going for this schedule, if a native schedule + CurrentShifts *[]ScheduleEntryV2 `json:"current_shifts,omitempty"` + + // Id Unique internal ID of the schedule + Id string `json:"id"` + + // Name Human readable name synced from external provider + Name string `json:"name"` + + // Timezone Timezone of the schedule, as interpreted at the point of generating the report + Timezone string `json:"timezone"` + UpdatedAt time.Time `json:"updated_at"` +} + // SeverityV2 defines model for SeverityV2. type SeverityV2 struct { // CreatedAt When the action was created @@ -2153,11 +2863,16 @@ type ShowResponseBody13 struct { // ShowResponseBody14 defines model for ShowResponseBody14. type ShowResponseBody14 struct { - Severity SeverityV2 `json:"severity"` + Schedule ScheduleV2 `json:"schedule"` } // ShowResponseBody15 defines model for ShowResponseBody15. type ShowResponseBody15 struct { + Severity SeverityV2 `json:"severity"` +} + +// ShowResponseBody16 defines model for ShowResponseBody16. +type ShowResponseBody16 struct { User UserWithRolesV2 `json:"user"` } @@ -2201,6 +2916,63 @@ type ShowResponseBody9 struct { IncidentStatus IncidentStatusV1 `json:"incident_status"` } +// ShowWorkflowResponseBody defines model for ShowWorkflowResponseBody. +type ShowWorkflowResponseBody struct { + ManagementMeta ManagementMetaV2 `json:"management_meta"` + Workflow Workflow `json:"workflow"` +} + +// StepConfig defines model for StepConfig. +type StepConfig struct { + // ForEach Reference to the loop variable to run this step over + ForEach *string `json:"for_each,omitempty"` + + // Id Unique ID of this step in a workflow + Id string `json:"id"` + + // Label Human readable identifier for this step + Label string `json:"label"` + + // Name Unique name of the step in the engine + Name string `json:"name"` + + // ParamBindings Bindings for the step parameters + ParamBindings []EngineParamBindingV2 `json:"param_bindings"` +} + +// StepConfigPayload defines model for StepConfigPayload. +type StepConfigPayload struct { + // ForEach Reference to an expression that returns resources to run this step over + ForEach *string `json:"for_each,omitempty"` + + // Id Unique ID of this step in a workflow. This must be a valid ULID. + Id string `json:"id"` + + // Name Unique name of the step in the engine + Name string `json:"name"` + + // ParamBindings List of parameter bindings + ParamBindings []EngineParamBindingPayloadV2 `json:"param_bindings"` +} + +// StepConfigSlim defines model for StepConfigSlim. +type StepConfigSlim struct { + // Label Human readable identifier for this step + Label string `json:"label"` + + // Name Unique name of the step in the engine + Name string `json:"name"` +} + +// TriggerSlim defines model for TriggerSlim. +type TriggerSlim struct { + // Label Human readable identifier for this trigger + Label string `json:"label"` + + // Name Unique name of the trigger + Name string `json:"name"` +} + // UpdateEntryRequestBody defines model for UpdateEntryRequestBody. type UpdateEntryRequestBody struct { // Aliases Optional aliases that can be used to reference this entry @@ -2275,7 +3047,7 @@ type UpdateRequestBody4 struct { // Description Describes the purpose of the role Description string `json:"description"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role @@ -2284,7 +3056,7 @@ type UpdateRequestBody4 struct { // Required DEPRECATED: this will always be false. Required *bool `json:"required,omitempty"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` } @@ -2293,13 +3065,13 @@ type UpdateRequestBody5 struct { // Description Describes the purpose of the role Description string `json:"description"` - // Instructions Provided to whoever is nominated for the role + // Instructions Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role. Instructions string `json:"instructions"` // Name Human readable name of the incident role Name string `json:"name"` - // Shortform Short human readable name for Slack + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. Shortform string `json:"shortform"` } @@ -2312,6 +3084,11 @@ type UpdateRequestBody6 struct { Name string `json:"name"` } +// UpdateRequestBody7 defines model for UpdateRequestBody7. +type UpdateRequestBody7 struct { + Schedule ScheduleUpdatePayloadV2 `json:"schedule"` +} + // UpdateTypeRequestBody defines model for UpdateTypeRequestBody. type UpdateTypeRequestBody struct { // Annotations Annotations that can track metadata about this type @@ -2348,6 +3125,55 @@ type UpdateTypeSchemaRequestBody struct { Version int64 `json:"version"` } +// UpdateWorkflowRequestBody defines model for UpdateWorkflowRequestBody. +type UpdateWorkflowRequestBody struct { + // Annotations Annotations that track metadata about this resource + Annotations *map[string]string `json:"annotations,omitempty"` + + // ConditionGroups List of conditions to apply to the workflow + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` + + // ContinueOnStepError Whether to continue executing the workflow if a step fails + ContinueOnStepError bool `json:"continue_on_step_error"` + Delay *WorkflowDelay `json:"delay,omitempty"` + + // Expressions The expressions used in the workflow + Expressions []ExpressionPayloadV2 `json:"expressions"` + + // Folder Folder to display the workflow in + Folder *string `json:"folder,omitempty"` + + // IncludePrivateIncidents Whether to include private incidents + IncludePrivateIncidents bool `json:"include_private_incidents"` + + // Name The human-readable name of the workflow + Name string `json:"name"` + + // OnceFor Once For strategy to apply to this workflow + OnceFor []string `json:"once_for"` + + // RunsOnIncidentModes Which modes of incident this should run on (defaults to just standard incidents) + RunsOnIncidentModes []UpdateWorkflowRequestBodyRunsOnIncidentModes `json:"runs_on_incident_modes"` + + // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) + RunsOnIncidents UpdateWorkflowRequestBodyRunsOnIncidents `json:"runs_on_incidents"` + + // State The state of the workflow (e.g. is it draft, or disabled) + State *UpdateWorkflowRequestBodyState `json:"state,omitempty"` + + // Steps List of step to execute as part of the workflow + Steps []StepConfigPayload `json:"steps"` +} + +// UpdateWorkflowRequestBodyRunsOnIncidentModes defines model for UpdateWorkflowRequestBody.RunsOnIncidentModes. +type UpdateWorkflowRequestBodyRunsOnIncidentModes string + +// UpdateWorkflowRequestBodyRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type UpdateWorkflowRequestBodyRunsOnIncidents string + +// UpdateWorkflowRequestBodyState The state of the workflow (e.g. is it draft, or disabled) +type UpdateWorkflowRequestBodyState string + // UserReferencePayloadV1 defines model for UserReferencePayloadV1. type UserReferencePayloadV1 struct { // Email The user's email address, matching the email on their Slack account @@ -2405,6 +3231,127 @@ type UserWithRolesV2 struct { // UserWithRolesV2Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. type UserWithRolesV2Role string +// Workflow defines model for Workflow. +type Workflow struct { + // ConditionGroups Conditions that apply to the workflow trigger + ConditionGroups []ConditionGroupV2 `json:"condition_groups"` + + // ContinueOnStepError Whether to continue executing the workflow if a step fails + ContinueOnStepError bool `json:"continue_on_step_error"` + Delay *WorkflowDelay `json:"delay,omitempty"` + + // Expressions Expressions that make variables available in the scope + Expressions []ExpressionV2 `json:"expressions"` + + // Folder Folder to display the workflow in + Folder *string `json:"folder,omitempty"` + + // Id Unique identifier for the workflow + Id string `json:"id"` + + // IncludePrivateIncidents Whether to include private incidents + IncludePrivateIncidents bool `json:"include_private_incidents"` + + // Name The human-readable name of the workflow + Name string `json:"name"` + + // OnceFor This workflow will run 'once for' a list of references + OnceFor []EngineReferenceV2 `json:"once_for"` + + // RunsFrom The time from which this workflow will run on incidents + RunsFrom *time.Time `json:"runs_from,omitempty"` + + // RunsOnIncidentModes Which modes of incident this should run on (defaults to just standard incidents) + RunsOnIncidentModes []WorkflowRunsOnIncidentModes `json:"runs_on_incident_modes"` + + // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) + RunsOnIncidents WorkflowRunsOnIncidents `json:"runs_on_incidents"` + + // State The state of the workflow (e.g. is it draft, or disabled) + State WorkflowState `json:"state"` + + // Steps Steps that are executed as part of the workflow + Steps []StepConfig `json:"steps"` + Trigger TriggerSlim `json:"trigger"` + + // Version Revision of the workflow, uniquely identifying its version + Version int64 `json:"version"` +} + +// WorkflowRunsOnIncidentModes defines model for Workflow.RunsOnIncidentModes. +type WorkflowRunsOnIncidentModes string + +// WorkflowRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type WorkflowRunsOnIncidents string + +// WorkflowState The state of the workflow (e.g. is it draft, or disabled) +type WorkflowState string + +// WorkflowDelay defines model for WorkflowDelay. +type WorkflowDelay struct { + // ConditionsApplyOverDelay If this workflow is delayed, whether the conditions should be rechecked between trigger firing and execution + ConditionsApplyOverDelay bool `json:"conditions_apply_over_delay"` + + // ForSeconds Delay in seconds between trigger firing and running the workflow + ForSeconds int64 `json:"for_seconds"` +} + +// WorkflowSlim defines model for WorkflowSlim. +type WorkflowSlim struct { + // ConditionGroups Conditions that apply to the workflow trigger + ConditionGroups []ConditionGroupV2 `json:"condition_groups"` + + // ContinueOnStepError Whether to continue executing the workflow if a step fails + ContinueOnStepError bool `json:"continue_on_step_error"` + Delay *WorkflowDelay `json:"delay,omitempty"` + + // Expressions Expressions that make variables available in the scope + Expressions []ExpressionV2 `json:"expressions"` + + // Folder Folder to display the workflow in + Folder *string `json:"folder,omitempty"` + + // Id Unique identifier for the workflow + Id string `json:"id"` + + // IncludePrivateIncidents Whether to include private incidents + IncludePrivateIncidents bool `json:"include_private_incidents"` + + // Name The human-readable name of the workflow + Name string `json:"name"` + + // OnceFor This workflow will run 'once for' a list of references + OnceFor []EngineReferenceV2 `json:"once_for"` + + // RunsFrom The time from which this workflow will run on incidents + RunsFrom *time.Time `json:"runs_from,omitempty"` + + // RunsOnIncidentModes Which modes of incident this should run on (defaults to just standard incidents) + RunsOnIncidentModes []WorkflowSlimRunsOnIncidentModes `json:"runs_on_incident_modes"` + + // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) + RunsOnIncidents WorkflowSlimRunsOnIncidents `json:"runs_on_incidents"` + + // State The state of the workflow (e.g. is it draft, or disabled) + State WorkflowSlimState `json:"state"` + + // Steps Steps that are executed as part of the workflow + Steps []StepConfigSlim `json:"steps"` + Trigger TriggerSlim `json:"trigger"` + + // Version Revision of the workflow, uniquely identifying its version + Version int64 `json:"version"` +} + +// WorkflowSlimRunsOnIncidentModes defines model for WorkflowSlim.RunsOnIncidentModes. +type WorkflowSlimRunsOnIncidentModes string + +// WorkflowSlimRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type WorkflowSlimRunsOnIncidents string + +// WorkflowSlimState The state of the workflow (e.g. is it draft, or disabled) +type WorkflowSlimState string + // ActionsV1ListParams defines parameters for ActionsV1List. type ActionsV1ListParams struct { // IncidentId Find actions related to this incident @@ -2527,6 +3474,9 @@ type IncidentsV2ListParams struct { // StatusCategory Filter on the category of the incidents status. The accepted operators are 'one_of', or 'not_in'. If this is not provided, this value defaults to `{"one_of": ["triage", "active", "post-incident", "closed"] }`, meaning that canceled, declined and merged incidents are not included. StatusCategory *map[string][]string `form:"status_category,omitempty" json:"status_category,omitempty"` + // CreatedAt Filter on incident created at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'. + CreatedAt *map[string][]string `form:"created_at,omitempty" json:"created_at,omitempty"` + // Severity Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'. Severity *map[string][]string `form:"severity,omitempty" json:"severity,omitempty"` @@ -2543,8 +3493,35 @@ type IncidentsV2ListParams struct { Mode *map[string][]string `form:"mode,omitempty" json:"mode,omitempty"` } +// SchedulesV2ListScheduleEntriesParams defines parameters for SchedulesV2ListScheduleEntries. +type SchedulesV2ListScheduleEntriesParams struct { + // ScheduleId The ID of the schedule to get entries for. + ScheduleId string `form:"schedule_id" json:"schedule_id"` + + // EntryWindowStart The start of the window to get entries for. + EntryWindowStart *time.Time `form:"entry_window_start,omitempty" json:"entry_window_start,omitempty"` + + // EntryWindowEnd The end of the window to get entries for. + EntryWindowEnd *time.Time `form:"entry_window_end,omitempty" json:"entry_window_end,omitempty"` +} + +// SchedulesV2ListParams defines parameters for SchedulesV2List. +type SchedulesV2ListParams struct { + // PageSize number of records to return + PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` + + // After A schedule's ID. This endpoint will return a list of schedules after this ID in relation to the API response order. + After *string `form:"after,omitempty" json:"after,omitempty"` +} + // UsersV2ListParams defines parameters for UsersV2List. type UsersV2ListParams struct { + // Email Filter by email address + Email *string `form:"email,omitempty" json:"email,omitempty"` + + // SlackUserId Filter by Slack user ID + SlackUserId *string `form:"slack_user_id,omitempty" json:"slack_user_id,omitempty"` + // PageSize Integer number of records to return PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` @@ -2589,10 +3566,10 @@ type IncidentStatusesV1UpdateJSONRequestBody = UpdateRequestBody6 type IncidentsV1CreateJSONRequestBody = CreateRequestBody9 // SeveritiesV1CreateJSONRequestBody defines body for SeveritiesV1Create for application/json ContentType. -type SeveritiesV1CreateJSONRequestBody = CreateRequestBody11 +type SeveritiesV1CreateJSONRequestBody = CreateRequestBody12 // SeveritiesV1UpdateJSONRequestBody defines body for SeveritiesV1Update for application/json ContentType. -type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody11 +type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody12 // AlertEventsV2CreateHTTPJSONRequestBody defines body for AlertEventsV2CreateHTTP for application/json ContentType. type AlertEventsV2CreateHTTPJSONRequestBody = CreateHTTPRequestBody @@ -2630,6 +3607,18 @@ type IncidentsV2CreateJSONRequestBody = CreateRequestBody10 // IncidentsV2EditJSONRequestBody defines body for IncidentsV2Edit for application/json ContentType. type IncidentsV2EditJSONRequestBody = EditRequestBody +// SchedulesV2CreateJSONRequestBody defines body for SchedulesV2Create for application/json ContentType. +type SchedulesV2CreateJSONRequestBody = CreateRequestBody11 + +// SchedulesV2UpdateJSONRequestBody defines body for SchedulesV2Update for application/json ContentType. +type SchedulesV2UpdateJSONRequestBody = UpdateRequestBody7 + +// WorkflowsV2CreateWorkflowJSONRequestBody defines body for WorkflowsV2CreateWorkflow for application/json ContentType. +type WorkflowsV2CreateWorkflowJSONRequestBody = CreateWorkflowRequestBody + +// WorkflowsV2UpdateWorkflowJSONRequestBody defines body for WorkflowsV2UpdateWorkflow for application/json ContentType. +type WorkflowsV2UpdateWorkflowJSONRequestBody = UpdateWorkflowRequestBody + // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -2977,11 +3966,52 @@ type ClientInterface interface { IncidentsV2Edit(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // SchedulesV2ListScheduleEntries request + SchedulesV2ListScheduleEntries(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SchedulesV2List request + SchedulesV2List(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SchedulesV2Create request with any body + SchedulesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SchedulesV2Create(ctx context.Context, body SchedulesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SchedulesV2Destroy request + SchedulesV2Destroy(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SchedulesV2Show request + SchedulesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SchedulesV2Update request with any body + SchedulesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SchedulesV2Update(ctx context.Context, id string, body SchedulesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // UsersV2List request UsersV2List(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UsersV2Show request UsersV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WorkflowsV2ListWorkflows request + WorkflowsV2ListWorkflows(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WorkflowsV2CreateWorkflow request with any body + WorkflowsV2CreateWorkflowWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WorkflowsV2CreateWorkflow(ctx context.Context, body WorkflowsV2CreateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WorkflowsV2DestroyWorkflow request + WorkflowsV2DestroyWorkflow(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WorkflowsV2ShowWorkflow request + WorkflowsV2ShowWorkflow(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WorkflowsV2UpdateWorkflow request with any body + WorkflowsV2UpdateWorkflowWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WorkflowsV2UpdateWorkflow(ctx context.Context, id string, body WorkflowsV2UpdateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) ActionsV1List(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -4184,8 +5214,8 @@ func (c *Client) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV return c.Client.Do(req) } -func (c *Client) UsersV2List(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUsersV2ListRequest(c.Server, params) +func (c *Client) SchedulesV2ListScheduleEntries(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2ListScheduleEntriesRequest(c.Server, params) if err != nil { return nil, err } @@ -4196,8 +5226,8 @@ func (c *Client) UsersV2List(ctx context.Context, params *UsersV2ListParams, req return c.Client.Do(req) } -func (c *Client) UsersV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUsersV2ShowRequest(c.Server, id) +func (c *Client) SchedulesV2List(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2ListRequest(c.Server, params) if err != nil { return nil, err } @@ -4208,28 +5238,208 @@ func (c *Client) UsersV2Show(ctx context.Context, id string, reqEditors ...Reque return c.Client.Do(req) } -// NewActionsV1ListRequest generates requests for ActionsV1List -func NewActionsV1ListRequest(server string, params *ActionsV1ListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) SchedulesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2CreateRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/v1/actions") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) SchedulesV2Create(ctx context.Context, body SchedulesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2CreateRequest(c.Server, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - queryValues := queryURL.Query() +func (c *Client) SchedulesV2Destroy(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2DestroyRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params.IncidentId != nil { +func (c *Client) SchedulesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2ShowRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SchedulesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2UpdateRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SchedulesV2Update(ctx context.Context, id string, body SchedulesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2UpdateRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UsersV2List(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUsersV2ListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UsersV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUsersV2ShowRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2ListWorkflows(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2ListWorkflowsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2CreateWorkflowWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2CreateWorkflowRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2CreateWorkflow(ctx context.Context, body WorkflowsV2CreateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2CreateWorkflowRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2DestroyWorkflow(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2DestroyWorkflowRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2ShowWorkflow(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2ShowWorkflowRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2UpdateWorkflowWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2UpdateWorkflowRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WorkflowsV2UpdateWorkflow(ctx context.Context, id string, body WorkflowsV2UpdateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkflowsV2UpdateWorkflowRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewActionsV1ListRequest generates requests for ActionsV1List +func NewActionsV1ListRequest(server string, params *ActionsV1ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/actions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.IncidentId != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); err != nil { return nil, err @@ -7143,6 +8353,22 @@ func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*h } + if params.CreatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "created_at", runtime.ParamLocationQuery, *params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.Severity != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); err != nil { @@ -7354,8 +8580,8 @@ func NewIncidentsV2EditRequestWithBody(server string, id string, contentType str return req, nil } -// NewUsersV2ListRequest generates requests for UsersV2List -func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Request, error) { +// NewSchedulesV2ListScheduleEntriesRequest generates requests for SchedulesV2ListScheduleEntries +func NewSchedulesV2ListScheduleEntriesRequest(server string, params *SchedulesV2ListScheduleEntriesParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -7363,7 +8589,7 @@ func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/v2/users") + operationPath := fmt.Sprintf("/v2/schedule_entries") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7375,9 +8601,21 @@ func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Requ queryValues := queryURL.Query() - if params.PageSize != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "schedule_id", runtime.ParamLocationQuery, params.ScheduleId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + if params.EntryWindowStart != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entry_window_start", runtime.ParamLocationQuery, *params.EntryWindowStart); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7391,9 +8629,9 @@ func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Requ } - if params.After != nil { + if params.EntryWindowEnd != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entry_window_end", runtime.ParamLocationQuery, *params.EntryWindowEnd); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7417,23 +8655,16 @@ func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Requ return req, nil } -// NewUsersV2ShowRequest generates requests for UsersV2Show -func NewUsersV2ShowRequest(server string, id string) (*http.Request, error) { +// NewSchedulesV2ListRequest generates requests for SchedulesV2List +func NewSchedulesV2ListRequest(server string, params *SchedulesV2ListParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v2/users/%s", pathParam0) + operationPath := fmt.Sprintf("/v2/schedules") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7443,6 +8674,42 @@ func NewUsersV2ShowRequest(server string, id string) (*http.Request, error) { return nil, err } + queryValues := queryURL.Query() + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.After != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -7451,39 +8718,505 @@ func NewUsersV2ShowRequest(server string, id string) (*http.Request, error) { return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewSchedulesV2CreateRequest calls the generic SchedulesV2Create builder with application/json body +func NewSchedulesV2CreateRequest(server string, body SchedulesV2CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return nil + bodyReader = bytes.NewReader(buf) + return NewSchedulesV2CreateRequestWithBody(server, "application/json", bodyReader) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// NewSchedulesV2CreateRequestWithBody generates requests for SchedulesV2Create with any type of body +func NewSchedulesV2CreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) + operationPath := fmt.Sprintf("/v2/schedules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSchedulesV2DestroyRequest generates requests for SchedulesV2Destroy +func NewSchedulesV2DestroyRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/schedules/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSchedulesV2ShowRequest generates requests for SchedulesV2Show +func NewSchedulesV2ShowRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/schedules/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSchedulesV2UpdateRequest calls the generic SchedulesV2Update builder with application/json body +func NewSchedulesV2UpdateRequest(server string, id string, body SchedulesV2UpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSchedulesV2UpdateRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewSchedulesV2UpdateRequestWithBody generates requests for SchedulesV2Update with any type of body +func NewSchedulesV2UpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/schedules/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUsersV2ListRequest generates requests for UsersV2List +func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Email != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, *params.Email); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SlackUserId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slack_user_id", runtime.ParamLocationQuery, *params.SlackUserId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.After != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUsersV2ShowRequest generates requests for UsersV2Show +func NewUsersV2ShowRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWorkflowsV2ListWorkflowsRequest generates requests for WorkflowsV2ListWorkflows +func NewWorkflowsV2ListWorkflowsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workflows") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWorkflowsV2CreateWorkflowRequest calls the generic WorkflowsV2CreateWorkflow builder with application/json body +func NewWorkflowsV2CreateWorkflowRequest(server string, body WorkflowsV2CreateWorkflowJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkflowsV2CreateWorkflowRequestWithBody(server, "application/json", bodyReader) +} + +// NewWorkflowsV2CreateWorkflowRequestWithBody generates requests for WorkflowsV2CreateWorkflow with any type of body +func NewWorkflowsV2CreateWorkflowRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workflows") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWorkflowsV2DestroyWorkflowRequest generates requests for WorkflowsV2DestroyWorkflow +func NewWorkflowsV2DestroyWorkflowRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workflows/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWorkflowsV2ShowWorkflowRequest generates requests for WorkflowsV2ShowWorkflow +func NewWorkflowsV2ShowWorkflowRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workflows/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWorkflowsV2UpdateWorkflowRequest calls the generic WorkflowsV2UpdateWorkflow builder with application/json body +func NewWorkflowsV2UpdateWorkflowRequest(server string, id string, body WorkflowsV2UpdateWorkflowJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkflowsV2UpdateWorkflowRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewWorkflowsV2UpdateWorkflowRequestWithBody generates requests for WorkflowsV2UpdateWorkflow with any type of body +func NewWorkflowsV2UpdateWorkflowRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workflows/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) if err != nil { return err } @@ -7763,16 +9496,57 @@ type ClientWithResponsesInterface interface { // IncidentsV2Show request IncidentsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV2ShowResponse, error) - // IncidentsV2Edit request with any body - IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + // IncidentsV2Edit request with any body + IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + + IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + + // SchedulesV2ListScheduleEntries request + SchedulesV2ListScheduleEntriesWithResponse(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListScheduleEntriesResponse, error) + + // SchedulesV2List request + SchedulesV2ListWithResponse(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListResponse, error) + + // SchedulesV2Create request with any body + SchedulesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2CreateResponse, error) + + SchedulesV2CreateWithResponse(ctx context.Context, body SchedulesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2CreateResponse, error) + + // SchedulesV2Destroy request + SchedulesV2DestroyWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SchedulesV2DestroyResponse, error) + + // SchedulesV2Show request + SchedulesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SchedulesV2ShowResponse, error) + + // SchedulesV2Update request with any body + SchedulesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2UpdateResponse, error) - IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + SchedulesV2UpdateWithResponse(ctx context.Context, id string, body SchedulesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2UpdateResponse, error) // UsersV2List request UsersV2ListWithResponse(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*UsersV2ListResponse, error) // UsersV2Show request UsersV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UsersV2ShowResponse, error) + + // WorkflowsV2ListWorkflows request + WorkflowsV2ListWorkflowsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkflowsV2ListWorkflowsResponse, error) + + // WorkflowsV2CreateWorkflow request with any body + WorkflowsV2CreateWorkflowWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkflowsV2CreateWorkflowResponse, error) + + WorkflowsV2CreateWorkflowWithResponse(ctx context.Context, body WorkflowsV2CreateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkflowsV2CreateWorkflowResponse, error) + + // WorkflowsV2DestroyWorkflow request + WorkflowsV2DestroyWorkflowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*WorkflowsV2DestroyWorkflowResponse, error) + + // WorkflowsV2ShowWorkflow request + WorkflowsV2ShowWorkflowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*WorkflowsV2ShowWorkflowResponse, error) + + // WorkflowsV2UpdateWorkflow request with any body + WorkflowsV2UpdateWorkflowWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkflowsV2UpdateWorkflowResponse, error) + + WorkflowsV2UpdateWorkflowWithResponse(ctx context.Context, id string, body WorkflowsV2UpdateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkflowsV2UpdateWorkflowResponse, error) } type ActionsV1ListResponse struct { @@ -8542,7 +10316,7 @@ func (r UtilitiesV1OpenAPIV3Response) StatusCode() int { type SeveritiesV1ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody16 + JSON200 *ListResponseBody17 } // Status returns HTTPResponse.Status @@ -8564,7 +10338,7 @@ func (r SeveritiesV1ListResponse) StatusCode() int { type SeveritiesV1CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody14 + JSON201 *ShowResponseBody15 } // Status returns HTTPResponse.Status @@ -8607,7 +10381,7 @@ func (r SeveritiesV1DeleteResponse) StatusCode() int { type SeveritiesV1ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody14 + JSON200 *ShowResponseBody15 } // Status returns HTTPResponse.Status @@ -8629,7 +10403,7 @@ func (r SeveritiesV1ShowResponse) StatusCode() int { type SeveritiesV1UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody14 + JSON200 *ShowResponseBody15 } // Status returns HTTPResponse.Status @@ -8695,7 +10469,7 @@ func (r ActionsV2ShowResponse) StatusCode() int { type AlertEventsV2CreateHTTPResponse struct { Body []byte HTTPResponse *http.Response - JSON202 *CreateHTTPResponseBody + JSON202 *AlertResult } // Status returns HTTPResponse.Status @@ -8852,7 +10626,247 @@ type CatalogV2ListTypesResponse struct { } // Status returns HTTPResponse.Status -func (r CatalogV2ListTypesResponse) Status() string { +func (r CatalogV2ListTypesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2ListTypesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogV2CreateTypeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateTypeResponseBody +} + +// Status returns HTTPResponse.Status +func (r CatalogV2CreateTypeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2CreateTypeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogV2DestroyTypeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r CatalogV2DestroyTypeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2DestroyTypeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogV2ShowTypeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CreateTypeResponseBody +} + +// Status returns HTTPResponse.Status +func (r CatalogV2ShowTypeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2ShowTypeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogV2UpdateTypeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CreateTypeResponseBody +} + +// Status returns HTTPResponse.Status +func (r CatalogV2UpdateTypeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2UpdateTypeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CatalogV2UpdateTypeSchemaResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CreateTypeResponseBody +} + +// Status returns HTTPResponse.Status +func (r CatalogV2UpdateTypeSchemaResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CatalogV2UpdateTypeSchemaResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV2ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody5 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV2ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV2ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV2CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ShowResponseBody5 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV2CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV2CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV2DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV2DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV2DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV2ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody5 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV2ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV2ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV2UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody5 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV2UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV2UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type FollowUpsV2ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody6 +} + +// Status returns HTTPResponse.Status +func (r FollowUpsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8860,21 +10874,21 @@ func (r CatalogV2ListTypesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ListTypesResponse) StatusCode() int { +func (r FollowUpsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2CreateTypeResponse struct { +type FollowUpsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateTypeResponseBody + JSON200 *ShowResponseBody6 } // Status returns HTTPResponse.Status -func (r CatalogV2CreateTypeResponse) Status() string { +func (r FollowUpsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8882,20 +10896,21 @@ func (r CatalogV2CreateTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2CreateTypeResponse) StatusCode() int { +func (r FollowUpsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2DestroyTypeResponse struct { +type IncidentRolesV2ListResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListResponseBody9 } // Status returns HTTPResponse.Status -func (r CatalogV2DestroyTypeResponse) Status() string { +func (r IncidentRolesV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8903,21 +10918,21 @@ func (r CatalogV2DestroyTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2DestroyTypeResponse) StatusCode() int { +func (r IncidentRolesV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2ShowTypeResponse struct { +type IncidentRolesV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody + JSON201 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r CatalogV2ShowTypeResponse) Status() string { +func (r IncidentRolesV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8925,21 +10940,20 @@ func (r CatalogV2ShowTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ShowTypeResponse) StatusCode() int { +func (r IncidentRolesV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2UpdateTypeResponse struct { +type IncidentRolesV2DeleteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody } // Status returns HTTPResponse.Status -func (r CatalogV2UpdateTypeResponse) Status() string { +func (r IncidentRolesV2DeleteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8947,21 +10961,21 @@ func (r CatalogV2UpdateTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2UpdateTypeResponse) StatusCode() int { +func (r IncidentRolesV2DeleteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2UpdateTypeSchemaResponse struct { +type IncidentRolesV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody + JSON200 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r CatalogV2UpdateTypeSchemaResponse) Status() string { +func (r IncidentRolesV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8969,21 +10983,21 @@ func (r CatalogV2UpdateTypeSchemaResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2UpdateTypeSchemaResponse) StatusCode() int { +func (r IncidentRolesV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV2ListResponse struct { +type IncidentRolesV2UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody5 + JSON200 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r CustomFieldsV2ListResponse) Status() string { +func (r IncidentRolesV2UpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8991,21 +11005,21 @@ func (r CustomFieldsV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV2ListResponse) StatusCode() int { +func (r IncidentRolesV2UpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV2CreateResponse struct { +type IncidentTimestampsV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody5 + JSON200 *ListResponseBody11 } // Status returns HTTPResponse.Status -func (r CustomFieldsV2CreateResponse) Status() string { +func (r IncidentTimestampsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9013,20 +11027,21 @@ func (r CustomFieldsV2CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV2CreateResponse) StatusCode() int { +func (r IncidentTimestampsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV2DeleteResponse struct { +type IncidentTimestampsV2ShowResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ShowResponseBody10 } // Status returns HTTPResponse.Status -func (r CustomFieldsV2DeleteResponse) Status() string { +func (r IncidentTimestampsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9034,21 +11049,21 @@ func (r CustomFieldsV2DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV2DeleteResponse) StatusCode() int { +func (r IncidentTimestampsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV2ShowResponse struct { +type IncidentUpdatesV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody5 + JSON200 *ListResponseBody13 } // Status returns HTTPResponse.Status -func (r CustomFieldsV2ShowResponse) Status() string { +func (r IncidentUpdatesV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9056,21 +11071,21 @@ func (r CustomFieldsV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV2ShowResponse) StatusCode() int { +func (r IncidentUpdatesV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV2UpdateResponse struct { +type IncidentsV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody5 + JSON200 *ListResponseBody15 } // Status returns HTTPResponse.Status -func (r CustomFieldsV2UpdateResponse) Status() string { +func (r IncidentsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9078,21 +11093,21 @@ func (r CustomFieldsV2UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV2UpdateResponse) StatusCode() int { +func (r IncidentsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type FollowUpsV2ListResponse struct { +type IncidentsV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody6 + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r FollowUpsV2ListResponse) Status() string { +func (r IncidentsV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9100,21 +11115,21 @@ func (r FollowUpsV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r FollowUpsV2ListResponse) StatusCode() int { +func (r IncidentsV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type FollowUpsV2ShowResponse struct { +type IncidentsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody6 + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r FollowUpsV2ShowResponse) Status() string { +func (r IncidentsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9122,21 +11137,21 @@ func (r FollowUpsV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r FollowUpsV2ShowResponse) StatusCode() int { +func (r IncidentsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV2ListResponse struct { +type IncidentsV2EditResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody9 + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r IncidentRolesV2ListResponse) Status() string { +func (r IncidentsV2EditResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9144,21 +11159,21 @@ func (r IncidentRolesV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV2ListResponse) StatusCode() int { +func (r IncidentsV2EditResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV2CreateResponse struct { +type SchedulesV2ListScheduleEntriesResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody8 + JSON200 *ListScheduleEntriesResponseBody } // Status returns HTTPResponse.Status -func (r IncidentRolesV2CreateResponse) Status() string { +func (r SchedulesV2ListScheduleEntriesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9166,20 +11181,21 @@ func (r IncidentRolesV2CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV2CreateResponse) StatusCode() int { +func (r SchedulesV2ListScheduleEntriesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV2DeleteResponse struct { +type SchedulesV2ListResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListResponseBody16 } // Status returns HTTPResponse.Status -func (r IncidentRolesV2DeleteResponse) Status() string { +func (r SchedulesV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9187,21 +11203,21 @@ func (r IncidentRolesV2DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV2DeleteResponse) StatusCode() int { +func (r SchedulesV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV2ShowResponse struct { +type SchedulesV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody8 + JSON201 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r IncidentRolesV2ShowResponse) Status() string { +func (r SchedulesV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9209,21 +11225,20 @@ func (r IncidentRolesV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV2ShowResponse) StatusCode() int { +func (r SchedulesV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV2UpdateResponse struct { +type SchedulesV2DestroyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r IncidentRolesV2UpdateResponse) Status() string { +func (r SchedulesV2DestroyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9231,21 +11246,21 @@ func (r IncidentRolesV2UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV2UpdateResponse) StatusCode() int { +func (r SchedulesV2DestroyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentTimestampsV2ListResponse struct { +type SchedulesV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody11 + JSON200 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r IncidentTimestampsV2ListResponse) Status() string { +func (r SchedulesV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9253,21 +11268,21 @@ func (r IncidentTimestampsV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentTimestampsV2ListResponse) StatusCode() int { +func (r SchedulesV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentTimestampsV2ShowResponse struct { +type SchedulesV2UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody10 + JSON200 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r IncidentTimestampsV2ShowResponse) Status() string { +func (r SchedulesV2UpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9275,21 +11290,21 @@ func (r IncidentTimestampsV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentTimestampsV2ShowResponse) StatusCode() int { +func (r SchedulesV2UpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentUpdatesV2ListResponse struct { +type UsersV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody13 + JSON200 *ListResponseBody18 } // Status returns HTTPResponse.Status -func (r IncidentUpdatesV2ListResponse) Status() string { +func (r UsersV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9297,21 +11312,21 @@ func (r IncidentUpdatesV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentUpdatesV2ListResponse) StatusCode() int { +func (r UsersV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV2ListResponse struct { +type UsersV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody15 + JSON200 *ShowResponseBody16 } // Status returns HTTPResponse.Status -func (r IncidentsV2ListResponse) Status() string { +func (r UsersV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9319,21 +11334,21 @@ func (r IncidentsV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2ListResponse) StatusCode() int { +func (r UsersV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV2CreateResponse struct { +type WorkflowsV2ListWorkflowsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody13 + JSON200 *ListWorkflowsResponseBody } // Status returns HTTPResponse.Status -func (r IncidentsV2CreateResponse) Status() string { +func (r WorkflowsV2ListWorkflowsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9341,21 +11356,21 @@ func (r IncidentsV2CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2CreateResponse) StatusCode() int { +func (r WorkflowsV2ListWorkflowsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV2ShowResponse struct { +type WorkflowsV2CreateWorkflowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody13 + JSON201 *ShowWorkflowResponseBody } // Status returns HTTPResponse.Status -func (r IncidentsV2ShowResponse) Status() string { +func (r WorkflowsV2CreateWorkflowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9363,21 +11378,20 @@ func (r IncidentsV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2ShowResponse) StatusCode() int { +func (r WorkflowsV2CreateWorkflowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV2EditResponse struct { +type WorkflowsV2DestroyWorkflowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r IncidentsV2EditResponse) Status() string { +func (r WorkflowsV2DestroyWorkflowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9385,21 +11399,21 @@ func (r IncidentsV2EditResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2EditResponse) StatusCode() int { +func (r WorkflowsV2DestroyWorkflowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UsersV2ListResponse struct { +type WorkflowsV2ShowWorkflowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody17 + JSON200 *ShowWorkflowResponseBody } // Status returns HTTPResponse.Status -func (r UsersV2ListResponse) Status() string { +func (r WorkflowsV2ShowWorkflowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9407,21 +11421,21 @@ func (r UsersV2ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UsersV2ListResponse) StatusCode() int { +func (r WorkflowsV2ShowWorkflowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UsersV2ShowResponse struct { +type WorkflowsV2UpdateWorkflowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody15 + JSON200 *ShowWorkflowResponseBody } // Status returns HTTPResponse.Status -func (r UsersV2ShowResponse) Status() string { +func (r WorkflowsV2UpdateWorkflowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9429,7 +11443,7 @@ func (r UsersV2ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UsersV2ShowResponse) StatusCode() int { +func (r WorkflowsV2UpdateWorkflowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10290,42 +12304,173 @@ func (c *ClientWithResponses) IncidentsV2ShowWithResponse(ctx context.Context, i if err != nil { return nil, err } - return ParseIncidentsV2ShowResponse(rsp) + return ParseIncidentsV2ShowResponse(rsp) +} + +// IncidentsV2EditWithBodyWithResponse request with arbitrary body returning *IncidentsV2EditResponse +func (c *ClientWithResponses) IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { + rsp, err := c.IncidentsV2EditWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentsV2EditResponse(rsp) +} + +func (c *ClientWithResponses) IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { + rsp, err := c.IncidentsV2Edit(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentsV2EditResponse(rsp) +} + +// SchedulesV2ListScheduleEntriesWithResponse request returning *SchedulesV2ListScheduleEntriesResponse +func (c *ClientWithResponses) SchedulesV2ListScheduleEntriesWithResponse(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListScheduleEntriesResponse, error) { + rsp, err := c.SchedulesV2ListScheduleEntries(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2ListScheduleEntriesResponse(rsp) +} + +// SchedulesV2ListWithResponse request returning *SchedulesV2ListResponse +func (c *ClientWithResponses) SchedulesV2ListWithResponse(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListResponse, error) { + rsp, err := c.SchedulesV2List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2ListResponse(rsp) +} + +// SchedulesV2CreateWithBodyWithResponse request with arbitrary body returning *SchedulesV2CreateResponse +func (c *ClientWithResponses) SchedulesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2CreateResponse, error) { + rsp, err := c.SchedulesV2CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2CreateResponse(rsp) +} + +func (c *ClientWithResponses) SchedulesV2CreateWithResponse(ctx context.Context, body SchedulesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2CreateResponse, error) { + rsp, err := c.SchedulesV2Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2CreateResponse(rsp) +} + +// SchedulesV2DestroyWithResponse request returning *SchedulesV2DestroyResponse +func (c *ClientWithResponses) SchedulesV2DestroyWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SchedulesV2DestroyResponse, error) { + rsp, err := c.SchedulesV2Destroy(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2DestroyResponse(rsp) +} + +// SchedulesV2ShowWithResponse request returning *SchedulesV2ShowResponse +func (c *ClientWithResponses) SchedulesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SchedulesV2ShowResponse, error) { + rsp, err := c.SchedulesV2Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2ShowResponse(rsp) +} + +// SchedulesV2UpdateWithBodyWithResponse request with arbitrary body returning *SchedulesV2UpdateResponse +func (c *ClientWithResponses) SchedulesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2UpdateResponse, error) { + rsp, err := c.SchedulesV2UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2UpdateResponse(rsp) +} + +func (c *ClientWithResponses) SchedulesV2UpdateWithResponse(ctx context.Context, id string, body SchedulesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2UpdateResponse, error) { + rsp, err := c.SchedulesV2Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSchedulesV2UpdateResponse(rsp) +} + +// UsersV2ListWithResponse request returning *UsersV2ListResponse +func (c *ClientWithResponses) UsersV2ListWithResponse(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*UsersV2ListResponse, error) { + rsp, err := c.UsersV2List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUsersV2ListResponse(rsp) +} + +// UsersV2ShowWithResponse request returning *UsersV2ShowResponse +func (c *ClientWithResponses) UsersV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UsersV2ShowResponse, error) { + rsp, err := c.UsersV2Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseUsersV2ShowResponse(rsp) +} + +// WorkflowsV2ListWorkflowsWithResponse request returning *WorkflowsV2ListWorkflowsResponse +func (c *ClientWithResponses) WorkflowsV2ListWorkflowsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WorkflowsV2ListWorkflowsResponse, error) { + rsp, err := c.WorkflowsV2ListWorkflows(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseWorkflowsV2ListWorkflowsResponse(rsp) +} + +// WorkflowsV2CreateWorkflowWithBodyWithResponse request with arbitrary body returning *WorkflowsV2CreateWorkflowResponse +func (c *ClientWithResponses) WorkflowsV2CreateWorkflowWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkflowsV2CreateWorkflowResponse, error) { + rsp, err := c.WorkflowsV2CreateWorkflowWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWorkflowsV2CreateWorkflowResponse(rsp) +} + +func (c *ClientWithResponses) WorkflowsV2CreateWorkflowWithResponse(ctx context.Context, body WorkflowsV2CreateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkflowsV2CreateWorkflowResponse, error) { + rsp, err := c.WorkflowsV2CreateWorkflow(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWorkflowsV2CreateWorkflowResponse(rsp) } -// IncidentsV2EditWithBodyWithResponse request with arbitrary body returning *IncidentsV2EditResponse -func (c *ClientWithResponses) IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { - rsp, err := c.IncidentsV2EditWithBody(ctx, id, contentType, body, reqEditors...) +// WorkflowsV2DestroyWorkflowWithResponse request returning *WorkflowsV2DestroyWorkflowResponse +func (c *ClientWithResponses) WorkflowsV2DestroyWorkflowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*WorkflowsV2DestroyWorkflowResponse, error) { + rsp, err := c.WorkflowsV2DestroyWorkflow(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV2EditResponse(rsp) + return ParseWorkflowsV2DestroyWorkflowResponse(rsp) } -func (c *ClientWithResponses) IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { - rsp, err := c.IncidentsV2Edit(ctx, id, body, reqEditors...) +// WorkflowsV2ShowWorkflowWithResponse request returning *WorkflowsV2ShowWorkflowResponse +func (c *ClientWithResponses) WorkflowsV2ShowWorkflowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*WorkflowsV2ShowWorkflowResponse, error) { + rsp, err := c.WorkflowsV2ShowWorkflow(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV2EditResponse(rsp) + return ParseWorkflowsV2ShowWorkflowResponse(rsp) } -// UsersV2ListWithResponse request returning *UsersV2ListResponse -func (c *ClientWithResponses) UsersV2ListWithResponse(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*UsersV2ListResponse, error) { - rsp, err := c.UsersV2List(ctx, params, reqEditors...) +// WorkflowsV2UpdateWorkflowWithBodyWithResponse request with arbitrary body returning *WorkflowsV2UpdateWorkflowResponse +func (c *ClientWithResponses) WorkflowsV2UpdateWorkflowWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorkflowsV2UpdateWorkflowResponse, error) { + rsp, err := c.WorkflowsV2UpdateWorkflowWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUsersV2ListResponse(rsp) + return ParseWorkflowsV2UpdateWorkflowResponse(rsp) } -// UsersV2ShowWithResponse request returning *UsersV2ShowResponse -func (c *ClientWithResponses) UsersV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UsersV2ShowResponse, error) { - rsp, err := c.UsersV2Show(ctx, id, reqEditors...) +func (c *ClientWithResponses) WorkflowsV2UpdateWorkflowWithResponse(ctx context.Context, id string, body WorkflowsV2UpdateWorkflowJSONRequestBody, reqEditors ...RequestEditorFn) (*WorkflowsV2UpdateWorkflowResponse, error) { + rsp, err := c.WorkflowsV2UpdateWorkflow(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseUsersV2ShowResponse(rsp) + return ParseWorkflowsV2UpdateWorkflowResponse(rsp) } // ParseActionsV1ListResponse parses an HTTP response from a ActionsV1ListWithResponse call @@ -11193,7 +13338,7 @@ func ParseSeveritiesV1ListResponse(rsp *http.Response) (*SeveritiesV1ListRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody16 + var dest ListResponseBody17 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11219,7 +13364,7 @@ func ParseSeveritiesV1CreateResponse(rsp *http.Response) (*SeveritiesV1CreateRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody14 + var dest ShowResponseBody15 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11261,7 +13406,7 @@ func ParseSeveritiesV1ShowResponse(rsp *http.Response) (*SeveritiesV1ShowRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody14 + var dest ShowResponseBody15 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11287,7 +13432,7 @@ func ParseSeveritiesV1UpdateResponse(rsp *http.Response) (*SeveritiesV1UpdateRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody14 + var dest ShowResponseBody15 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11365,7 +13510,7 @@ func ParseAlertEventsV2CreateHTTPResponse(rsp *http.Response) (*AlertEventsV2Cre switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest CreateHTTPResponseBody + var dest AlertResult if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12142,6 +14287,152 @@ func ParseIncidentsV2EditResponse(rsp *http.Response) (*IncidentsV2EditResponse, return response, nil } +// ParseSchedulesV2ListScheduleEntriesResponse parses an HTTP response from a SchedulesV2ListScheduleEntriesWithResponse call +func ParseSchedulesV2ListScheduleEntriesResponse(rsp *http.Response) (*SchedulesV2ListScheduleEntriesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2ListScheduleEntriesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListScheduleEntriesResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSchedulesV2ListResponse parses an HTTP response from a SchedulesV2ListWithResponse call +func ParseSchedulesV2ListResponse(rsp *http.Response) (*SchedulesV2ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody16 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSchedulesV2CreateResponse parses an HTTP response from a SchedulesV2CreateWithResponse call +func ParseSchedulesV2CreateResponse(rsp *http.Response) (*SchedulesV2CreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2CreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowResponseBody14 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseSchedulesV2DestroyResponse parses an HTTP response from a SchedulesV2DestroyWithResponse call +func ParseSchedulesV2DestroyResponse(rsp *http.Response) (*SchedulesV2DestroyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2DestroyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseSchedulesV2ShowResponse parses an HTTP response from a SchedulesV2ShowWithResponse call +func ParseSchedulesV2ShowResponse(rsp *http.Response) (*SchedulesV2ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody14 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSchedulesV2UpdateResponse parses an HTTP response from a SchedulesV2UpdateWithResponse call +func ParseSchedulesV2UpdateResponse(rsp *http.Response) (*SchedulesV2UpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SchedulesV2UpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody14 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseUsersV2ListResponse parses an HTTP response from a UsersV2ListWithResponse call func ParseUsersV2ListResponse(rsp *http.Response) (*UsersV2ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -12157,7 +14448,7 @@ func ParseUsersV2ListResponse(rsp *http.Response) (*UsersV2ListResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody17 + var dest ListResponseBody18 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12183,7 +14474,127 @@ func ParseUsersV2ShowResponse(rsp *http.Response) (*UsersV2ShowResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody15 + var dest ShowResponseBody16 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseWorkflowsV2ListWorkflowsResponse parses an HTTP response from a WorkflowsV2ListWorkflowsWithResponse call +func ParseWorkflowsV2ListWorkflowsResponse(rsp *http.Response) (*WorkflowsV2ListWorkflowsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkflowsV2ListWorkflowsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListWorkflowsResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseWorkflowsV2CreateWorkflowResponse parses an HTTP response from a WorkflowsV2CreateWorkflowWithResponse call +func ParseWorkflowsV2CreateWorkflowResponse(rsp *http.Response) (*WorkflowsV2CreateWorkflowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkflowsV2CreateWorkflowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowWorkflowResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseWorkflowsV2DestroyWorkflowResponse parses an HTTP response from a WorkflowsV2DestroyWorkflowWithResponse call +func ParseWorkflowsV2DestroyWorkflowResponse(rsp *http.Response) (*WorkflowsV2DestroyWorkflowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkflowsV2DestroyWorkflowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseWorkflowsV2ShowWorkflowResponse parses an HTTP response from a WorkflowsV2ShowWorkflowWithResponse call +func ParseWorkflowsV2ShowWorkflowResponse(rsp *http.Response) (*WorkflowsV2ShowWorkflowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkflowsV2ShowWorkflowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowWorkflowResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseWorkflowsV2UpdateWorkflowResponse parses an HTTP response from a WorkflowsV2UpdateWorkflowWithResponse call +func ParseWorkflowsV2UpdateWorkflowResponse(rsp *http.Response) (*WorkflowsV2UpdateWorkflowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkflowsV2UpdateWorkflowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowWorkflowResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/client/openapi3.json b/client/openapi3.json index 035339a..f57ad76 100644 --- a/client/openapi3.json +++ b/client/openapi3.json @@ -53,11 +53,7 @@ "name": "incident_mode", "schema": { "description": "Filter to actions from incidents of the given mode. If not set, only actions from `real` incidents are returned", - "enum": [ - "real", - "test", - "tutorial" - ], + "enum": ["real", "test", "tutorial"], "example": "real", "type": "string" } @@ -102,9 +98,7 @@ } }, "summary": "List Actions V1", - "tags": [ - "Actions V1" - ], + "tags": ["Actions V1"], "deprecated": true } }, @@ -163,17 +157,13 @@ } }, "summary": "Show Actions V1", - "tags": [ - "Actions V1" - ], + "tags": ["Actions V1"], "deprecated": true } }, "/v1/custom_field_options": { "get": { - "tags": [ - "Custom Field Options V1" - ], + "tags": ["Custom Field Options V1"], "summary": "List Custom Field Options V1", "description": "Show custom field options for a custom field", "operationId": "Custom Field Options V1#List", @@ -246,9 +236,7 @@ } }, "post": { - "tags": [ - "Custom Field Options V1" - ], + "tags": ["Custom Field Options V1"], "summary": "Create Custom Field Options V1", "description": "Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.", "operationId": "Custom Field Options V1#Create", @@ -291,9 +279,7 @@ }, "/v1/custom_field_options/{id}": { "delete": { - "tags": [ - "Custom Field Options V1" - ], + "tags": ["Custom Field Options V1"], "summary": "Delete Custom Field Options V1", "description": "Delete a custom field option", "operationId": "Custom Field Options V1#Delete", @@ -318,9 +304,7 @@ } }, "get": { - "tags": [ - "Custom Field Options V1" - ], + "tags": ["Custom Field Options V1"], "summary": "Show Custom Field Options V1", "description": "Get a single custom field option", "operationId": "Custom Field Options V1#Show", @@ -360,9 +344,7 @@ } }, "put": { - "tags": [ - "Custom Field Options V1" - ], + "tags": ["Custom Field Options V1"], "summary": "Update Custom Field Options V1", "description": "Update a custom field option", "operationId": "Custom Field Options V1#Update", @@ -460,9 +442,7 @@ } }, "summary": "List Custom Fields V1", - "tags": [ - "Custom Fields V1" - ], + "tags": ["Custom Fields V1"], "deprecated": true }, "post": { @@ -527,9 +507,7 @@ } }, "summary": "Create Custom Fields V1", - "tags": [ - "Custom Fields V1" - ], + "tags": ["Custom Fields V1"], "deprecated": true } }, @@ -557,9 +535,7 @@ } }, "summary": "Delete Custom Fields V1", - "tags": [ - "Custom Fields V1" - ], + "tags": ["Custom Fields V1"], "deprecated": true }, "get": { @@ -617,9 +593,7 @@ } }, "summary": "Show Custom Fields V1", - "tags": [ - "Custom Fields V1" - ], + "tags": ["Custom Fields V1"], "deprecated": true }, "put": { @@ -697,17 +671,13 @@ } }, "summary": "Update Custom Fields V1", - "tags": [ - "Custom Fields V1" - ], + "tags": ["Custom Fields V1"], "deprecated": true } }, "/v1/identity": { "get": { - "tags": [ - "Utilities V1" - ], + "tags": ["Utilities V1"], "summary": "Identity Utilities V1", "description": "Test if your API key is valid, and which roles it has.", "operationId": "Utilities V1#Identity", @@ -723,9 +693,7 @@ "identity": { "dashboard_url": "https://app.incident.io/my-org", "name": "Alertmanager token", - "roles": [ - "incident_creator" - ] + "roles": ["incident_creator"] } } } @@ -736,9 +704,7 @@ }, "/v1/incident_attachments": { "get": { - "tags": [ - "Incident Attachments V1" - ], + "tags": ["Incident Attachments V1"], "summary": "List Incident Attachments V1", "description": "List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.", "operationId": "Incident Attachments V1#List", @@ -783,6 +749,7 @@ "github_pull_request", "gitlab_merge_request", "sentry_issue", + "jira_issue", "atlassian_statuspage_incident", "zendesk_ticket", "google_calendar_event", @@ -826,9 +793,7 @@ } }, "post": { - "tags": [ - "Incident Attachments V1" - ], + "tags": ["Incident Attachments V1"], "summary": "Create Incident Attachments V1", "description": "Attaches an external resource to an incident", "operationId": "Incident Attachments V1#Create", @@ -877,9 +842,7 @@ }, "/v1/incident_attachments/{id}": { "delete": { - "tags": [ - "Incident Attachments V1" - ], + "tags": ["Incident Attachments V1"], "summary": "Delete Incident Attachments V1", "description": "Unattaches an external resouce from an incident", "operationId": "Incident Attachments V1#Delete", @@ -906,9 +869,7 @@ }, "/v1/incident_memberships": { "post": { - "tags": [ - "Incident Memberships V1" - ], + "tags": ["Incident Memberships V1"], "summary": "Create Incident Memberships V1", "description": "Makes a user a member of a private incident", "operationId": "Incident Memberships V1#Create", @@ -957,9 +918,7 @@ }, "/v1/incident_memberships/actions/revoke": { "post": { - "tags": [ - "Incident Memberships V1" - ], + "tags": ["Incident Memberships V1"], "summary": "Revoke Incident Memberships V1", "description": "Revoke a user's membership of a private incident", "operationId": "Incident Memberships V1#Revoke", @@ -1016,9 +975,7 @@ } }, "summary": "List Incident Roles V1", - "tags": [ - "Incident Roles V1" - ], + "tags": ["Incident Roles V1"], "deprecated": true }, "post": { @@ -1067,9 +1024,7 @@ } }, "summary": "Create Incident Roles V1", - "tags": [ - "Incident Roles V1" - ], + "tags": ["Incident Roles V1"], "deprecated": true } }, @@ -1097,9 +1052,7 @@ } }, "summary": "Delete Incident Roles V1", - "tags": [ - "Incident Roles V1" - ], + "tags": ["Incident Roles V1"], "deprecated": true }, "get": { @@ -1145,9 +1098,7 @@ } }, "summary": "Show Incident Roles V1", - "tags": [ - "Incident Roles V1" - ], + "tags": ["Incident Roles V1"], "deprecated": true }, "put": { @@ -1210,17 +1161,13 @@ } }, "summary": "Update Incident Roles V1", - "tags": [ - "Incident Roles V1" - ], + "tags": ["Incident Roles V1"], "deprecated": true } }, "/v1/incident_statuses": { "get": { - "tags": [ - "Incident Statuses V1" - ], + "tags": ["Incident Statuses V1"], "summary": "List Incident Statuses V1", "description": "List all incident statuses for an organisation.", "operationId": "Incident Statuses V1#List", @@ -1251,9 +1198,7 @@ } }, "post": { - "tags": [ - "Incident Statuses V1" - ], + "tags": ["Incident Statuses V1"], "summary": "Create Incident Statuses V1", "description": "Create a new incident status", "operationId": "Incident Statuses V1#Create", @@ -1299,9 +1244,7 @@ }, "/v1/incident_statuses/{id}": { "delete": { - "tags": [ - "Incident Statuses V1" - ], + "tags": ["Incident Statuses V1"], "summary": "Delete Incident Statuses V1", "description": "Delete an incident status", "operationId": "Incident Statuses V1#Delete", @@ -1326,9 +1269,7 @@ } }, "get": { - "tags": [ - "Incident Statuses V1" - ], + "tags": ["Incident Statuses V1"], "summary": "Show Incident Statuses V1", "description": "Get a single incident status.", "operationId": "Incident Statuses V1#Show", @@ -1371,9 +1312,7 @@ } }, "put": { - "tags": [ - "Incident Statuses V1" - ], + "tags": ["Incident Statuses V1"], "summary": "Update Incident Statuses V1", "description": "Update an existing incident status", "operationId": "Incident Statuses V1#Update", @@ -1432,9 +1371,7 @@ }, "/v1/incident_types": { "get": { - "tags": [ - "Incident Types V1" - ], + "tags": ["Incident Types V1"], "summary": "List Incident Types V1", "description": "List all incident types for an organisation.", "operationId": "Incident Types V1#List", @@ -1468,9 +1405,7 @@ }, "/v1/incident_types/{id}": { "get": { - "tags": [ - "Incident Types V1" - ], + "tags": ["Incident Types V1"], "summary": "Show Incident Types V1", "description": "Get a single incident type.", "operationId": "Incident Types V1#Show", @@ -1552,18 +1487,14 @@ "examples": { "default": { "summary": "default", - "value": [ - "declined" - ] + "value": ["declined"] } }, "in": "query", "name": "status", "schema": { "description": "Filter for incidents in these statuses", - "example": [ - "declined" - ], + "example": ["declined"], "items": { "example": "declined", "type": "string" @@ -1613,10 +1544,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -1710,9 +1638,7 @@ } }, "summary": "List Incidents V1", - "tags": [ - "Incidents V1" - ], + "tags": ["Incidents V1"], "deprecated": true }, "post": { @@ -1807,10 +1733,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -1898,9 +1821,7 @@ } }, "summary": "Create Incidents V1", - "tags": [ - "Incidents V1" - ], + "tags": ["Incidents V1"], "deprecated": true } }, @@ -1962,10 +1883,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -2053,17 +1971,13 @@ } }, "summary": "Show Incidents V1", - "tags": [ - "Incidents V1" - ], + "tags": ["Incidents V1"], "deprecated": true } }, "/v1/openapi.json": { "get": { - "tags": [ - "Utilities V1" - ], + "tags": ["Utilities V1"], "summary": "OpenAPI Utilities V1", "description": "Get the OpenAPI (v2) definition.", "operationId": "Utilities V1#OpenAPI", @@ -2086,9 +2000,7 @@ }, "/v1/openapiV3.json": { "get": { - "tags": [ - "Utilities V1" - ], + "tags": ["Utilities V1"], "summary": "OpenAPIV3 Utilities V1", "description": "Get the OpenAPI (v3) definition.", "operationId": "Utilities V1#OpenAPIV3", @@ -2111,9 +2023,7 @@ }, "/v1/severities": { "get": { - "tags": [ - "Severities V1" - ], + "tags": ["Severities V1"], "summary": "List Severities V1", "description": "List all incident severities for an organisation.", "operationId": "Severities V1#List", @@ -2123,7 +2033,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody16" + "$ref": "#/components/schemas/ListResponseBody17" }, "example": { "severities": [ @@ -2143,9 +2053,7 @@ } }, "post": { - "tags": [ - "Severities V1" - ], + "tags": ["Severities V1"], "summary": "Create Severities V1", "description": "Create a new severity", "operationId": "Severities V1#Create", @@ -2154,7 +2062,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody11" + "$ref": "#/components/schemas/CreateRequestBody12" }, "example": { "description": "Issues with **low impact**.", @@ -2170,7 +2078,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + "$ref": "#/components/schemas/ShowResponseBody15" }, "example": { "severity": { @@ -2190,9 +2098,7 @@ }, "/v1/severities/{id}": { "delete": { - "tags": [ - "Severities V1" - ], + "tags": ["Severities V1"], "summary": "Delete Severities V1", "description": "Delete a severity", "operationId": "Severities V1#Delete", @@ -2217,9 +2123,7 @@ } }, "get": { - "tags": [ - "Severities V1" - ], + "tags": ["Severities V1"], "summary": "Show Severities V1", "description": "Get a single incident severity.", "operationId": "Severities V1#Show", @@ -2243,7 +2147,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + "$ref": "#/components/schemas/ShowResponseBody15" }, "example": { "severity": { @@ -2261,9 +2165,7 @@ } }, "put": { - "tags": [ - "Severities V1" - ], + "tags": ["Severities V1"], "summary": "Update Severities V1", "description": "Update an existing severity", "operationId": "Severities V1#Update", @@ -2286,7 +2188,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody11" + "$ref": "#/components/schemas/CreateRequestBody12" }, "example": { "description": "Issues with **low impact**.", @@ -2302,7 +2204,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + "$ref": "#/components/schemas/ShowResponseBody15" }, "example": { "severity": { @@ -2322,9 +2224,7 @@ }, "/v2/actions": { "get": { - "tags": [ - "Actions V2" - ], + "tags": ["Actions V2"], "summary": "List Actions V2", "description": "List all actions for an organisation.", "operationId": "Actions V2#List", @@ -2354,7 +2254,8 @@ "standard", "retrospective", "test", - "tutorial" + "tutorial", + "stream" ] }, "examples": { @@ -2401,9 +2302,7 @@ }, "/v2/actions/{id}": { "get": { - "tags": [ - "Actions V2" - ], + "tags": ["Actions V2"], "summary": "Show Actions V2", "description": "Get a single incident action.", "operationId": "Actions V2#Show", @@ -2455,9 +2354,7 @@ }, "/v2/alert_events/http/{alert_source_config_id}": { "post": { - "tags": [ - "Alert Events V2" - ], + "tags": ["Alert Events V2"], "summary": "CreateHTTP Alert Events V2", "description": "Create an alert event using an HTTP source.", "operationId": "Alert Events V2#CreateHTTP", @@ -2499,9 +2396,7 @@ "description": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", "metadata": { "service": "hello.world.com", - "team": [ - "my-team" - ] + "team": ["my-team"] }, "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", "status": "firing", @@ -2516,7 +2411,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateHTTPResponseBody" + "$ref": "#/components/schemas/AlertResult" }, "example": { "deduplication_key": "unique-key", @@ -2531,9 +2426,7 @@ }, "/v2/catalog_entries": { "get": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "ListEntries Catalog V2", "description": "List entries for a catalog type.", "operationId": "Catalog V2#ListEntries", @@ -2590,10 +2483,7 @@ "example": { "catalog_entries": [ { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "archived_at": "2021-08-17T14:28:57.801578Z", "attribute_values": { "abc123": { @@ -2660,9 +2550,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -2671,6 +2559,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -2692,9 +2586,7 @@ } }, "post": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "CreateEntry Catalog V2", "description": "Create an entry within the catalog. We support a maximum of 50,000 entries per type.", "operationId": "Catalog V2#CreateEntry", @@ -2706,10 +2598,7 @@ "$ref": "#/components/schemas/CreateEntryRequestBody" }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "attribute_values": { "abc123": { "array_value": [ @@ -2742,10 +2631,7 @@ }, "example": { "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "archived_at": "2021-08-17T14:28:57.801578Z", "attribute_values": { "abc123": { @@ -2804,9 +2690,7 @@ }, "/v2/catalog_entries/{id}": { "delete": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "DestroyEntry Catalog V2", "description": "Archives a catalog entry.", "operationId": "Catalog V2#DestroyEntry", @@ -2831,9 +2715,7 @@ } }, "get": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "ShowEntry Catalog V2", "description": "Show a single catalog entry.", "operationId": "Catalog V2#ShowEntry", @@ -2861,10 +2743,7 @@ }, "example": { "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "archived_at": "2021-08-17T14:28:57.801578Z", "attribute_values": { "abc123": { @@ -2930,9 +2809,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -2941,6 +2818,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -2958,9 +2841,7 @@ } }, "put": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "UpdateEntry Catalog V2", "description": "Updates an existing catalog entry.", "operationId": "Catalog V2#UpdateEntry", @@ -2986,10 +2867,7 @@ "$ref": "#/components/schemas/UpdateEntryRequestBody" }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "attribute_values": { "abc123": { "array_value": [ @@ -3021,10 +2899,7 @@ }, "example": { "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "archived_at": "2021-08-17T14:28:57.801578Z", "attribute_values": { "abc123": { @@ -3090,9 +2965,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3101,6 +2974,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3120,9 +2999,7 @@ }, "/v2/catalog_resources": { "get": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "ListResources Catalog V2", "description": "List available engine resources for the catalog.\n\nA resource represents a type of data that can be held within the catalog, so this\nendpoint can be used to see what attribute types can be used when updating the\nschema of a catalog type.\n", "operationId": "Catalog V2#ListResources", @@ -3153,9 +3030,7 @@ }, "/v2/catalog_types": { "get": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "ListTypes Catalog V2", "description": "List all catalog types for an organisation, including those synced from external resources.", "operationId": "Catalog V2#ListTypes", @@ -3185,9 +3060,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3196,6 +3069,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3214,9 +3093,7 @@ } }, "post": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "CreateType Catalog V2", "description": "Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.", "operationId": "Catalog V2#CreateType", @@ -3267,9 +3144,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3278,6 +3153,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3297,9 +3178,7 @@ }, "/v2/catalog_types/{id}": { "delete": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "DestroyType Catalog V2", "description": "Archives a catalog type and associated entries.", "operationId": "Catalog V2#DestroyType", @@ -3324,9 +3203,7 @@ } }, "get": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "ShowType Catalog V2", "description": "Show a single catalog type.", "operationId": "Catalog V2#ShowType", @@ -3369,9 +3246,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3380,6 +3255,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3397,9 +3278,7 @@ } }, "put": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "UpdateType Catalog V2", "description": "Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.", "operationId": "Catalog V2#UpdateType", @@ -3463,9 +3342,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3474,6 +3351,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3493,9 +3376,7 @@ }, "/v2/catalog_types/{id}/actions/update_schema": { "post": { - "tags": [ - "Catalog V2" - ], + "tags": ["Catalog V2"], "summary": "UpdateTypeSchema Catalog V2", "description": "Update an existing catalog types schema, adding or removing attributes.\n\nUpdating the schema is handled separately from creating and updating types, so that you don't\nhave to worry about dependencies between types. For example, if type A has an attribute that\nrelies on type B, you would have to create type B first.\n\nBy allowing the creation of types without a schema, they can be created in any order, but it\nmeans that you need to make a separate call to this endpoint to update the schema.", "operationId": "Catalog V2#UpdateTypeSchema", @@ -3528,6 +3409,11 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3561,9 +3447,7 @@ "name": "Kubernetes Cluster", "ranked": true, "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], + "required_integrations": ["pager_duty"], "schema": { "attributes": [ { @@ -3572,6 +3456,12 @@ "id": "01GW2G3V0S59R238FAHPDS1R66", "mode": "manual", "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], "type": "Custom[\"Service\"]" } ], @@ -3591,9 +3481,7 @@ }, "/v2/custom_fields": { "get": { - "tags": [ - "Custom Fields V2" - ], + "tags": ["Custom Fields V2"], "summary": "List Custom Fields V2", "description": "List all custom fields for an organisation.", "operationId": "Custom Fields V2#List", @@ -3624,9 +3512,7 @@ } }, "post": { - "tags": [ - "Custom Fields V2" - ], + "tags": ["Custom Fields V2"], "summary": "Create Custom Fields V2", "description": "Create a new custom field", "operationId": "Custom Fields V2#Create", @@ -3672,9 +3558,7 @@ }, "/v2/custom_fields/{id}": { "delete": { - "tags": [ - "Custom Fields V2" - ], + "tags": ["Custom Fields V2"], "summary": "Delete Custom Fields V2", "description": "Delete a custom field", "operationId": "Custom Fields V2#Delete", @@ -3699,9 +3583,7 @@ } }, "get": { - "tags": [ - "Custom Fields V2" - ], + "tags": ["Custom Fields V2"], "summary": "Show Custom Fields V2", "description": "Get a single custom field.", "operationId": "Custom Fields V2#Show", @@ -3744,9 +3626,7 @@ } }, "put": { - "tags": [ - "Custom Fields V2" - ], + "tags": ["Custom Fields V2"], "summary": "Update Custom Fields V2", "description": "Update the details of a custom field", "operationId": "Custom Fields V2#Update", @@ -3805,9 +3685,7 @@ }, "/v2/follow_ups": { "get": { - "tags": [ - "Follow-ups V2" - ], + "tags": ["Follow-ups V2"], "summary": "List Follow-ups V2", "description": "List all follow-ups for an organisation.", "operationId": "Follow-ups V2#List", @@ -3837,7 +3715,8 @@ "standard", "retrospective", "test", - "tutorial" + "tutorial", + "stream" ] }, "example": "standard" @@ -3891,9 +3770,7 @@ }, "/v2/follow_ups/{id}": { "get": { - "tags": [ - "Follow-ups V2" - ], + "tags": ["Follow-ups V2"], "summary": "Show Follow-ups V2", "description": "Get a single incident follow-up.", "operationId": "Follow-ups V2#Show", @@ -3957,9 +3834,7 @@ }, "/v2/incident_roles": { "get": { - "tags": [ - "Incident Roles V2" - ], + "tags": ["Incident Roles V2"], "summary": "List Incident Roles V2", "description": "List all incident roles for an organisation.", "operationId": "Incident Roles V2#List", @@ -3991,9 +3866,7 @@ } }, "post": { - "tags": [ - "Incident Roles V2" - ], + "tags": ["Incident Roles V2"], "summary": "Create Incident Roles V2", "description": "Create a new incident role", "operationId": "Incident Roles V2#Create", @@ -4041,9 +3914,7 @@ }, "/v2/incident_roles/{id}": { "delete": { - "tags": [ - "Incident Roles V2" - ], + "tags": ["Incident Roles V2"], "summary": "Delete Incident Roles V2", "description": "Removes an existing role", "operationId": "Incident Roles V2#Delete", @@ -4068,9 +3939,7 @@ } }, "get": { - "tags": [ - "Incident Roles V2" - ], + "tags": ["Incident Roles V2"], "summary": "Show Incident Roles V2", "description": "Get a single incident role.", "operationId": "Incident Roles V2#Show", @@ -4114,9 +3983,7 @@ } }, "put": { - "tags": [ - "Incident Roles V2" - ], + "tags": ["Incident Roles V2"], "summary": "Update Incident Roles V2", "description": "Update an existing incident role", "operationId": "Incident Roles V2#Update", @@ -4178,9 +4045,7 @@ }, "/v2/incident_timestamps": { "get": { - "tags": [ - "Incident Timestamps V2" - ], + "tags": ["Incident Timestamps V2"], "summary": "List Incident Timestamps V2", "description": "List all incident timestamps for an organisation.", "operationId": "Incident Timestamps V2#List", @@ -4209,9 +4074,7 @@ }, "/v2/incident_timestamps/{id}": { "get": { - "tags": [ - "Incident Timestamps V2" - ], + "tags": ["Incident Timestamps V2"], "summary": "Show Incident Timestamps V2", "description": "Get a single incident timestamp.", "operationId": "Incident Timestamps V2#Show", @@ -4252,9 +4115,7 @@ }, "/v2/incident_updates": { "get": { - "tags": [ - "Incident Updates V2" - ], + "tags": ["Incident Updates V2"], "summary": "List Incident Updates V2", "description": "List all incident updates for an organisation, or for a specific incident.", "operationId": "Incident Updates V2#List", @@ -4313,6 +4174,7 @@ "created_at": "2021-08-17T13:28:57.801578Z", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "merged_into_incident_id": "abc123", "message": "We're working on a fix, hoping to ship in the next 30 minutes", "new_incident_status": { "category": "triage", @@ -4359,11 +4221,9 @@ }, "/v2/incidents": { "get": { - "tags": [ - "Incidents V2" - ], + "tags": ["Incidents V2"], "summary": "List Incidents V2", - "description": "List all incidents for an organisation.\n\nThis endpoint supports a number of filters, which can help find incidents matching certain\ncriteria.\n\nFilters are provided as query parameters, but due to the dynamic nature of what you can\nquery by (different accounts have different custom fields, statuses, etc) they are more\ncomplex than most.\n\nTo help, here are some exemplar curl requests with a human description of what they search\nfor.\n\nNote that:\n- Filters may be used together, and the result will be incidents that match all filters.\n- IDs are normally in UUID format, but have been replaced with shorter strings to improve\nreadability.\n- All query parameters must be URI encoded.\n\n### By status\n\nWith status of id=ABC, find all incidents that are set to that status:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[one_of]=ABC'\n\nOr all incidents that are not set to status with id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[not_in]=ABC'\n\n### By status category\n\nFind all incidents that are in a status category. Possible values are \"triage\",\n\"declined\", \"merged\", \"canceled\", \"live\", \"learning\" and \"closed\":\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[one_of]=live'\n\nOr all incidents that are not in a status category:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[not_in]=live'\n\n\n### By severity\n\nWith severity of id=ABC, find all incidents that are set to that severity:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[one_of]=ABC'\n\nOr all incidents where severity rank is greater-than-or-equal-to the rank of severity\nid=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[gte]=ABC'\n\nOr all incidents where severity rank is less-than-or-equal-to the rank of severity id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[lte]=ABC'\n\n### By incident type\n\nWith incident type of id=ABC, find all incidents that are of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[one_of]=ABC'\n\nOr all incidents not of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[not_in]=ABC'\n\n### By incident mode\n\nBy default, we return standard and retrospective incidents. This means that test and\ntutorial incidents are filtered out. To override this behaviour, you can use the\nmode filter to specify which modes you want to get.\n\nTo find incidents of all modes:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=standard&mode[one_of]=retrospective&mode[one_of]=test&mode[one_of]=tutorial'\n\nTo find just test incidents:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=test'\n\n\n### By incident role\n\nRoles and custom fields have another nested layer in the query parameter, to account for\noperations against any of the roles or custom fields created in the account.\n\nWith incident role id=ABC, find all incidents where that role is unset:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=true'\n\nOr where the role has been set:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=false'\n\n### By option custom fields\n\nWith an option custom field id=ABC, all incidents that have field ABC set to the custom\nfield option of id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][one_of]=XYZ'\n\nOr all incidents that do not have custom field id=ABC set to option id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][not_in]=XYZ'\n", + "description": "List all incidents for an organisation.\n\nThis endpoint supports a number of filters, which can help find incidents matching certain\ncriteria.\n\nFilters are provided as query parameters, but due to the dynamic nature of what you can\nquery by (different accounts have different custom fields, statuses, etc) they are more\ncomplex than most.\n\nTo help, here are some exemplar curl requests with a human description of what they search\nfor.\n\nNote that:\n- Filters may be used together, and the result will be incidents that match all filters.\n- IDs are normally in UUID format, but have been replaced with shorter strings to improve\nreadability.\n- All query parameters must be URI encoded.\n\n### By status\n\nWith status of id=ABC, find all incidents that are set to that status:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[one_of]=ABC'\n\nOr all incidents that are not set to status with id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[not_in]=ABC'\n\n### By created_at\n\nFind all incidents created_at before or after a given date.\nPossible values are \"gte\" (greater than or equal to) and \"lte\" (less than or equal to). The\nfollowing example finds all incidents created before or on 2021-01-02:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'created_at[lte]=2021-01-02'\n\n### By status category\n\nFind all incidents that are in a status category. Possible values are \"triage\",\n\"declined\", \"merged\", \"canceled\", \"live\", \"learning\" and \"closed\":\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[one_of]=live'\n\nOr all incidents that are not in a status category:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[not_in]=live'\n\n\n### By severity\n\nWith severity of id=ABC, find all incidents that are set to that severity:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[one_of]=ABC'\n\nOr all incidents where severity rank is greater-than-or-equal-to the rank of severity\nid=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[gte]=ABC'\n\nOr all incidents where severity rank is less-than-or-equal-to the rank of severity id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[lte]=ABC'\n\n### By incident type\n\nWith incident type of id=ABC, find all incidents that are of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[one_of]=ABC'\n\nOr all incidents not of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[not_in]=ABC'\n\n### By incident mode\n\nBy default, we return standard and retrospective incidents. This means that test and\ntutorial incidents are filtered out. To override this behaviour, you can use the\nmode filter to specify which modes you want to get.\n\nTo find incidents of all modes:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=standard&mode[one_of]=retrospective&mode[one_of]=test&mode[one_of]=tutorial'\n\nTo find just test incidents:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=test'\n\n\n### By incident role\n\nRoles and custom fields have another nested layer in the query parameter, to account for\noperations against any of the roles or custom fields created in the account.\n\nWith incident role id=ABC, find all incidents where that role is unset:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=true'\n\nOr where the role has been set:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=false'\n\n### By option custom fields\n\nWith an option custom field id=ABC, all incidents that have field ABC set to the custom\nfield option of id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][one_of]=XYZ'\n\nOr all incidents that do not have custom field id=ABC set to option id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][not_in]=XYZ'\n", "operationId": "Incidents V2#List", "parameters": [ { @@ -4401,9 +4261,7 @@ "type": "object", "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] }, "additionalProperties": { "type": "array", @@ -4411,15 +4269,11 @@ "type": "string", "example": "some_value" }, - "example": [ - "some_value" - ] + "example": ["some_value"] } }, "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] } }, { @@ -4431,9 +4285,7 @@ "type": "object", "description": "Filter on the category of the incidents status. The accepted operators are 'one_of', or 'not_in'. If this is not provided, this value defaults to `{\"one_of\": [\"triage\", \"active\", \"post-incident\", \"closed\"] }`, meaning that canceled, declined and merged incidents are not included.", "example": { - "one_of": [ - "active" - ] + "one_of": ["active"] }, "additionalProperties": { "type": "array", @@ -4441,15 +4293,35 @@ "type": "string", "example": "some_value" }, - "example": [ - "some_value" - ] + "example": ["some_value"] } }, "example": { - "one_of": [ - "active" - ] + "one_of": ["active"] + } + }, + { + "name": "created_at", + "in": "query", + "description": "Filter on incident created at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'.", + "allowEmptyValue": true, + "schema": { + "type": "object", + "description": "Filter on incident created at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'.", + "example": { + "created_at[gte]": ["2024-05-01"] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": ["some_value"] + } + }, + "example": { + "created_at[gte]": ["2024-05-01"] } }, { @@ -4461,9 +4333,7 @@ "type": "object", "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] }, "additionalProperties": { "type": "array", @@ -4471,15 +4341,11 @@ "type": "string", "example": "some_value" }, - "example": [ - "some_value" - ] + "example": ["some_value"] } }, "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] } }, { @@ -4491,9 +4357,7 @@ "type": "object", "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] }, "additionalProperties": { "type": "array", @@ -4501,15 +4365,11 @@ "type": "string", "example": "some_value" }, - "example": [ - "some_value" - ] + "example": ["some_value"] } }, "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] + "one_of": ["01GBSQF3FHF7FWZQNWGHAVQ804"] } }, { @@ -4531,9 +4391,7 @@ "additionalProperties": { "type": "object", "example": { - "abc123": [ - "value" - ] + "abc123": ["value"] }, "additionalProperties": { "type": "array", @@ -4541,9 +4399,7 @@ "type": "string", "example": "value" }, - "example": [ - "value" - ] + "example": ["value"] } } }, @@ -4575,9 +4431,7 @@ "additionalProperties": { "type": "object", "example": { - "abc123": [ - "value" - ] + "abc123": ["value"] }, "additionalProperties": { "type": "array", @@ -4585,9 +4439,7 @@ "type": "string", "example": "value" }, - "example": [ - "value" - ] + "example": ["value"] } } }, @@ -4609,9 +4461,7 @@ "type": "object", "description": "Filter on incident mode. The accepted operator is 'one_of'. If this is not provided, this value defaults to `{\"one_of\": [\"standard\", \"retrospective\"] }`, meaning that test and tutorial incidents are not included.", "example": { - "one_of": [ - "retrospective" - ] + "one_of": ["retrospective"] }, "additionalProperties": { "type": "array", @@ -4619,15 +4469,11 @@ "type": "string", "example": "some_value" }, - "example": [ - "some_value" - ] + "example": ["some_value"] } }, "example": { - "one_of": [ - "retrospective" - ] + "one_of": ["retrospective"] } } ], @@ -4676,10 +4522,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -4802,9 +4645,7 @@ } }, "post": { - "tags": [ - "Incidents V2" - ], + "tags": ["Incidents V2"], "summary": "Create Incidents V2", "description": "Create a new incident.\n\nNote that if the incident mode is set to \"retrospective\" then the new incident\nwill not be announced in Slack.\n", "operationId": "Incidents V2#Create", @@ -4855,6 +4696,7 @@ "mode": "standard", "name": "Our database is sad", "retrospective_incident_options": { + "postmortem_document_url": "https://docs.google.com/my_doc_id", "slack_channel_id": "abc123" }, "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", @@ -4910,10 +4752,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -5032,9 +4871,7 @@ }, "/v2/incidents/{id}": { "get": { - "tags": [ - "Incidents V2" - ], + "tags": ["Incidents V2"], "summary": "Show Incidents V2", "description": "Get a single incident.\n\nThe ID supplied can be either the incident's full ID, or the numeric part of its\nreference. For example, to get INC-123, you could use either its full ID or:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents/123\n", "operationId": "Incidents V2#Show", @@ -5096,10 +4933,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -5218,9 +5052,7 @@ }, "/v2/incidents/{id}/actions/edit": { "post": { - "tags": [ - "Incidents V2" - ], + "tags": ["Incidents V2"], "summary": "Edit Incidents V2", "description": "Edit an existing incident.\n\nThis endpoint allows you to edit the properties of an existing incident: e.g. set the severity or update custom fields.\n\nWhen using this endpoint, only fields that are provided will be edited (omitted fields\nwill be ignored).\n", "operationId": "Incidents V2#Edit", @@ -5334,10 +5166,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -5454,41 +5283,51 @@ } } }, - "/v2/users": { + "/v2/schedule_entries": { "get": { - "tags": [ - "Users V2" - ], - "summary": "List Users V2", - "description": "List users for an organisation.", - "operationId": "Users V2#List", + "tags": ["Schedules V2"], + "summary": "ListScheduleEntries Schedules V2", + "description": "Get a list of schedule entries.", + "operationId": "Schedules V2#ListScheduleEntries", "parameters": [ { - "name": "page_size", + "name": "schedule_id", "in": "query", - "description": "Integer number of records to return", + "description": "The ID of the schedule to get entries for.", "allowEmptyValue": true, + "required": true, "schema": { - "type": "integer", - "description": "Integer number of records to return", - "default": 25, - "example": 25, - "format": "int64", - "maximum": 500 + "type": "string", + "description": "The ID of the schedule to get entries for.", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "example": 25 + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, { - "name": "after", + "name": "entry_window_start", "in": "query", - "description": "An record's ID. This endpoint will return a list of records after this ID in relation to the API response order.", + "description": "The start of the window to get entries for.", "allowEmptyValue": true, "schema": { "type": "string", - "description": "An record's ID. This endpoint will return a list of records after this ID in relation to the API response order.", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "The start of the window to get entries for.", + "example": "2021-01-01T00:00:00Z", + "format": "date-time" }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "example": "2021-01-01T00:00:00Z" + }, + { + "name": "entry_window_end", + "in": "query", + "description": "The end of the window to get entries for.", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "The end of the window to get entries for.", + "example": "2021-01-01T00:00:00Z", + "format": "date-time" + }, + "example": "2021-01-01T00:00:00Z" } ], "responses": { @@ -5497,63 +5336,105 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody17" + "$ref": "#/components/schemas/ListScheduleEntriesResponseBody" }, "example": { "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + "after": "abc123", + "after_url": "abc123" }, - "users": [ - { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", + "schedule_entries": { + "final": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } - ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - ] - } - } - } - } - } - } - }, - "/v2/users/{id}": { - "get": { - "tags": [ - "Users V2" - ], - "summary": "Show Users V2", - "description": "Get a single user.", - "operationId": "Users V2#Show", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier of the user", - "required": true, + } + ], + "overrides": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "scheduled": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ] + } + } + } + } + } + } + } + }, + "/v2/schedules": { + "get": { + "tags": ["Schedules V2"], + "summary": "List Schedules V2", + "description": "List configured schedules.", + "operationId": "Schedules V2#List", + "parameters": [ + { + "name": "page_size", + "in": "query", + "description": "number of records to return", + "allowEmptyValue": true, + "schema": { + "type": "integer", + "description": "number of records to return", + "default": 25, + "example": 25, + "format": "int64" + }, + "example": 25 + }, + { + "name": "after", + "in": "query", + "description": "A schedule's ID. This endpoint will return a list of schedules after this ID in relation to the API response order.", + "allowEmptyValue": true, "schema": { "type": "string", - "description": "Unique identifier of the user", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "A schedule's ID. This endpoint will return a list of schedules after this ID in relation to the API response order.", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FDAG4SAP5TYPT98WGR2N7W91" } ], "responses": { @@ -5562,29 +5443,220 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody15" + "$ref": "#/components/schemas/ListResponseBody16" }, "example": { - "user": { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + }, + "schedules": [ + { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + } + } + } + } + } + }, + "post": { + "tags": ["Schedules V2"], + "summary": "Create Schedules V2", + "description": "Create a new schedule.", + "operationId": "Schedules V2#Create", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRequestBody11" + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + } + } + } + }, + "responses": { + "201": { + "description": "Created response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody14" + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "3.0.0" }, - "custom_roles": [ + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" } } } @@ -5592,4311 +5664,9424 @@ } } } - } - }, - "components": { - "schemas": { - "APIKeyCreatedV1ResponseBody": { - "type": "object", - "properties": { - "action": { - "type": "string", - "description": "The type of log entry that this is", - "example": "api_key.created" - }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" - }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" - }, - "occurred_at": { - "type": "string", - "description": "When the entry occurred", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "targets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuditLogTargetV2" + }, + "/v2/schedules/{id}": { + "delete": { + "tags": ["Schedules V2"], + "summary": "Destroy Schedules V2", + "description": "Archives a single schedule.", + "operationId": "Schedules V2#Destroy", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique internal ID of the schedule", + "required": true, + "schema": { + "type": "string", + "description": "Unique internal ID of the schedule", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "description": "The custom field that was created", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Development API Key", - "type": "api_key" - } - ] - }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" } - }, - "example": { - "action": "api_key.created", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "name": "John Doe", - "type": "user" - }, - "context": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Development API Key", - "type": "api_key" + ], + "responses": { + "202": { + "description": "Accepted response." + } + } + }, + "get": { + "tags": ["Schedules V2"], + "summary": "Show Schedules V2", + "description": "Get a single schedule.", + "operationId": "Schedules V2#Show", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique internal ID of the schedule", + "required": true, + "schema": { + "type": "string", + "description": "Unique internal ID of the schedule", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody14" + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + } } - ], - "version": 1 - }, - "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context" - ] + } + } }, - "APIKeyV2": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this API key", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "name": { - "type": "string", - "description": "The name of the API key, for the user's reference", - "example": "My test API key" + "put": { + "tags": ["Schedules V2"], + "summary": "Update Schedules V2", + "description": "Update a schedule.", + "operationId": "Schedules V2#Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The schedule ID to update.", + "required": true, + "schema": { + "type": "string", + "description": "The schedule ID to update.", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRequestBody7" + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + } + } } }, - "example": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "required": [ - "id", - "name", - "roles", - "created_by" - ] - }, - "ActionV1": { - "type": "object", - "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" - }, - "completed_at": { - "type": "string", - "description": "When the action was completed", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Description of the action", - "example": "Call the fire brigade" - }, - "external_issue_reference": { - "$ref": "#/components/schemas/ExternalIssueReferenceV1" + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody14" + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + } + } + } + } + } + }, + "/v2/users": { + "get": { + "tags": ["Users V2"], + "summary": "List Users V2", + "description": "List users for an organisation.", + "operationId": "Users V2#List", + "parameters": [ + { + "name": "email", + "in": "query", + "description": "Filter by email address", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "Filter by email address", + "example": "john.doe@incident.io" + }, + "example": "john.doe@incident.io" }, - "follow_up": { - "type": "boolean", - "description": "Whether an action is marked as follow-up", - "example": true + { + "name": "slack_user_id", + "in": "query", + "description": "Filter by Slack user ID", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "Filter by Slack user ID", + "example": "U12345678" + }, + "example": "U12345678" }, - "id": { - "type": "string", - "description": "Unique identifier for the action", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + { + "name": "page_size", + "in": "query", + "description": "Integer number of records to return", + "allowEmptyValue": true, + "schema": { + "type": "integer", + "description": "Integer number of records to return", + "default": 25, + "example": 25, + "format": "int64", + "maximum": 500 + }, + "example": 25 }, + { + "name": "after", + "in": "query", + "description": "An record's ID. This endpoint will return a list of records after this ID in relation to the API response order.", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "An record's ID. This endpoint will return a list of records after this ID in relation to the API response order.", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseBody18" + }, + "example": { + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + }, + "users": [ + { + "base_role": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "custom_roles": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ] + } + } + } + } + } + } + }, + "/v2/users/{id}": { + "get": { + "tags": ["Users V2"], + "summary": "Show Users V2", + "description": "Get a single user.", + "operationId": "Users V2#Show", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier of the user", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier of the user", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody16" + }, + "example": { + "user": { + "base_role": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "custom_roles": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + } + } + } + } + } + }, + "/v2/workflows": { + "get": { + "tags": ["Workflows V2"], + "summary": "ListWorkflows Workflows V2", + "description": "List all workflows", + "operationId": "Workflows V2#ListWorkflows", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListWorkflowsResponseBody" + }, + "example": { + "workflows": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + ] + } + } + } + } + } + }, + "post": { + "tags": ["Workflows V2"], + "summary": "CreateWorkflow Workflows V2", + "description": "Create a new workflow", + "operationId": "Workflows V2#CreateWorkflow", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkflowRequestBody" + }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } + ], + "reference": "abc123", + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "include_private_incidents": true, + "name": "My workflow", + "once_for": ["incident.url"], + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": "incident.updated" + } + } + } + }, + "responses": { + "201": { + "description": "Created response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowWorkflowResponseBody" + }, + "example": { + "management_meta": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" + }, + "workflow": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + } + } + } + } + } + } + }, + "/v2/workflows/{id}": { + "delete": { + "tags": ["Workflows V2"], + "summary": "DestroyWorkflow Workflows V2", + "description": "Archives a workflow", + "operationId": "Workflows V2#DestroyWorkflow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier for the workflow", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the workflow", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "204": { + "description": "No Content response." + } + } + }, + "get": { + "tags": ["Workflows V2"], + "summary": "ShowWorkflow Workflows V2", + "description": "Show a workflow by ID", + "operationId": "Workflows V2#ShowWorkflow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier for the workflow", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the workflow", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowWorkflowResponseBody" + }, + "example": { + "management_meta": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" + }, + "workflow": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + } + } + } + } + } + }, + "put": { + "tags": ["Workflows V2"], + "summary": "UpdateWorkflow Workflows V2", + "description": "Updates a workflow", + "operationId": "Workflows V2#UpdateWorkflow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the workflow to update", + "required": true, + "schema": { + "type": "string", + "description": "ID of the workflow to update", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "examples": { + "default": { + "summary": "default", + "value": "01FCNDV6P870EA6S7TK1DSYDG0" + } + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkflowRequestBody" + }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } + ], + "reference": "abc123", + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "include_private_incidents": true, + "name": "My workflow", + "once_for": ["incident.url"], + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowWorkflowResponseBody" + }, + "example": { + "management_meta": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" + }, + "workflow": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIKeyCreatedV1ResponseBody": { + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "api_key.created" + }, + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" + }, + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" + }, + "occurred_at": { + "type": "string", + "description": "When the entry occurred", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogTargetV2" + }, + "description": "The custom field that was created", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Development API Key", + "type": "api_key" + } + ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" + } + }, + "example": { + "action": "api_key.created", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Development API Key", + "type": "api_key" + } + ], + "version": 1 + }, + "required": [ + "action", + "occurred_at", + "version", + "actor", + "targets", + "context" + ] + }, + "APIKeyV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this API key", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "The name of the API key, for the user's reference", + "example": "My test API key" + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "required": ["id", "name", "roles", "created_by"] + }, + "ActionV1": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/UserV1" + }, + "completed_at": { + "type": "string", + "description": "When the action was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Description of the action", + "example": "Call the fire brigade" + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV1" + }, + "follow_up": { + "type": "boolean", + "description": "Whether an action is marked as follow-up", + "example": true + }, + "id": { + "type": "string", + "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident the action belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "status": { + "type": "string", + "description": "Status of the action", + "example": "outstanding", + "enum": ["outstanding", "completed", "deleted", "not_doing"] + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "incident_id", + "status", + "follow_up", + "created_at", + "updated_at" + ] + }, + "ActionV2": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/UserV1" + }, + "completed_at": { + "type": "string", + "description": "When the action was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Description of the action", + "example": "Call the fire brigade" + }, + "id": { + "type": "string", + "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident the action belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "status": { + "type": "string", + "description": "Status of the action", + "example": "outstanding", + "enum": ["outstanding", "completed", "deleted", "not_doing"] + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "incident_id", + "description", + "status", + "created_at", + "updated_at" + ] + }, + "ActorV2": { + "type": "object", + "properties": { + "api_key": { + "$ref": "#/components/schemas/APIKeyV2" + }, + "user": { + "$ref": "#/components/schemas/UserV1" + } + }, + "example": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + }, + "AfterPaginationMetaResultV2": { + "type": "object", + "properties": { + "after": { + "type": "string", + "description": "The time, if it exists, of the last entry's end time", + "example": "abc123" + }, + "after_url": { + "type": "string", + "description": "The URL to fetch the next page of entries", + "example": "abc123" + } + }, + "example": { + "after": "abc123", + "after_url": "abc123" + }, + "required": ["after", "after_url"] + }, + "AlertResult": { + "type": "object", + "properties": { + "deduplication_key": { + "type": "string", + "description": "The deduplication key that the event has been processed with", + "example": "unique-key", + "enum": ["unique-key"] + }, + "message": { + "type": "string", + "description": "Human readable message giving detail about the event", + "example": "Event accepted for processing", + "enum": ["Event accepted for processing"] + }, + "status": { + "type": "string", + "description": "Status of the event", + "example": "success", + "enum": ["success"] + } + }, + "example": { + "deduplication_key": "unique-key", + "message": "Event accepted for processing", + "status": "success" + }, + "required": ["status", "message", "deduplication_key"] + }, + "AllResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.incident_created_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.action_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.action_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + }, + "private_incident.membership_granted_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" + }, + "private_incident.membership_revoked_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" + }, + "public_incident.action_created_v1": { + "$ref": "#/components/schemas/ActionV1" + }, + "public_incident.action_updated_v1": { + "$ref": "#/components/schemas/ActionV1" + }, + "public_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/ActionV1" + }, + "public_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/ActionV1" + }, + "public_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookIncidentV2" + }, + "public_incident.incident_status_updated_v2": { + "$ref": "#/components/schemas/IncidentWithStatusChangeV2" + }, + "public_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookIncidentV2" + } + }, + "example": { + "event_type": "public_incident.incident_created_v2", + "private_incident.action_created_v1": { + "id": "abc123" + }, + "private_incident.action_updated_v1": { + "id": "abc123" + }, + "private_incident.follow_up_created_v1": { + "id": "abc123" + }, + "private_incident.follow_up_updated_v1": { + "id": "abc123" + }, + "private_incident.incident_created_v2": { + "id": "abc123" + }, + "private_incident.incident_updated_v2": { + "id": "abc123" + }, + "private_incident.membership_granted_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + }, + "private_incident.membership_revoked_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + }, + "public_incident.action_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.action_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.follow_up_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.follow_up_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.incident_created_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "related_incidents": ["INC-237"], + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "public_incident.incident_status_updated_v2": { + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "new_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "public_incident.incident_updated_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "related_incidents": ["INC-237"], + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + }, + "required": ["event_type"] + }, + "AuditLogActorMetadataV2": { + "type": "object", + "properties": { + "api_key_roles": { + "type": "string", + "description": "The roles that the API key has, separated by commas (if it's an API key actor)", + "example": "abc123" + }, + "external_resource_external_id": { + "type": "string", + "description": "The ID of the external resource in the 3rd party system (if it's an external resource actor)", + "example": "q1234" + }, + "external_resource_type": { + "type": "string", + "description": "The type of the external resource (if it's an external resource actor)", + "example": "pager_duty_incident" + }, + "user_base_role_slug": { + "type": "string", + "description": "The base role slug of the user (if it's a user actor)", + "example": "admin" + }, + "user_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user, separated by commas (if it's a user actor)", + "example": "engineering,security" + } + }, + "example": { + "api_key_roles": "abc123", + "external_resource_external_id": "q1234", + "external_resource_type": "pager_duty_incident", + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + } + }, + "AuditLogActorV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the actor", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "metadata": { + "$ref": "#/components/schemas/AuditLogActorMetadataV2" + }, + "name": { + "type": "string", + "description": "The name of the actor", + "example": "John Doe" + }, + "type": { + "type": "string", + "description": "The type of actor", + "example": "user", + "enum": [ + "user", + "system", + "api_key", + "workflow", + "external_resource" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "required": ["id", "type"] + }, + "AuditLogEntryContextV2": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The location of the actor that performed this action", + "example": "1.2.3.4" + }, + "user_agent": { + "type": "string", + "description": "The user agent of the actor that performed this action", + "example": "Chrome/91.0.4472.114" + } + }, + "example": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "required": ["location"] + }, + "AuditLogPrivateIncidentAccessAttemptedMetadataV2": { + "type": "object", + "properties": { + "outcome": { + "type": "string", + "description": "Whether or not the user was able to access the private incident", + "example": "granted", + "enum": ["granted", "denied"] + } + }, + "example": { + "outcome": "granted" + } + }, + "AuditLogTargetV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the target", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "The name of the target", + "example": "John Doe" + }, + "type": { + "type": "string", + "description": "The type of target", + "example": "user", + "enum": [ + "api_key", + "alert_route", + "alert_schema", + "alert_source", + "announcement_rule", + "catalog_type", + "custom_field", + "debrief_invite_rule", + "escalation_path", + "follow_up_priority", + "incident", + "incident_duration_metric", + "incident_role", + "incident_status", + "incident_timestamp", + "incident_type", + "integration", + "internal_status_page", + "nudge", + "policy", + "private_incident_membership", + "rbac_role", + "schedule", + "scim_group", + "severity", + "status_page", + "status_page_sub_page", + "status_page_template", + "user", + "workflow" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "John Doe", + "type": "user" + }, + "required": ["id", "type"] + }, + "AuditLogUserRoleMembershipChangedMetadataV2": { + "type": "object", + "properties": { + "after_base_role_slug": { + "type": "string", + "description": "The base role slug of the user after their role memberships changed", + "example": "owner" + }, + "after_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user after their role memberships changed, separated by commas", + "example": "engineering,data" + }, + "before_base_role_slug": { + "type": "string", + "description": "The base role slug of the user before their role memberships changed", + "example": "admin" + }, + "before_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user before their role memberships changed, separated by commas", + "example": "engineering,security" + } + }, + "example": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + }, + "required": [ + "before_base_role_slug", + "before_custom_role_slugs", + "after_base_role_slug", + "after_custom_role_slugs" + ] + }, + "AuditLogUserSCIMGroupMappingChangedMetadataV2": { + "type": "object", + "properties": { + "after_base_role_slug": { + "type": "string", + "description": "The base role slug of this SCIM group after the mapping was changed (if any)", + "example": "owner" + }, + "after_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of this SCIM group after the mapping was changed (if any), separated by commas", + "example": "engineering,data" + }, + "before_base_role_slug": { + "type": "string", + "description": "The base role slug assigned to this SCIM group before the mapping was changed (if any)", + "example": "admin" + }, + "before_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of this SCIM group before the mapping was changed (if any), separated by commas", + "example": "engineering,security" + } + }, + "example": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + } + }, + "CatalogEntryEngineParamBindingV2": { + "type": "object", + "properties": { + "array_value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogEntryEngineParamBindingValueV2" + }, + "description": "If array_value is set, this helps render the values", + "example": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ] + }, + "value": { + "$ref": "#/components/schemas/CatalogEntryEngineParamBindingValueV2" + } + }, + "example": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "CatalogEntryEngineParamBindingValueV2": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryReferenceV2" + }, + "helptext": { + "type": "string", + "description": "Gives a description of the option to the user", + "example": "Collection of standalone automations like auto-closing incidents." + }, + "image_url": { + "type": "string", + "description": "If appropriate, URL to an image that can be displayed alongside the option", + "example": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg" + }, + "is_image_slack_icon": { + "type": "boolean", + "description": "If true, the image_url is a Slack icon and should be displayed as such", + "example": false + }, + "label": { + "type": "string", + "description": "Human readable label to be displayed for user to select", + "example": "Lawrence Jones" + }, + "literal": { + "type": "string", + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" + }, + "reference": { + "type": "string", + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" + }, + "sort_key": { + "type": "string", + "description": "Gives an indication of how to sort the options when displayed to the user", + "example": "000020" + }, + "unavailable": { + "type": "boolean", + "description": "Unavailable is true if we've failed to build the value for this binding", + "example": false + }, + "value": { + "type": "string", + "description": "Either the reference or the literal: this field is designed purely to make working with react-select easier", + "example": "abc123" + } + }, + "example": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + }, + "required": ["label", "sort_key"] + }, + "CatalogEntryReferenceV2": { + "type": "object", + "properties": { + "archived_at": { + "type": "string", + "description": "When this entry was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "catalog_entry_id": { + "type": "string", + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "catalog_entry_name": { + "type": "string", + "description": "The name of this entry", + "example": "Primary escalation" + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + }, + "example": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "required": [ + "catalog_type_id", + "catalog_entry_id", + "catalog_entry_name" + ] + }, + "CatalogEntryV2": { + "type": "object", + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": ["lawrence@incident.io", "lawrence"] + }, + "archived_at": { + "type": "string", + "description": "When this entry was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "attribute_values": { + "type": "object", + "description": "Values of this entry", + "example": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/CatalogEntryEngineParamBindingV2" + } + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "created_at": { + "type": "string", + "description": "When this entry was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "external_id": { + "type": "string", + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + }, + "id": { + "type": "string", + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" + }, + "rank": { + "type": "integer", + "description": "When catalog type is ranked, this is used to help order things", + "example": 3, + "format": "int32" + }, + "updated_at": { + "type": "string", + "description": "When this entry was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "aliases": ["lawrence@incident.io", "lawrence"], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "catalog_type_id", + "name", + "aliases", + "rank", + "attribute_values", + "created_at", + "updated_at" + ] + }, + "CatalogResourceV2": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Which category of resource", + "example": "custom", + "enum": ["primitive", "custom", "external"] + }, + "description": { + "type": "string", + "description": "Human readable description for this resource", + "example": "Boolean true or false value" + }, + "label": { + "type": "string", + "description": "Label for this catalog resource type", + "example": "GitHub Repository" + }, + "type": { + "type": "string", + "description": "Catalog type name for this resource", + "example": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]" + }, + "value_docstring": { + "type": "string", + "description": "Documentation for the literal string value of this resource", + "example": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + } + }, + "example": { + "category": "custom", + "description": "Boolean true or false value", + "label": "GitHub Repository", + "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", + "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + }, + "required": [ + "type", + "label", + "description", + "value_docstring", + "category", + "config", + "is_user_link" + ] + }, + "CatalogTypeAttributePathItemPayloadV2": { + "type": "object", + "properties": { + "attribute_id": { + "type": "string", + "description": "the ID of the attribute to use", + "example": "abc123" + } + }, + "example": { + "attribute_id": "abc123" + }, + "required": ["attribute_id"] + }, + "CatalogTypeAttributePathItemV2": { + "type": "object", + "properties": { + "attribute_id": { + "type": "string", + "description": "the ID of the attribute to use", + "example": "abc123" + }, + "attribute_name": { + "type": "string", + "description": "the name of the attribute to use", + "example": "abc123" + } + }, + "example": { + "attribute_id": "abc123", + "attribute_name": "abc123" + }, + "required": ["attribute_id", "attribute_name"] + }, + "CatalogTypeAttributePayloadV2": { + "type": "object", + "properties": { + "array": { + "type": "boolean", + "description": "Whether this attribute is an array", + "example": false + }, + "backlink_attribute": { + "type": "string", + "description": "The attribute to use (if this is a backlink)", + "example": "abc123" + }, + "id": { + "type": "string", + "description": "The ID of this attribute", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "mode": { + "type": "string", + "description": "Controls how this attribute is modified", + "example": "manual", + "enum": [ + "", + "manual", + "external", + "internal", + "dynamic", + "backlink", + "path" + ] + }, + "name": { + "type": "string", + "description": "Unique name of this attribute", + "example": "tier" + }, + "path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeAttributePathItemPayloadV2" + }, + "description": "The path to use (if this is an path)", + "example": [ + { + "attribute_id": "abc123" + } + ] + }, + "type": { + "type": "string", + "description": "Catalog type name for this attribute", + "example": "Custom[\"Service\"]" + } + }, + "example": { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], + "type": "Custom[\"Service\"]" + }, + "required": ["name", "type", "array"] + }, + "CatalogTypeAttributeV2": { + "type": "object", + "properties": { + "array": { + "type": "boolean", + "description": "Whether this attribute is an array", + "example": false + }, + "backlink_attribute": { + "type": "string", + "description": "The attribute to use (if this is a backlink)", + "example": "abc123" + }, + "id": { + "type": "string", + "description": "The ID of this attribute", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "mode": { + "type": "string", + "description": "Controls how this attribute is modified", + "example": "manual", + "enum": [ + "", + "manual", + "external", + "internal", + "dynamic", + "backlink", + "path" + ] + }, + "name": { + "type": "string", + "description": "Unique name of this attribute", + "example": "tier" + }, + "path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeAttributePathItemV2" + }, + "description": "The path to use (if this is a path attribute)", + "example": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ] + }, + "type": { + "type": "string", + "description": "Catalog type name for this attribute", + "example": "Custom[\"Service\"]" + } + }, + "example": { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + }, + "required": ["id", "mode", "name", "type", "array"] + }, + "CatalogTypeSchemaV2": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeAttributeV2" + }, + "description": "Attributes of this catalog type", + "example": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ] + }, + "version": { + "type": "integer", + "description": "The version number of this schema", + "example": 1, + "format": "int64" + } + }, + "example": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "required": ["attributes", "version"] + }, + "CatalogTypeV2": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "color": { + "type": "string", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] + }, + "created_at": { + "type": "string", + "description": "When this type was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." + }, + "dynamic_resource_parameter": { + "type": "string", + "description": "If this is a dynamic catalog type, this will be the unique parameter for identitfying this resource externally.", + "example": "abc123" + }, + "estimated_count": { + "type": "integer", + "description": "If populated, gives an estimated count of entries for this type", + "example": 7, + "format": "int64" + }, + "icon": { + "type": "string", + "description": "Sets the display icon of this type in the dashboard", + "example": "bolt", + "enum": [ + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "store", + "star", + "tag", + "user", + "users" + ] + }, + "id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "is_editable": { + "type": "boolean", + "description": "Catalog types that are synced with external resources can't be edited", + "example": false + }, + "last_synced_at": { + "type": "string", + "description": "When this type was last synced (if it's ever been sync'd)", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" + }, + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true + }, + "registry_type": { + "type": "string", + "description": "The registry resource this type is synced from, if any", + "example": "PagerDutyService" + }, + "required_integrations": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "If populated, the integrations required for this type", + "example": ["pager_duty"] + }, + "schema": { + "$ref": "#/components/schemas/CatalogTypeSchemaV2" + }, + "semantic_type": { + "type": "string", + "description": "Semantic type of this resource (unused)", + "example": "custom" + }, + "source_repo_url": { + "type": "string", + "description": "The url of the external repository where this type is managed", + "example": "https://github.com/my-company/incident-io-catalog" + }, + "type_name": { + "type": "string", + "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", + "example": "Custom[\"BackstageGroup\"]" + }, + "updated_at": { + "type": "string", + "description": "When this type was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "name", + "description", + "type_name", + "semantic_type", + "ranked", + "schema", + "icon", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "engine_resource_type", + "mode", + "use_name_as_identifier" + ] + }, + "ConditionGroupPayloadV2": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionPayloadV2" + }, + "description": "All conditions in this list must be satisfied for the group to be satisfied", + "example": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + }, + "example": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + }, + "required": ["conditions"] + }, + "ConditionGroupV2": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionV2" + }, + "description": "All conditions in this list must be satisfied for the group to be satisfied", + "example": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + }, + "example": { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + }, + "required": ["conditions"] + }, + "ConditionOperationV2": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Human readable label to be displayed for user to select", + "example": "Lawrence Jones" + }, + "value": { + "type": "string", + "description": "Unique identifier for this option", + "example": "01FCQSP07Z74QMMYPDDGQB9FTG" + } + }, + "example": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "required": ["label", "value"] + }, + "ConditionPayloadV2": { + "type": "object", + "properties": { + "operation": { + "type": "string", + "description": "The name of the operation on the subject", + "example": "one_of" + }, + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "description": "List of parameter bindings", + "example": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + }, + "subject": { + "type": "string", + "description": "The reference of the subject in the trigger scope", + "example": "incident.severity" + } + }, + "example": { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + }, + "required": ["subject", "operation", "param_bindings"] + }, + "ConditionSubjectV2": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Human readable identifier for the subject", + "example": "Incident Severity" + }, + "reference": { + "type": "string", + "description": "Reference into the scope for the value of the subject", + "example": "incident.severity" + } + }, + "example": { + "label": "Incident Severity", + "reference": "incident.severity" + }, + "required": ["label", "reference"] + }, + "ConditionV2": { + "type": "object", + "properties": { + "operation": { + "$ref": "#/components/schemas/ConditionOperationV2" + }, + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "description": "Bindings for the operation parameters", + "example": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + }, + "subject": { + "$ref": "#/components/schemas/ConditionSubjectV2" + } + }, + "example": { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + }, + "required": ["subject", "operation", "param_bindings"] + }, + "CreateEntryRequestBody": { + "type": "object", + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": ["lawrence@incident.io", "lawrence"] + }, + "attribute_values": { + "type": "object", + "description": "Values of this entry", + "example": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "external_id": { + "type": "string", + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" + }, + "rank": { + "type": "integer", + "description": "When catalog type is ranked, this is used to help order things", + "example": 3, + "format": "int32" + } + }, + "example": { + "aliases": ["lawrence@incident.io", "lawrence"], + "attribute_values": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "name": "Primary On-call", + "rank": 3 + }, + "required": ["catalog_type_id", "name", "attribute_values"] + }, + "CreateEntryResponseBody": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryV2" + } + }, + "example": { + "catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["catalog_entry"] + }, + "CreateHTTPRequestBody": { + "type": "object", + "properties": { + "deduplication_key": { + "type": "string", + "description": "A deduplication key can be provided to uniquely reference this alert from your alert source. If you send an event with the same deduplication_key multiple times, only one alert will be created in incident.io for this alert source config.", + "example": "4293868629" + }, + "description": { + "type": "string", + "description": "Description that optionally adds more detail to title ", + "example": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix..." + }, + "metadata": { + "type": "object", + "description": "Any additional metadata that you've configured your alert source to parse", + "example": { + "service": "hello.world.com", + "team": ["my-team"] + }, + "additionalProperties": true + }, + "source_url": { + "type": "string", + "description": "If applicable, a link to the alert in the upstream system", + "example": "https://www.my-alerting-platform.com/alerts/my-alert-123" + }, + "status": { + "type": "string", + "description": "Current status of this alert", + "example": "firing", + "enum": ["firing", "resolved"] + }, + "title": { + "type": "string", + "description": "Alert title which is used when summarising the alert", + "example": "*errors.withMessage: PG::Error failed to connect" + } + }, + "example": { + "deduplication_key": "4293868629", + "description": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", + "metadata": { + "service": "hello.world.com", + "team": ["my-team"] + }, + "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", + "status": "firing", + "title": "*errors.withMessage: PG::Error failed to connect" + }, + "required": ["title", "status"] + }, + "CreateManagedResourceRequestBody": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "resource_id": { + "type": "string", + "description": "The ID of the related resource", + "example": "abc123" + }, + "resource_type": { + "type": "string", + "description": "The type of the related resource", + "example": "schedule", + "enum": ["workflow", "schedule"] + } + }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "resource_id": "abc123", + "resource_type": "schedule" + }, + "required": [ + "annotations", + "resource_type", + "resource_id", + "managed_by" + ] + }, + "CreateManagedResourceResponseBody": { + "type": "object", + "properties": { + "managed_resource": { + "$ref": "#/components/schemas/ManagedResourceV2" + } + }, + "example": { + "managed_resource": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "resource_id": "abc123", + "resource_type": "schedule", + "source_url": "https://github.com/my-company/infrastructure" + } + }, + "required": ["managed_resource"] + }, + "CreateRequestBody": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "sort_key": { + "type": "integer", + "description": "Sort key used to order the custom field options correctly", + "default": 1000, + "example": 10, + "format": "int64" + }, + "value": { + "type": "string", + "description": "Human readable name for the custom field option", + "example": "Product" + } + }, + "example": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "required": ["custom_field_id", "value"] + }, + "CreateRequestBody10": { + "type": "object", + "properties": { + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" + }, + "description": "Set the incident's custom fields to these values", + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ] + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "idempotency_key": { + "type": "string", + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ] + }, + "incident_status_id": { + "type": "string", + "description": "Incident status to assign to the incident", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "incident_timestamp_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + }, + "description": "Assign the incident's timestamps to these values", + "example": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "incident_type_id": { + "type": "string", + "description": "Incident type to create this incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "mode": { + "type": "string", + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "standard", + "enum": ["standard", "retrospective", "test", "tutorial"] + }, + "name": { + "type": "string", + "description": "Explanation of the incident", + "example": "Our database is sad" + }, + "retrospective_incident_options": { + "$ref": "#/components/schemas/RetrospectiveIncidentOptionsV2" + }, + "severity_id": { + "type": "string", + "description": "Severity to create incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "slack_channel_name_override": { + "type": "string", + "description": "Name of the Slack channel to create for this incident", + "example": "inc-123-database-down" + }, + "slack_team_id": { + "type": "string", + "description": "Slack Team to create the incident in", + "example": "T02A1FSLE8J" + }, + "summary": { + "type": "string", + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." + }, + "visibility": { + "type": "string", + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": ["public", "private"] + } + }, + "example": { + "custom_field_entries": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "idempotency_key": "alert-uuid", + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_status_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "incident_timestamp_values": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ], + "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "mode": "standard", + "name": "Our database is sad", + "retrospective_incident_options": { + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "slack_channel_id": "abc123" + }, + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "slack_channel_name_override": "inc-123-database-down", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "visibility": "public" + }, + "required": ["idempotency_key", "visibility"] + }, + "CreateRequestBody11": { + "type": "object", + "properties": { + "schedule": { + "$ref": "#/components/schemas/ScheduleCreatePayloadV2" + } + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + }, + "required": ["schedule"] + }, + "CreateRequestBody12": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the severity", + "example": "Issues with **low impact**." + }, + "name": { + "type": "string", + "description": "Human readable name of the severity", + "example": "Minor", + "maxLength": 50 + }, + "rank": { + "type": "integer", + "description": "Rank to help sort severities (lower numbers are less severe)", + "example": 1, + "format": "int64" + } + }, + "example": { + "description": "Issues with **low impact**.", + "name": "Minor", + "rank": 1 + }, + "required": ["name", "description"] + }, + "CreateRequestBody2": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" + }, + "field_type": { + "type": "string", + "description": "Type of custom field", + "example": "single_select", + "enum": ["single_select", "multi_select", "text", "link", "numeric"] + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "required": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", + "example": "never", + "enum": ["never", "before_closure", "always"] + }, + "required_v2": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle.", + "example": "never", + "enum": ["never", "before_resolution", "always"] + }, + "show_before_closure": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", + "example": true + }, + "show_before_creation": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", + "example": true + }, + "show_before_update": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident update modal.", + "example": true + }, + "show_in_announcement_post": { + "type": "boolean", + "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", + "example": true + } + }, + "example": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "name": "Affected Team", + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true + }, + "required": [ + "id", + "name", + "description", + "field_type", + "show_before_creation", + "show_before_closure", + "show_before_update", + "options", + "created_at", + "updated_at" + ] + }, + "CreateRequestBody3": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" + }, + "field_type": { + "type": "string", + "description": "Type of custom field", + "example": "single_select", + "enum": ["single_select", "multi_select", "text", "link", "numeric"] + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + } + }, + "example": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "name": "Affected Team" + }, + "required": [ + "id", + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" + ] + }, + "CreateRequestBody4": { + "type": "object", + "properties": { + "incident_id": { + "type": "string", + "description": "ID of the incident to add an attachment to", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "resource": { + "type": "object", + "properties": { + "external_id": { + "type": "string", + "description": "ID of the resource in the external system", + "example": "123" + }, + "resource_type": { + "type": "string", + "description": "E.g. PagerDuty: the external system that holds the resource", + "example": "pager_duty_incident", + "enum": [ + "pager_duty_incident", + "opsgenie_alert", + "datadog_monitor_alert", + "github_pull_request", + "gitlab_merge_request", + "sentry_issue", + "jira_issue", + "atlassian_statuspage_incident", + "zendesk_ticket", + "google_calendar_event", + "scrubbed", + "statuspage_incident" + ] + } + }, + "example": { + "external_id": "123", + "resource_type": "pager_duty_incident" + }, + "required": [ + "id", + "permalink", + "external_id", + "title", + "resource_type", + "resource_type_label", + "created_at", + "updated_at" + ] + } + }, + "example": { + "incident_id": "01FDAG4SAP5TYPT98WGR2N7W91", + "resource": { + "external_id": "123", + "resource_type": "pager_duty_incident" + } + }, + "required": ["incident_id", "resource"] + }, + "CreateRequestBody5": { + "type": "object", + "properties": { "incident_id": { "type": "string", - "description": "Unique identifier of the incident the action belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "status": { - "type": "string", - "description": "Status of the action", - "example": "outstanding", - "enum": [ - "outstanding", - "completed", - "deleted", - "not_doing" - ] + "example": "01ET65M7ZADYFCKD4K1AE2QNMC" }, - "updated_at": { + "user_id": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "example": "01FCQSP07Z74QMMYPDDGQB9FTG" } }, "example": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "incident_id": "01ET65M7ZADYFCKD4K1AE2QNMC", + "user_id": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "required": ["user_id", "incident_id"] + }, + "CreateRequestBody6": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "required": { + "type": "boolean", + "description": "DEPRECATED: this will always be false.", + "example": false + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 + } + }, + "example": { + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "shortform": "lead" }, "required": [ + "name", + "shortform", + "description", + "instructions", + "required", + "condition_groups", "id", - "incident_id", - "status", - "follow_up", + "role_type", "created_at", "updated_at" ] }, - "ActionV2": { + "CreateRequestBody7": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" - }, - "completed_at": { - "type": "string", - "description": "When the action was completed", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, "description": { "type": "string", - "description": "Description of the action", - "example": "Call the fire brigade" - }, - "id": { - "type": "string", - "description": "Unique identifier for the action", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "incident_id": { + "instructions": { "type": "string", - "description": "Unique identifier of the incident the action belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" }, - "status": { + "name": { "type": "string", - "description": "Status of the action", - "example": "outstanding", - "enum": [ - "outstanding", - "completed", - "deleted", - "not_doing" - ] + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 }, - "updated_at": { + "shortform": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 } }, "example": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "shortform": "lead" }, "required": [ - "id", - "incident_id", + "name", + "shortform", "description", - "status", + "instructions", + "condition_groups", + "id", + "role_type", "created_at", "updated_at" ] }, - "ActorV2": { + "CreateRequestBody8": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/APIKeyV2" + "category": { + "type": "string", + "description": "Whether the status should be considered 'live' (now renamed to active), 'learning' (now renamed to post-incident) or 'closed'. The triage and declined statuses cannot be created or modified.", + "example": "live", + "enum": ["live", "learning", "closed"] }, - "user": { - "$ref": "#/components/schemas/UserV1" + "description": { + "type": "string", + "description": "Rich text description of the incident status", + "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." + }, + "name": { + "type": "string", + "description": "Unique name of this status", + "example": "Closed" } }, "example": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } + "category": "live", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "name": "Closed" + }, + "required": [ + "name", + "description", + "category", + "id", + "rank", + "created_at", + "updated_at" + ] }, - "AllResponseBody": { + "CreateRequestBody9": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_created_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" + }, + "description": "Set the incident's custom fields to these values", + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } ] }, - "private_incident.action_created_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" - }, - "private_incident.action_updated_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" - }, - "private_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" - }, - "private_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "idempotency_key": { + "type": "string", + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" }, - "private_incident.incident_created_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ] }, - "private_incident.incident_updated_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "incident_type_id": { + "type": "string", + "description": "Incident type to create this incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "private_incident.membership_granted_v1": { - "$ref": "#/components/schemas/WebhookIncidentUserV2" + "mode": { + "type": "string", + "description": "Whether the incident is real or test", + "example": "real", + "enum": ["real", "test"] }, - "private_incident.membership_revoked_v1": { - "$ref": "#/components/schemas/WebhookIncidentUserV2" + "name": { + "type": "string", + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "public_incident.action_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "severity_id": { + "type": "string", + "description": "Severity to create incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "public_incident.action_updated_v1": { - "$ref": "#/components/schemas/ActionV1" + "slack_team_id": { + "type": "string", + "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", + "example": "T02A1FSLE8J" }, - "public_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "source_message_channel_id": { + "type": "string", + "description": "Channel ID of the source message, if this incident was created from one", + "example": "C02AW36C1M5" }, - "public_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/ActionV1" + "source_message_timestamp": { + "type": "string", + "description": "Timestamp of the source message, if this incident was created from one", + "example": "1653650280.526509" }, - "public_incident.incident_created_v2": { - "$ref": "#/components/schemas/IncidentV2" + "status": { + "type": "string", + "description": "Current status of the incident", + "example": "triage", + "enum": [ + "triage", + "investigating", + "fixing", + "monitoring", + "closed", + "declined" + ] }, - "public_incident.incident_status_updated_v2": { - "$ref": "#/components/schemas/IncidentWithStatusChangeV2" + "summary": { + "type": "string", + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." }, - "public_incident.incident_updated_v2": { - "$ref": "#/components/schemas/IncidentV2" + "visibility": { + "type": "string", + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": ["public", "private"] } }, "example": { - "event_type": "public_incident.incident_created_v2", - "private_incident.action_created_v1": { - "id": "abc123" - }, - "private_incident.action_updated_v1": { - "id": "abc123" - }, - "private_incident.follow_up_created_v1": { - "id": "abc123" - }, - "private_incident.follow_up_updated_v1": { - "id": "abc123" - }, - "private_incident.incident_created_v2": { - "id": "abc123" - }, - "private_incident.incident_updated_v2": { - "id": "abc123" - }, - "private_incident.membership_granted_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" - }, - "private_incident.membership_revoked_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" - }, - "public_incident.action_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "public_incident.action_updated_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "public_incident.follow_up_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "custom_field_entries": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ], + "idempotency_key": "alert-uuid", + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "mode": "real", + "name": "Our database is sad", + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "slack_team_id": "T02A1FSLE8J", + "source_message_channel_id": "C02AW36C1M5", + "source_message_timestamp": "1653650280.526509", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "visibility": "public" + }, + "required": ["idempotency_key", "visibility"] + }, + "CreateResponseBody": { + "type": "object", + "properties": { + "incident_attachment": { + "$ref": "#/components/schemas/IncidentAttachmentV1" + } + }, + "example": { + "incident_attachment": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } + } + }, + "required": ["incident_attachment"] + }, + "CreateResponseBody2": { + "type": "object", + "properties": { + "incident_membership": { + "$ref": "#/components/schemas/IncidentMembership" + } + }, + "example": { + "incident_membership": { "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "public_incident.follow_up_updated_v1": { - "assignee": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "updated_at": "2021-08-17T13:28:57.801578Z", + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" + } + } + }, + "required": ["incident_membership"] + }, + "CreateTypeRequestBody": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "public_incident.incident_created_v2": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + "color": { + "type": "string", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] + }, + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." + }, + "icon": { + "type": "string", + "description": "Sets the display icon of this type in the dashboard", + "example": "bolt", + "enum": [ + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "store", + "star", + "tag", + "user", + "users" + ] + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" + }, + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true + }, + "source_repo_url": { + "type": "string", + "description": "The url of the external repository where this type is managed", + "example": "https://github.com/my-company/incident-io-catalog" + }, + "type_name": { + "type": "string", + "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", + "example": "Custom[\"BackstageGroup\"]" + } + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "bolt", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]" + }, + "required": ["name", "description"] + }, + "CreateTypeResponseBody": { + "type": "object", + "properties": { + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" + } + }, + "example": { + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 - }, - "public_incident.incident_status_updated_v2": { - "incident": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" + "attribute_id": "abc123", + "attribute_name": "abc123" } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + ], + "type": "Custom[\"Service\"]" } ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + "version": 1 }, - "new_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["catalog_type"] + }, + "CreateWorkflowRequestBody": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" }, - "previous_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "additionalProperties": { + "type": "string", + "example": "abc123" } }, - "public_incident.incident_updated_v2": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "custom_field_entries": [ + "description": "List of conditions to apply to the workflow", + "example": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true + }, + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionPayloadV2" + }, + "description": "The expressions used in the workflow", + "example": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } - ] + } }, - "values": [ + "label": "Team Slack channel", + "operations": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] }, - "value_text": "This is my text field, I hope you like it" + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + ], + "reference": "abc123", + "root_reference": "incident.status" } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + ] + }, + "folder": { + "type": "string", + "description": "Folder to display the workflow in", + "example": "My folder 01" + }, + "include_private_incidents": { + "type": "boolean", + "description": "Whether to include private incidents", + "example": true + }, + "name": { + "type": "string", + "description": "The human-readable name of the workflow", + "example": "My workflow" + }, + "once_for": { + "type": "array", + "items": { + "type": "string", + "example": "incident.url" }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "description": "Once For strategy to apply to this workflow", + "example": ["incident.url"] + }, + "runs_on_incident_modes": { + "type": "array", + "items": { + "type": "string", + "example": "test", + "enum": ["standard", "test", "retrospective"] }, - "incident_timestamp_values": [ + "description": "Which modes of incident this should run on (defaults to just standard incidents)", + "example": ["standard", "retrospective"] + }, + "runs_on_incidents": { + "type": "string", + "description": "Which incidents should the workflow be applied to? (newly_created or newly_created_and_active)", + "example": "newly_created", + "enum": ["newly_created", "newly_created_and_active"] + }, + "state": { + "type": "string", + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", + "enum": ["active", "disabled", "draft", "error"] + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepConfigPayload" + }, + "description": "List of step to execute as part of the workflow", + "example": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + ] + }, + "trigger": { + "type": "string", + "description": "Trigger to set on the workflow", + "example": "incident.updated" } }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } + ], + "reference": "abc123", + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "include_private_incidents": true, + "name": "My workflow", + "once_for": ["incident.url"], + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": "incident.updated" + }, "required": [ - "event_type" + "name", + "trigger", + "once_for", + "condition_groups", + "steps", + "expressions", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents" ] }, - "AuditLogActorMetadataV2": { - "type": "object", - "properties": { - "api_key_roles": { - "type": "string", - "description": "The roles that the API key has, separated by commas (if it's an API key actor)", - "example": "abc123" - }, - "external_resource_external_id": { - "type": "string", - "description": "The ID of the external resource in the 3rd party system (if it's an external resource actor)", - "example": "q1234" - }, - "external_resource_type": { - "type": "string", - "description": "The type of the external resource (if it's an external resource actor)", - "example": "pager_duty_incident" - }, - "user_base_role_slug": { - "type": "string", - "description": "The base role slug of the user (if it's a user actor)", - "example": "admin" - }, - "user_custom_role_slugs": { - "type": "string", - "description": "The custom role slugs of the user, separated by commas (if it's a user actor)", - "example": "engineering,security" - } - }, - "example": { - "api_key_roles": "abc123", - "external_resource_external_id": "q1234", - "external_resource_type": "pager_duty_incident", - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - } - }, - "AuditLogActorV2": { + "CustomFieldEntryPayloadV1": { "type": "object", "properties": { - "id": { + "custom_field_id": { "type": "string", - "description": "The ID of the actor", + "description": "ID of the custom field this entry is linked against", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "metadata": { - "$ref": "#/components/schemas/AuditLogActorMetadataV2" - }, - "name": { - "type": "string", - "description": "The name of the actor", - "example": "John Doe" - }, - "type": { - "type": "string", - "description": "The type of actor", - "example": "user", - "enum": [ - "user", - "system", - "api_key", - "workflow", - "external_resource" + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValuePayloadV1" + }, + "description": "List of values to associate with this entry. Use an empty array to unset the value of the custom field.", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } ] } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "name": "John Doe", - "type": "user" + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] }, - "required": [ - "id", - "type" - ] + "required": ["custom_field_id", "values"] }, - "AuditLogEntryContextV2": { + "CustomFieldEntryV1": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The location of the actor that performed this action", - "example": "1.2.3.4" + "custom_field": { + "$ref": "#/components/schemas/CustomFieldTypeInfoV1" }, - "user_agent": { - "type": "string", - "description": "The user agent of the actor that performed this action", - "example": "Chrome/91.0.4472.114" + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValueV1" + }, + "description": "List of custom field values set on this entry", + "example": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] } }, "example": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "required": [ - "location" - ] - }, - "AuditLogPrivateIncidentAccessAttemptedMetadataV2": { - "type": "object", - "properties": { - "outcome": { - "type": "string", - "description": "Whether or not the user was able to access the private incident", - "example": "granted", - "enum": [ - "granted", - "denied" + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } ] - } + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] }, - "example": { - "outcome": "granted" - } + "required": ["custom_field", "values"] }, - "AuditLogTargetV2": { + "CustomFieldOptionV1": { "type": "object", "properties": { - "id": { + "custom_field_id": { "type": "string", - "description": "The ID of the target", + "description": "ID of the custom field this option belongs to", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "name": { + "id": { "type": "string", - "description": "The name of the target", - "example": "John Doe" + "description": "Unique identifier for the custom field option", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "type": { + "sort_key": { + "type": "integer", + "description": "Sort key used to order the custom field options correctly", + "default": 1000, + "example": 10, + "format": "int64" + }, + "value": { "type": "string", - "description": "The type of target", - "example": "user", - "enum": [ - "api_key", - "alert_route", - "alert_schema", - "alert_source", - "announcement_rule", - "catalog_type", - "custom_field", - "debrief_invite_rule", - "escalation_path", - "follow_up_priority", - "incident", - "incident_duration_metric", - "incident_role", - "incident_status", - "incident_timestamp", - "incident_type", - "integration", - "internal_status_page", - "nudge", - "policy", - "private_incident_membership", - "rbac_role", - "schedule", - "scim_group", - "severity", - "status_page", - "status_page_sub_page", - "status_page_template", - "user", - "workflow" - ] + "description": "Human readable name for the custom field option", + "example": "Product" } }, "example": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "John Doe", - "type": "user" + "sort_key": 10, + "value": "Product" }, - "required": [ - "id", - "type" - ] + "required": ["id", "custom_field_id", "value", "sort_key"] }, - "AuditLogUserRoleMembershipChangedMetadataV2": { + "CustomFieldTypeInfoV1": { "type": "object", "properties": { - "after_base_role_slug": { + "description": { "type": "string", - "description": "The base role slug of the user after their role memberships changed", - "example": "owner" + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" }, - "after_custom_role_slugs": { + "field_type": { "type": "string", - "description": "The custom role slugs of the user after their role memberships changed, separated by commas", - "example": "engineering,data" + "description": "Type of custom field", + "example": "single_select", + "enum": ["single_select", "multi_select", "text", "link", "numeric"] }, - "before_base_role_slug": { + "id": { "type": "string", - "description": "The base role slug of the user before their role memberships changed", - "example": "admin" + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "before_custom_role_slugs": { + "name": { "type": "string", - "description": "The custom role slugs of the user before their role memberships changed, separated by commas", - "example": "engineering,security" + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "description": "What options are available for this custom field, if this field has options", + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] } }, "example": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] }, "required": [ - "before_base_role_slug", - "before_custom_role_slugs", - "after_base_role_slug", - "after_custom_role_slugs" + "id", + "organisation_id", + "name", + "description", + "dynamic_options", + "rank", + "field_type", + "cannot_be_unset", + "options", + "is_usable", + "condition_groups", + "field_mode", + "created_at", + "updated_at" ] }, - "AuditLogUserSCIMGroupMappingChangedMetadataV2": { + "CustomFieldV1": { "type": "object", "properties": { - "after_base_role_slug": { + "catalog_type_id": { "type": "string", - "description": "The base role slug of this SCIM group after the mapping was changed (if any)", - "example": "owner" + "description": "For catalog fields, the ID of the associated catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "after_custom_role_slugs": { + "created_at": { "type": "string", - "description": "The custom role slugs of this SCIM group after the mapping was changed (if any), separated by commas", - "example": "engineering,data" + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "before_base_role_slug": { + "description": { "type": "string", - "description": "The base role slug assigned to this SCIM group before the mapping was changed (if any)", - "example": "admin" + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" }, - "before_custom_role_slugs": { - "type": "string", - "description": "The custom role slugs of this SCIM group before the mapping was changed (if any), separated by commas", - "example": "engineering,security" - } - }, - "example": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - } - }, - "CatalogEntryReferenceV2": { - "type": "object", - "properties": { - "archived_at": { + "field_type": { "type": "string", - "description": "When this entry was archived", - "example": "2021-08-17T14:28:57.801578Z", - "format": "date-time" + "description": "Type of custom field", + "example": "single_select", + "enum": ["single_select", "multi_select", "text", "link", "numeric"] }, - "catalog_entry_id": { + "id": { "type": "string", - "description": "ID of this catalog entry", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "catalog_entry_name": { + "name": { "type": "string", - "description": "The name of this entry", - "example": "Primary escalation" + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 }, - "catalog_type_id": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - }, - "example": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "required": [ - "catalog_type_id", - "catalog_entry_id", - "catalog_entry_name" - ] - }, - "CatalogEntryV2": { - "type": "object", - "properties": { - "aliases": { + "options": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/CustomFieldOptionV1" }, - "description": "Optional aliases that can be used to reference this entry", + "description": "What options are available for this custom field, if this field has options", "example": [ - "lawrence@incident.io", - "lawrence" + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } ] }, - "archived_at": { + "required": { "type": "string", - "description": "When this entry was archived", - "example": "2021-08-17T14:28:57.801578Z", - "format": "date-time" + "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", + "example": "never", + "enum": ["never", "before_closure", "always"] }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - ], - "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - } - }, - "additionalProperties": { - "$ref": "#/components/schemas/EngineParamBindingV2" + "required_v2": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle.", + "example": "never", + "enum": ["never", "before_resolution", "always"] + }, + "show_before_closure": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", + "example": true + }, + "show_before_creation": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", + "example": true + }, + "show_before_update": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident update modal.", + "example": true + }, + "show_in_announcement_post": { + "type": "boolean", + "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", + "example": true + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - }, + ], + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "name", + "description", + "field_type", + "show_before_creation", + "show_before_closure", + "show_before_update", + "options", + "created_at", + "updated_at" + ] + }, + "CustomFieldV2": { + "type": "object", + "properties": { "catalog_type_id": { "type": "string", - "description": "ID of this catalog type", + "description": "For catalog fields, the ID of the associated catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "created_at": { "type": "string", - "description": "When this entry was created", + "description": "When the action was created", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" }, - "external_id": { + "description": { "type": "string", - "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", - "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" + }, + "field_type": { + "type": "string", + "description": "Type of custom field", + "example": "single_select", + "enum": ["single_select", "multi_select", "text", "link", "numeric"] }, "id": { "type": "string", - "description": "ID of this catalog entry", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "name": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" - }, - "rank": { - "type": "integer", - "description": "When catalog type is ranked, this is used to help order things", - "example": 3, - "format": "int32" + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 }, "updated_at": { "type": "string", - "description": "When this entry was last updated", + "description": "When the action was last updated", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - ], - "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - } - }, "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, + "name": "Affected Team", "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ "id", - "catalog_type_id", "name", - "aliases", - "rank", - "attribute_values", + "description", + "field_type", + "cannot_be_unset", "created_at", "updated_at" ] }, - "CatalogResourceV2": { + "CustomFieldValuePayloadV1": { "type": "object", "properties": { - "category": { + "id": { "type": "string", - "description": "Which category of resource", - "example": "custom", - "enum": [ - "primitive", - "custom", - "external" - ] + "description": "Unique identifier for the custom field value", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "description": { + "value_catalog_entry_id": { "type": "string", - "description": "Human readable description for this resource", - "example": "Boolean true or false value" + "description": "ID of the catalog entry. You can also use an ExternalID or an Alias of the catalog entry.", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "label": { + "value_link": { "type": "string", - "description": "Label for this catalog resource type", - "example": "GitHub Repository" + "description": "If the custom field type is 'link', this will contain the value assigned.", + "example": "https://google.com/" }, - "type": { + "value_numeric": { "type": "string", - "description": "Catalog type name for this resource", - "example": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]" + "description": "If the custom field type is 'numeric', this will contain the value assigned.", + "example": "123.456" + }, + "value_option_id": { + "type": "string", + "description": "ID of the custom field option", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "value_text": { + "type": "string", + "description": "If the custom field type is 'text', this will contain the value assigned.", + "example": "This is my text field, I hope you like it" + }, + "value_timestamp": { + "type": "string", + "description": "Deprecated: please use incident timestamp values instead", + "example": "" + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + }, + "CustomFieldValueV1": { + "type": "object", + "properties": { + "value_catalog_entry": { + "$ref": "#/components/schemas/EmbeddedCatalogEntryV1" + }, + "value_link": { + "type": "string", + "description": "If the custom field type is 'link', this will contain the value assigned.", + "example": "https://google.com/" + }, + "value_numeric": { + "type": "string", + "description": "If the custom field type is 'numeric', this will contain the value assigned.", + "example": "123.456" + }, + "value_option": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "value_text": { + "type": "string", + "description": "If the custom field type is 'text', this will contain the value assigned.", + "example": "This is my text field, I hope you like it" + } + }, + "example": { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + }, + "EditRequestBody": { + "type": "object", + "properties": { + "incident": { + "$ref": "#/components/schemas/IncidentEditPayloadV2" + }, + "notify_incident_channel": { + "type": "boolean", + "description": "Should we send Slack channel notifications to inform responders of this update? Note that this won't work if the Slack channel has already been archived.", + "example": true + } + }, + "example": { + "incident": { + "call_url": "https://zoom.us/foo", + "custom_field_entries": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ], + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_status_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "incident_timestamp_values": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ], + "name": "Our database is sad", + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "summary": "Our database is really really sad, and we don't know why yet." }, - "value_docstring": { - "type": "string", - "description": "Documentation for the literal string value of this resource", - "example": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" - } - }, - "example": { - "category": "custom", - "description": "Boolean true or false value", - "label": "GitHub Repository", - "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", - "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + "notify_incident_channel": true }, - "required": [ - "type", - "label", - "description", - "value_docstring", - "category", - "config", - "is_user_link" - ] + "required": ["incident", "notify_incident_channel"] }, - "CatalogTypeAttributePayloadV2": { + "EmbeddedCatalogEntryV1": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "Whether this attribute is an array", - "example": false + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": ["lawrence@incident.io", "lawrence"] }, - "backlink_attribute": { + "external_id": { "type": "string", - "description": "The attribute to use (if this is a backlink)", - "example": "abc123" + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" }, "id": { "type": "string", - "description": "The ID of this attribute", - "example": "01GW2G3V0S59R238FAHPDS1R66" - }, - "mode": { - "type": "string", - "description": "Controls how this attribute is modified", - "example": "manual", - "enum": [ - "", - "manual", - "external", - "internal", - "dynamic", - "backlink" - ] + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "name": { "type": "string", - "description": "Unique name of this attribute", - "example": "tier" - }, - "type": { - "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" } }, "example": { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" }, - "required": [ - "name", - "type", - "array" - ] + "required": ["id", "name", "catalog_type_id"] }, - "CatalogTypeAttributeV2": { + "EngineParamBindingPayloadV2": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "Whether this attribute is an array", - "example": false - }, - "backlink_attribute": { - "type": "string", - "description": "The attribute to use (if this is a backlink)", - "example": "abc123" - }, - "id": { - "type": "string", - "description": "The ID of this attribute", - "example": "01GW2G3V0S59R238FAHPDS1R66" - }, - "mode": { - "type": "string", - "description": "Controls how this attribute is modified", - "example": "manual", - "enum": [ - "", - "manual", - "external", - "internal", - "dynamic", - "backlink" + "array_value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" + }, + "description": "If set, this is the array value of the step parameter", + "example": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } ] }, - "name": { - "type": "string", - "description": "Unique name of this attribute", - "example": "tier" - }, - "type": { - "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "value": { + "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" } }, "example": { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" - }, - "required": [ - "id", - "mode", - "name", - "type", - "array" - ] + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "CatalogTypeSchemaV2": { + "EngineParamBindingV2": { "type": "object", "properties": { - "attributes": { + "array_value": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeAttributeV2" + "$ref": "#/components/schemas/EngineParamBindingValueV2" }, - "description": "Attributes of this catalog type", + "description": "If array_value is set, this helps render the values", "example": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ] }, - "version": { - "type": "integer", - "description": "The version number of this schema", - "example": 1, - "format": "int64" + "value": { + "$ref": "#/components/schemas/EngineParamBindingValueV2" } }, "example": { - "attributes": [ + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "version": 1 - }, - "required": [ - "attributes", - "version" - ] + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "CatalogTypeV2": { + "EngineParamBindingValuePayloadV2": { "type": "object", "properties": { - "annotations": { - "type": "object", - "description": "Annotations that can track metadata about this type", - "example": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "additionalProperties": { - "type": "string", - "example": "abc123" - } - }, - "color": { - "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "yellow", - "enum": [ - "yellow", - "green", - "blue", - "violet", - "pink", - "cyan", - "orange" - ] - }, - "created_at": { - "type": "string", - "description": "When this type was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Human readble description of this type", - "example": "Represents Kubernetes clusters that we run inside of GKE." - }, - "dynamic_resource_parameter": { + "literal": { "type": "string", - "description": "If this is a dynamic catalog type, this will be the unique parameter for identitfying this resource externally.", - "example": "abc123" - }, - "estimated_count": { - "type": "integer", - "description": "If populated, gives an estimated count of entries for this type", - "example": 7, - "format": "int64" + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" }, - "icon": { + "reference": { "type": "string", - "description": "Sets the display icon of this type in the dashboard", - "example": "bolt", - "enum": [ - "bolt", - "box", - "briefcase", - "browser", - "bulb", - "calendar", - "clock", - "cog", - "components", - "database", - "doc", - "email", - "files", - "flag", - "folder", - "globe", - "money", - "server", - "severity", - "store", - "star", - "tag", - "user", - "users" - ] + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" + } + }, + "example": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "EngineParamBindingValueV2": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Human readable label to be displayed for user to select", + "example": "Lawrence Jones" }, - "id": { + "literal": { "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" }, - "is_editable": { + "reference": { + "type": "string", + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" + } + }, + "example": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + }, + "required": ["label"] + }, + "EngineReferenceV2": { + "type": "object", + "properties": { + "array": { "type": "boolean", - "description": "Catalog types that are synced with external resources can't be edited", + "description": "If true, the reference can refer to 0 to many items", "example": false }, - "last_synced_at": { + "key": { "type": "string", - "description": "When this type was last synced (if it's ever been sync'd)", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "The key of the field this is a reference to", + "example": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]" }, - "name": { + "label": { "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" - }, - "ranked": { - "type": "boolean", - "description": "If this type should be ranked", - "example": true + "description": "Human readable label for the field (with context)", + "example": "Incident -> Affected Team" }, - "registry_type": { + "type": { "type": "string", - "description": "The registry resource this type is synced from, if any", - "example": "PagerDutyService" - }, - "required_integrations": { + "description": "The type of this resource in the engine", + "example": "IncidentSeverity" + } + }, + "example": { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + }, + "required": [ + "key", + "label", + "type", + "array", + "node_label", + "hide_filter" + ] + }, + "ExpressionBranchPayloadV2": { + "type": "object", + "properties": { + "condition_groups": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "description": "If populated, the integrations required for this type", + "description": "When one of these condition groups are satisfied, this branch will be evaluated", "example": [ - "pager_duty" + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } ] }, - "schema": { - "$ref": "#/components/schemas/CatalogTypeSchemaV2" - }, - "semantic_type": { - "type": "string", - "description": "Semantic type of this resource (unused)", - "example": "custom" - }, - "source_repo_url": { - "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/my-company/incident-io-catalog" - }, - "type_name": { - "type": "string", - "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", - "example": "Custom[\"BackstageGroup\"]" - }, - "updated_at": { - "type": "string", - "description": "When this type was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "result": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" } }, "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "required": ["condition_groups", "result"] + }, + "ExpressionBranchV2": { + "type": "object", + "properties": { + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "When one of these condition groups are satisfied, this branch will be evaluated", + "example": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" + "result": { + "$ref": "#/components/schemas/EngineParamBindingV2" + } + }, + "example": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } ], - "schema": { - "attributes": [ + "result": { + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "version": 1 - }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "required": [ - "id", - "name", - "description", - "type_name", - "semantic_type", - "ranked", - "schema", - "icon", - "color", - "is_editable", - "annotations", - "created_at", - "updated_at", - "mode" - ] + "required": ["condition_groups", "result"] }, - "CreateEntryRequestBody": { + "ExpressionBranchesOptsPayloadV2": { "type": "object", "properties": { - "aliases": { + "branches": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/ExpressionBranchPayloadV2" }, - "description": "Optional aliases that can be used to reference this entry", + "description": "The branches to apply for this operation", "example": [ - "lawrence@incident.io", - "lawrence" - ] - }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ + { + "condition_groups": [ { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { "literal": "SEV123", "reference": "incident.severity" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" } } - }, - "additionalProperties": { - "$ref": "#/components/schemas/EngineParamBindingPayloadV2" - } - }, - "catalog_type_id": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "external_id": { - "type": "string", - "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", - "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" - }, - "name": { - "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + ] }, - "rank": { - "type": "integer", - "description": "When catalog type is ranked, this is used to help order things", - "example": 3, - "format": "int32" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ + "branches": [ + { + "condition_groups": [ { - "literal": "SEV123", - "reference": "incident.severity" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] } ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "name": "Primary On-call", - "rank": 3 - }, - "required": [ - "catalog_type_id", - "name", - "attribute_values" - ] - }, - "CreateEntryResponseBody": { - "type": "object", - "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryV2" - } - }, - "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { + "result": { "array_value": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "reference": "incident.severity" } ], "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "reference": "incident.severity" } } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" } }, - "required": [ - "catalog_entry" - ] + "required": ["branches", "returns"] }, - "CreateHTTPRequestBody": { + "ExpressionBranchesOptsV2": { "type": "object", "properties": { - "deduplication_key": { - "type": "string", - "description": "A deduplication key can be provided to uniquely reference this alert from your alert source. If you send an event with the same deduplication_key multiple times, only one alert will be created in incident.io for this alert source config.", - "example": "4293868629" - }, - "description": { - "type": "string", - "description": "Description that optionally adds more detail to title ", - "example": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix..." - }, - "metadata": { - "type": "object", - "description": "Any additional metadata that you've configured your alert source to parse", - "example": { - "service": "hello.world.com", - "team": [ - "my-team" - ] + "branches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionBranchV2" }, - "additionalProperties": true - }, - "source_url": { - "type": "string", - "description": "If applicable, a link to the alert in the upstream system", - "example": "https://www.my-alerting-platform.com/alerts/my-alert-123" - }, - "status": { - "type": "string", - "description": "Current status of this alert", - "example": "firing", - "enum": [ - "firing", - "resolved" - ] - }, - "title": { - "type": "string", - "description": "Alert title which is used when summarising the alert", - "example": "*errors.withMessage: PG::Error failed to connect" - } - }, - "example": { - "deduplication_key": "4293868629", - "description": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", - "metadata": { - "service": "hello.world.com", - "team": [ - "my-team" + "description": "The branches to apply for this operation", + "example": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } ] }, - "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", - "status": "firing", - "title": "*errors.withMessage: PG::Error failed to connect" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" + } }, - "required": [ - "title", - "status" - ] + "example": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "required": ["branches", "returns"] }, - "CreateHTTPResponseBody": { + "ExpressionElseBranchPayloadV2": { "type": "object", "properties": { - "deduplication_key": { - "type": "string", - "description": "The deduplication key that the event has been processed with", - "example": "unique-key", - "enum": [ - "unique-key" - ] - }, - "message": { - "type": "string", - "description": "Human readable message giving detail about the event", - "example": "Event accepted for processing", - "enum": [ - "Event accepted for processing" - ] - }, - "status": { - "type": "string", - "description": "Status of the event", - "example": "success", - "enum": [ - "success" - ] + "result": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" } }, "example": { - "deduplication_key": "unique-key", - "message": "Event accepted for processing", - "status": "success" + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "required": [ - "status", - "message", - "deduplication_key" - ] + "required": ["result"] }, - "CreateRequestBody": { + "ExpressionElseBranchV2": { "type": "object", "properties": { - "custom_field_id": { - "type": "string", - "description": "ID of the custom field this option belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "sort_key": { - "type": "integer", - "description": "Sort key used to order the custom field options correctly", - "default": 1000, - "example": 10, - "format": "int64" - }, - "value": { - "type": "string", - "description": "Human readable name for the custom field option", - "example": "Product" + "result": { + "$ref": "#/components/schemas/EngineParamBindingV2" } }, "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "required": [ - "custom_field_id", - "value" - ] + "required": ["result"] }, - "CreateRequestBody10": { + "ExpressionFilterOptsPayloadV2": { "type": "object", "properties": { - "custom_field_entries": { + "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "description": "Set the incident's custom fields to these values", + "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "conditions": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } ] } ] - }, - "id": { - "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - "idempotency_key": { - "type": "string", - "description": "Unique string used to de-duplicate incident create requests", - "example": "alert-uuid" - }, - "incident_role_assignments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" - }, - "description": "Assign incident roles to these people", - "example": [ - { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - ] - }, - "incident_status_id": { - "type": "string", - "description": "Incident status to assign to the incident", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - }, - "incident_timestamp_values": { + } + }, + "example": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "required": ["condition_groups"] + }, + "ExpressionFilterOptsV2": { + "type": "object", + "properties": { + "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + "$ref": "#/components/schemas/ConditionGroupV2" }, - "description": "Assign the incident's timestamps to these values", + "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", "example": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "incident_type_id": { - "type": "string", - "description": "Incident type to create this incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "mode": { - "type": "string", - "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", - "example": "standard", - "enum": [ - "standard", - "retrospective", - "test", - "tutorial" - ] - }, - "name": { - "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" - }, - "retrospective_incident_options": { - "$ref": "#/components/schemas/RetrospectiveIncidentOptionsV2" - }, - "severity_id": { - "type": "string", - "description": "Severity to create incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "slack_channel_name_override": { - "type": "string", - "description": "Name of the Slack channel to create for this incident", - "example": "inc-123-database-down" - }, - "slack_team_id": { - "type": "string", - "description": "Slack Team to create the incident in", - "example": "T02A1FSLE8J" - }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." - }, - "visibility": { - "type": "string", - "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", - "example": "public", - "enum": [ - "public", - "private" + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } ] } }, "example": { - "custom_field_entries": [ + "condition_groups": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "conditions": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "idempotency_key": "alert-uuid", - "incident_role_assignments": [ - { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - ], - "incident_status_id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "incident_timestamp_values": [ - { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" - } - ], - "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "mode": "standard", - "name": "Our database is sad", - "retrospective_incident_options": { - "slack_channel_id": "abc123" - }, - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "slack_channel_name_override": "inc-123-database-down", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "visibility": "public" + ] }, - "required": [ - "idempotency_key", - "visibility" - ] + "required": ["condition_groups"] }, - "CreateRequestBody11": { + "ExpressionNavigateOptsPayloadV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the severity", - "example": "Issues with **low impact**." - }, - "name": { + "reference": { "type": "string", - "description": "Human readable name of the severity", - "example": "Minor", - "maxLength": 50 - }, - "rank": { - "type": "integer", - "description": "Rank to help sort severities (lower numbers are less severe)", - "example": 1, - "format": "int64" + "description": "The reference that you want to navigate to", + "example": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" } }, "example": { - "description": "Issues with **low impact**.", - "name": "Minor", - "rank": 1 + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" }, - "required": [ - "name", - "description" - ] + "required": ["reference"] }, - "CreateRequestBody2": { + "ExpressionNavigateOptsV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" - }, - "field_type": { - "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" - ] - }, - "name": { - "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 - }, - "required": { + "reference": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" - ] + "description": "The reference within the scope to navigate to", + "example": "1235" }, - "required_v2": { + "reference_label": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle.", - "example": "never", - "enum": [ - "never", - "before_resolution", - "always" - ] - }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", - "example": true - }, - "show_before_creation": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", - "example": true - }, - "show_before_update": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident update modal.", - "example": true - }, - "show_in_announcement_post": { - "type": "boolean", - "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", - "example": true + "description": "The name of the reference to navigate to", + "example": "Teams" } }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "name": "Affected Team", - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true + "reference": "1235", + "reference_label": "Teams" }, - "required": [ - "id", - "name", - "description", - "field_type", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" - ] + "required": ["reference", "reference_label"] }, - "CreateRequestBody3": { + "ExpressionOperationPayloadV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" + "branches": { + "$ref": "#/components/schemas/ExpressionBranchesOptsPayloadV2" }, - "field_type": { + "filter": { + "$ref": "#/components/schemas/ExpressionFilterOptsPayloadV2" + }, + "navigate": { + "$ref": "#/components/schemas/ExpressionNavigateOptsPayloadV2" + }, + "operation_type": { "type": "string", - "description": "Type of custom field", - "example": "single_select", + "description": "The type of the operation", + "example": "navigate", "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" + "navigate", + "filter", + "count", + "min", + "max", + "random", + "first", + "parse", + "branches" ] }, - "name": { - "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "parse": { + "$ref": "#/components/schemas/ExpressionParseOptsV2" } }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "name": "Affected Team" - }, - "required": [ - "id", - "name", - "description", - "field_type", - "cannot_be_unset", - "created_at", - "updated_at" - ] - }, - "CreateRequestBody4": { - "type": "object", - "properties": { - "incident_id": { - "type": "string", - "description": "ID of the incident to add an attachment to", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - "resource": { - "type": "object", - "properties": { - "external_id": { - "type": "string", - "description": "ID of the resource in the external system", - "example": "123" - }, - "resource_type": { - "type": "string", - "description": "E.g. PagerDuty: the external system that holds the resource", - "example": "pager_duty_incident", - "enum": [ - "pager_duty_incident", - "opsgenie_alert", - "datadog_monitor_alert", - "github_pull_request", - "gitlab_merge_request", - "sentry_issue", - "atlassian_statuspage_incident", - "zendesk_ticket", - "google_calendar_event", - "scrubbed", - "statuspage_incident" + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } ] } - }, - "example": { - "external_id": "123", - "resource_type": "pager_duty_incident" - }, - "required": [ - "id", - "permalink", - "external_id", - "title", - "resource_type", - "resource_type_label", - "created_at", - "updated_at" ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" } }, - "example": { - "incident_id": "01FDAG4SAP5TYPT98WGR2N7W91", - "resource": { - "external_id": "123", - "resource_type": "pager_duty_incident" - } - }, - "required": [ - "incident_id", - "resource" - ] + "required": ["operation_type", "returns"] }, - "CreateRequestBody5": { + "ExpressionOperationV2": { "type": "object", "properties": { - "incident_id": { - "type": "string", - "example": "01ET65M7ZADYFCKD4K1AE2QNMC" + "branches": { + "$ref": "#/components/schemas/ExpressionBranchesOptsV2" }, - "user_id": { + "filter": { + "$ref": "#/components/schemas/ExpressionFilterOptsV2" + }, + "navigate": { + "$ref": "#/components/schemas/ExpressionNavigateOptsV2" + }, + "operation_type": { "type": "string", - "example": "01FCQSP07Z74QMMYPDDGQB9FTG" + "description": "The type of the operation", + "example": "navigate", + "enum": [ + "navigate", + "filter", + "count", + "min", + "max", + "random", + "first", + "parse", + "branches" + ] + }, + "parse": { + "$ref": "#/components/schemas/ExpressionParseOptsV2" + }, + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" } }, "example": { - "incident_id": "01ET65M7ZADYFCKD4K1AE2QNMC", - "user_id": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, - "required": [ - "user_id", - "incident_id" - ] - }, - "CreateRequestBody6": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "navigate": { + "reference": "1235", + "reference_label": "Teams" }, - "required": { - "type": "boolean", - "description": "DEPRECATED: this will always be false.", - "example": false + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 + "returns": { + "array": true, + "type": "IncidentStatus" } }, - "example": { - "description": "The person currently coordinating the incident", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "shortform": "lead" - }, - "required": [ - "name", - "shortform", - "description", - "instructions", - "required", - "conditions", - "id", - "role_type", - "created_at", - "updated_at" - ] + "required": ["operation_type", "returns"] }, - "CreateRequestBody7": { + "ExpressionParseOptsV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 - }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" - }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" }, - "shortform": { + "source": { "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 + "description": "Source expression that is evaluated to a result", + "example": "metadata.annotations[\"github.com/repo\"]" } }, "example": { - "description": "The person currently coordinating the incident", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "shortform": "lead" + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" }, - "required": [ - "name", - "shortform", - "description", - "instructions", - "conditions", - "id", - "role_type", - "created_at", - "updated_at" - ] + "required": ["source", "returns"] }, - "CreateRequestBody8": { + "ExpressionPayloadV2": { "type": "object", "properties": { - "category": { + "else_branch": { + "$ref": "#/components/schemas/ExpressionElseBranchPayloadV2" + }, + "label": { "type": "string", - "description": "Whether the status should be considered 'live' (now renamed to active), 'learning' (now renamed to post-incident) or 'closed'. The triage and declined statuses cannot be created or modified.", - "example": "live", - "enum": [ - "live", - "learning", - "closed" + "description": "The human readable label of the expression", + "example": "Team Slack channel" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionOperationPayloadV2" + }, + "example": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } ] }, - "description": { + "reference": { "type": "string", - "description": "Rich text description of the incident status", - "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." + "description": "A short ID that can be used to reference the expression", + "example": "abc123" }, - "name": { + "root_reference": { "type": "string", - "description": "Unique name of this status", - "example": "Closed" + "description": "The root reference for this expression (i.e. where the expression starts)", + "example": "incident.status" } }, "example": { - "category": "live", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "name": "Closed" - }, - "required": [ - "name", - "description", - "category", - "id", - "rank", - "created_at", - "updated_at" - ] - }, - "CreateRequestBody9": { - "type": "object", - "properties": { - "custom_field_entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" - }, - "description": "Set the incident's custom fields to these values", - "example": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] } ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" } - ] + } + ], + "reference": "abc123", + "root_reference": "incident.status" + }, + "required": ["label", "reference", "root_reference", "operations"] + }, + "ExpressionV2": { + "type": "object", + "properties": { + "else_branch": { + "$ref": "#/components/schemas/ExpressionElseBranchV2" }, - "idempotency_key": { + "label": { "type": "string", - "description": "Unique string used to de-duplicate incident create requests", - "example": "alert-uuid" + "description": "The human readable label of the expression", + "example": "Team Slack channel" }, - "incident_role_assignments": { + "operations": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" + "$ref": "#/components/schemas/ExpressionOperationV2" }, - "description": "Assign incident roles to these people", "example": [ { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } } ] }, - "incident_type_id": { - "type": "string", - "description": "Incident type to create this incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "mode": { - "type": "string", - "description": "Whether the incident is real or test", - "example": "real", - "enum": [ - "real", - "test" - ] - }, - "name": { - "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" - }, - "severity_id": { - "type": "string", - "description": "Severity to create incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "slack_team_id": { - "type": "string", - "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", - "example": "T02A1FSLE8J" - }, - "source_message_channel_id": { - "type": "string", - "description": "Channel ID of the source message, if this incident was created from one", - "example": "C02AW36C1M5" - }, - "source_message_timestamp": { - "type": "string", - "description": "Timestamp of the source message, if this incident was created from one", - "example": "1653650280.526509" - }, - "status": { + "reference": { "type": "string", - "description": "Current status of the incident", - "example": "triage", - "enum": [ - "triage", - "investigating", - "fixing", - "monitoring", - "closed", - "declined" - ] + "description": "A short ID that can be used to reference the expression", + "example": "abc123" }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" }, - "visibility": { + "root_reference": { "type": "string", - "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", - "example": "public", - "enum": [ - "public", - "private" - ] + "description": "The root reference for this expression (i.e. where the expression starts)", + "example": "incident.status" } }, "example": { - "custom_field_entries": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "else_branch": { + "result": { + "array_value": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" } - ] - } - ], - "idempotency_key": "alert-uuid", - "incident_role_assignments": [ - { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } } ], - "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "mode": "real", - "name": "Our database is sad", - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "slack_team_id": "T02A1FSLE8J", - "source_message_channel_id": "C02AW36C1M5", - "source_message_timestamp": "1653650280.526509", - "status": "triage", - "summary": "Our database is really really sad, and we don't know why yet.", - "visibility": "public" + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" }, "required": [ - "idempotency_key", - "visibility" + "label", + "reference", + "returns", + "root_reference", + "operations", + "id" ] }, - "CreateResponseBody": { + "ExternalIssueReferenceV1": { "type": "object", "properties": { - "incident_attachment": { - "$ref": "#/components/schemas/IncidentAttachmentV1" + "issue_name": { + "type": "string", + "description": "Human readable ID for the issue", + "example": "INC-123" + }, + "issue_permalink": { + "type": "string", + "description": "URL linking directly to the action in the issue tracker", + "example": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up" + }, + "provider": { + "type": "string", + "description": "ID of the issue tracker provider", + "example": "asana", + "enum": [ + "asana", + "click_up", + "linear", + "jira", + "jira_server", + "github", + "gitlab", + "shortcut" + ] } }, "example": { - "incident_attachment": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "resource": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" - } - } - }, - "required": [ - "incident_attachment" - ] + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + } }, - "CreateResponseBody2": { + "ExternalIssueReferenceV2": { "type": "object", "properties": { - "incident_membership": { - "$ref": "#/components/schemas/IncidentMembership" + "issue_name": { + "type": "string", + "description": "Human readable ID for the issue", + "example": "INC-123" + }, + "issue_permalink": { + "type": "string", + "description": "URL linking directly to the action in the issue tracker", + "example": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up" + }, + "provider": { + "type": "string", + "description": "ID of the issue tracker provider", + "example": "asana", + "enum": [ + "asana", + "click_up", + "linear", + "jira", + "jira_server", + "github", + "gitlab", + "shortcut" + ] } }, "example": { - "incident_membership": { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "updated_at": "2021-08-17T13:28:57.801578Z", - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" }, "required": [ - "incident_membership" + "provider", + "provider_instance_id", + "issue_name", + "issue_permalink", + "issue_id" ] }, - "CreateTypeRequestBody": { + "ExternalResourceV1": { "type": "object", "properties": { - "annotations": { - "type": "object", - "description": "Annotations that can track metadata about this type", - "example": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "additionalProperties": { - "type": "string", - "example": "abc123" - } - }, - "color": { + "external_id": { "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "yellow", - "enum": [ - "yellow", - "green", - "blue", - "violet", - "pink", - "cyan", - "orange" - ] + "description": "ID of the resource in the external system", + "example": "123" }, - "description": { + "permalink": { "type": "string", - "description": "Human readble description of this type", - "example": "Represents Kubernetes clusters that we run inside of GKE." + "description": "URL of the resource", + "example": "https://my.pagerduty.com/incidents/ABC" }, - "icon": { + "resource_type": { "type": "string", - "description": "Sets the display icon of this type in the dashboard", - "example": "bolt", + "description": "E.g. PagerDuty: the external system that holds the resource", + "example": "pager_duty_incident", "enum": [ - "bolt", - "box", - "briefcase", - "browser", - "bulb", - "calendar", - "clock", - "cog", - "components", - "database", - "doc", - "email", - "files", - "flag", - "folder", - "globe", - "money", - "server", - "severity", - "store", - "star", - "tag", - "user", - "users" + "pager_duty_incident", + "opsgenie_alert", + "datadog_monitor_alert", + "github_pull_request", + "gitlab_merge_request", + "sentry_issue", + "jira_issue", + "atlassian_statuspage_incident", + "zendesk_ticket", + "google_calendar_event", + "scrubbed", + "statuspage_incident" ] }, - "name": { - "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" - }, - "ranked": { - "type": "boolean", - "description": "If this type should be ranked", - "example": true - }, - "source_repo_url": { - "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/my-company/incident-io-catalog" - }, - "type_name": { + "title": { "type": "string", - "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", - "example": "Custom[\"BackstageGroup\"]" + "description": "Title of resource", + "example": "The database has gone down" } }, "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "icon": "bolt", - "name": "Kubernetes Cluster", - "ranked": true, - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]" + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" }, "required": [ - "name", - "description" + "id", + "permalink", + "external_id", + "title", + "resource_type", + "resource_type_label", + "created_at", + "updated_at" ] }, - "CreateTypeResponseBody": { + "FollowUpPriorityV2": { "type": "object", "properties": { - "catalog_type": { - "$ref": "#/components/schemas/CatalogTypeV2" + "description": { + "type": "string", + "description": "Description of the follow-up priority option", + "example": "A follow-up that requires immediate attention." + }, + "id": { + "type": "string", + "description": "Unique identifier for the follow-up priority option", + "example": "01GNW4BAQ7XRMFF6FHKNXDFPRW" + }, + "name": { + "type": "string", + "description": "Name of the follow-up priority option", + "example": "Urgent" + }, + "rank": { + "type": "integer", + "description": "Rank is used to order the follow-up priority options correctly", + "example": 10, + "format": "int64" } }, "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 }, - "required": [ - "catalog_type" - ] + "required": ["id", "name", "rank"] }, - "CustomFieldEntryPayloadV1": { + "FollowUpV2": { "type": "object", "properties": { - "custom_field_id": { + "assignee": { + "$ref": "#/components/schemas/UserV1" + }, + "completed_at": { "type": "string", - "description": "ID of the custom field this entry is linked against", + "description": "When the follow-up was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "created_at": { + "type": "string", + "description": "When the follow-up was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Description of the follow-up", + "example": "Call the fire brigade" + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, + "id": { + "type": "string", + "description": "Unique identifier for the follow-up", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldValuePayloadV1" - }, - "description": "List of values to associate with this entry. Use an empty array to unset the value of the custom field.", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" - } - ] + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident the follow-up belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "priority": { + "$ref": "#/components/schemas/FollowUpPriorityV2" + }, + "status": { + "type": "string", + "description": "Status of the follow-up", + "example": "outstanding", + "enum": ["outstanding", "completed", "deleted", "not_doing"] + }, + "title": { + "type": "string", + "description": "Title of the follow-up", + "example": "Cat is stuck in the tree" + }, + "updated_at": { + "type": "string", + "description": "When the follow-up was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" - } - ] + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ - "custom_field_id", - "values" + "id", + "incident_id", + "title", + "status", + "created_at", + "updated_at" ] }, - "CustomFieldEntryV1": { + "IdentityResponseBody": { "type": "object", "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldTypeInfoV1" - }, - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldValueV1" - }, - "description": "List of custom field values set on this entry", - "example": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] + "identity": { + "$ref": "#/components/schemas/IdentityV1" } }, "example": { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] + "identity": { + "dashboard_url": "https://app.incident.io/my-org", + "name": "Alertmanager token", + "roles": ["incident_creator"] + } }, - "required": [ - "custom_field", - "values" - ] + "required": ["identity"] }, - "CustomFieldOptionV1": { + "IdentityV1": { "type": "object", "properties": { - "custom_field_id": { + "dashboard_url": { "type": "string", - "description": "ID of the custom field this option belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The dashboard URL for this organisation", + "example": "https://app.incident.io/my-org" }, - "id": { + "name": { "type": "string", - "description": "Unique identifier for the custom field option", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The name assigned to the current API Key", + "example": "Alertmanager token" }, - "sort_key": { - "type": "integer", - "description": "Sort key used to order the custom field options correctly", - "default": 1000, - "example": 10, - "format": "int64" + "roles": { + "type": "array", + "items": { + "type": "string", + "example": "incident_creator", + "enum": [ + "viewer", + "incident_creator", + "incident_editor", + "manage_settings", + "global_access", + "catalog_viewer", + "catalog_editor", + "incident_memberships_editor", + "schedules_editor", + "schedules_reader", + "workflows_editor", + "private_workflows_editor" + ] + }, + "description": "Which roles have been enabled for this key", + "example": ["incident_creator"] + } + }, + "example": { + "dashboard_url": "https://app.incident.io/my-org", + "name": "Alertmanager token", + "roles": ["incident_creator"] + }, + "required": ["name", "roles", "dashboard_url"] + }, + "IncidentAttachmentV1": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of this incident membership", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "value": { + "incident_id": { "type": "string", - "description": "Human readable name for the custom field option", - "example": "Product" + "description": "Unique identifier of the incident", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + }, + "resource": { + "$ref": "#/components/schemas/ExternalResourceV1" } }, "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } }, "required": [ "id", - "custom_field_id", - "value", - "sort_key" + "organisation_id", + "incident_id", + "resource", + "creator", + "created_at" ] }, - "CustomFieldTypeInfoV1": { + "IncidentDurationMetricV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" - }, - "field_type": { - "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" - ] - }, "id": { "type": "string", - "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Unique ID of this incident duration metric", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, "name": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" - }, - "description": "What options are available for this custom field, if this field has options", - "example": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "description": "Unique name of this duration metric", + "example": "Lasted" } }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" }, "required": [ "id", - "organisation_id", "name", - "description", - "dynamic_options", "rank", - "field_type", - "cannot_be_unset", - "options", - "is_usable", - "conditions", - "field_mode", + "from_timestamp_id", + "to_timestamp_id", + "metric_type", + "calculation_mode", "created_at", - "updated_at" + "updated_at", + "validate" ] }, - "CustomFieldV1": { + "IncidentDurationMetricWithValueV2": { "type": "object", "properties": { - "catalog_type_id": { - "type": "string", - "description": "For catalog fields, the ID of the associated catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" - }, - "field_type": { - "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" - ] + "duration_metric": { + "$ref": "#/components/schemas/IncidentDurationMetricV2" }, - "id": { - "type": "string", - "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "value_seconds": { + "type": "integer", + "description": "The calculated durations for this metric", + "example": 1, + "format": "int64" + } + }, + "example": { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" }, - "name": { + "value_seconds": 1 + }, + "required": ["duration_metric"] + }, + "IncidentEditPayloadV2": { + "type": "object", + "properties": { + "call_url": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "description": "The call URL attached to this incident", + "example": "https://zoom.us/foo" }, - "options": { + "custom_field_entries": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" }, - "description": "What options are available for this custom field, if this field has options", + "description": "Set the incident's custom fields to these values", "example": [ { "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] } ] }, - "required": { - "type": "string", - "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } ] }, - "required_v2": { + "incident_status_id": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle.", - "example": "never", - "enum": [ - "never", - "before_resolution", - "always" - ] - }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", - "example": true + "description": "Incident status to change incident to (you can only change an incident from one active status to another, any other lifecycle changes must be taken via the app.)", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "show_before_creation": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", - "example": true + "incident_timestamp_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + }, + "description": "Assign the incident's timestamps to these values", + "example": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ] }, - "show_before_update": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident update modal.", - "example": true + "name": { + "type": "string", + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "show_in_announcement_post": { - "type": "boolean", - "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", - "example": true + "severity_id": { + "type": "string", + "description": "Severity to change incident to", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "updated_at": { + "summary": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." } }, "example": { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "call_url": "https://zoom.us/foo", + "custom_field_entries": [ { "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] } ], - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "id", - "name", - "description", - "field_type", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" - ] + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_status_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "incident_timestamp_values": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ], + "name": "Our database is sad", + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "summary": "Our database is really really sad, and we don't know why yet." + } }, - "CustomFieldV2": { + "IncidentMembership": { "type": "object", "properties": { - "catalog_type_id": { - "type": "string", - "description": "For catalog fields, the ID of the associated catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, "created_at": { "type": "string", - "description": "When the action was created", + "description": "When the membership was created", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" }, - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" - }, - "field_type": { - "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" - ] - }, "id": { "type": "string", - "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Unique identifier of this incident membership", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "name": { + "incident_id": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "description": "Unique identifier of the incident", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, "updated_at": { "type": "string", - "description": "When the action was last updated", + "description": "When the membership was last updated", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/UserV1" } }, "example": { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "updated_at": "2021-08-17T13:28:57.801578Z" + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "updated_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } }, - "required": [ - "id", - "name", - "description", - "field_type", - "cannot_be_unset", - "created_at", - "updated_at" - ] + "required": ["id", "user", "incident_id", "created_at", "updated_at"] }, - "CustomFieldValuePayloadV1": { + "IncidentRoleAssignmentPayloadV1": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the custom field value", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "value_catalog_entry_id": { - "type": "string", - "description": "ID of the catalog entry. You can also use an ExternalID or an Alias of the catalog entry.", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "value_link": { - "type": "string", - "description": "If the custom field type is 'link', this will contain the value assigned.", - "example": "https://google.com/" - }, - "value_numeric": { - "type": "string", - "description": "If the custom field type is 'numeric', this will contain the value assigned.", - "example": "123.456" - }, - "value_option_id": { - "type": "string", - "description": "ID of the custom field option", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "value_text": { - "type": "string", - "description": "If the custom field type is 'text', this will contain the value assigned.", - "example": "This is my text field, I hope you like it" + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV1" }, - "value_timestamp": { + "incident_role_id": { "type": "string", - "description": "Deprecated: please use incident timestamp values instead", - "example": "" + "description": "Unique ID of an incident role. Note that the 'reporter' role can only be assigned when creating an incident.", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" - } + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "required": ["incident_role_id", "assignee"] }, - "CustomFieldValueV1": { + "IncidentRoleAssignmentPayloadV2": { "type": "object", "properties": { - "value_catalog_entry": { - "$ref": "#/components/schemas/EmbeddedCatalogEntryV1" - }, - "value_link": { - "type": "string", - "description": "If the custom field type is 'link', this will contain the value assigned.", - "example": "https://google.com/" - }, - "value_numeric": { - "type": "string", - "description": "If the custom field type is 'numeric', this will contain the value assigned.", - "example": "123.456" - }, - "value_option": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV1" }, - "value_text": { + "incident_role_id": { "type": "string", - "description": "If the custom field type is 'text', this will contain the value assigned.", - "example": "This is my text field, I hope you like it" + "description": "Unique ID of an incident role", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" }, - "value_text": "This is my text field, I hope you like it" - } + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "required": ["incident_role_id"] }, - "EditRequestBody": { + "IncidentRoleAssignmentV1": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentEditPayloadV2" + "assignee": { + "$ref": "#/components/schemas/UserV1" }, - "notify_incident_channel": { - "type": "boolean", - "description": "Should we send Slack channel notifications to inform responders of this update? Note that this won't work if the Slack channel has already been archived.", - "example": true + "role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", - "custom_field_entries": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" - } - ] - } - ], - "incident_role_assignments": [ - { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - ], - "incident_status_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "incident_timestamp_values": [ - { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" - } - ], - "name": "Our database is sad", - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "summary": "Our database is really really sad, and we don't know why yet." + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "notify_incident_channel": true + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } }, - "required": [ - "incident", - "notify_incident_channel" - ] + "required": ["role"] }, - "EmbeddedCatalogEntryV1": { + "IncidentRoleV1": { "type": "object", "properties": { - "aliases": { - "type": "array", - "items": { - "type": "string", - "example": "abc123" - }, - "description": "Optional aliases that can be used to reference this entry", - "example": [ - "lawrence@incident.io", - "lawrence" - ] + "created_at": { + "type": "string", + "description": "When the role was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "external_id": { + "description": { "type": "string", - "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", - "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, "id": { "type": "string", - "description": "ID of this catalog entry", + "description": "Unique identifier for the role", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, "name": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "required": { + "type": "boolean", + "description": "DEPRECATED: this will always be false.", + "example": false + }, + "role_type": { + "type": "string", + "description": "Type of incident role", + "example": "lead", + "enum": ["lead", "reporter", "custom"] + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 + }, + "updated_at": { + "type": "string", + "description": "When the role was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ + "condition_groups", "id", "name", - "catalog_type_id" + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" ] }, - "EngineParamBindingPayloadV2": { + "IncidentRoleV2": { "type": "object", "properties": { - "array_value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" - }, - "description": "If set, this is the array value of the step parameter", - "example": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ] + "created_at": { + "type": "string", + "description": "When the role was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "value": { - "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" - } - }, - "example": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "EngineParamBindingV2": { - "type": "object", - "properties": { - "array_value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EngineParamBindingValueV2" - }, - "description": "If array_value is set, this helps render the values", - "example": [ - { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - ] + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "value": { - "$ref": "#/components/schemas/EngineParamBindingValueV2" - } - }, - "example": { - "array_value": [ - { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - ], - "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } - } - }, - "EngineParamBindingValuePayloadV2": { - "type": "object", - "properties": { - "literal": { + "id": { "type": "string", - "description": "If set, this is the literal value of the step parameter", - "example": "SEV123" + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "reference": { + "instructions": { "type": "string", - "description": "If set, this is the reference into the trigger scope that is the value of this parameter", - "example": "incident.severity" + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "role_type": { + "type": "string", + "description": "Type of incident role", + "example": "lead", + "enum": ["lead", "reporter", "custom"] + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 + }, + "updated_at": { + "type": "string", + "description": "When the role was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "literal": "SEV123", - "reference": "incident.severity" - } + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "condition_groups", + "id", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" + ] }, - "EngineParamBindingValueV2": { + "IncidentStatusV1": { "type": "object", "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryReferenceV2" - }, - "helptext": { + "category": { "type": "string", - "description": "Gives a description of the option to the user", - "example": "Collection of standalone automations like auto-closing incidents." + "description": "What category of status it is. All statuses apart from live (renamed in the app to Active) and learning (renamed in the app to Post-incident) are managed by incident.io and cannot be configured", + "example": "triage", + "enum": [ + "triage", + "declined", + "merged", + "canceled", + "live", + "learning", + "closed", + "paused" + ] }, - "image_url": { + "created_at": { "type": "string", - "description": "If appropriate, URL to an image that can be displayed alongside the option", - "example": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg" - }, - "is_image_slack_icon": { - "type": "boolean", - "description": "If true, the image_url is a Slack icon and should be displayed as such", - "example": false + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "label": { + "description": { "type": "string", - "description": "Human readable label to be displayed for user to select", - "example": "Lawrence Jones" + "description": "Rich text description of the incident status", + "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." }, - "literal": { + "id": { "type": "string", - "description": "If set, this is the literal value of the step parameter", - "example": "SEV123" + "description": "Unique ID of this incident status", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "reference": { + "name": { "type": "string", - "description": "If set, this is the reference into the trigger scope that is the value of this parameter", - "example": "incident.severity" + "description": "Unique name of this status", + "example": "Closed" }, - "sort_key": { - "type": "string", - "description": "Gives an indication of how to sort the options when displayed to the user", - "example": "000020" + "rank": { + "type": "integer", + "description": "Order of this incident status", + "example": 4, + "format": "int64" }, - "unavailable": { - "type": "boolean", - "description": "Unavailable is true if we've failed to build the value for this binding", - "example": false + "updated_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" + ] + }, + "IncidentTimestampV1": { + "type": "object", + "properties": { + "last_occurred_at": { + "type": "string", + "description": "When this last occurred, if it did", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "value": { + "name": { "type": "string", - "description": "Either the reference or the literal: this field is designed purely to make working with react-select easier", - "example": "abc123" + "description": "Name of the lifecycle event", + "example": "last_activity" } }, "example": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + }, + "required": ["name"] + }, + "IncidentTimestampV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID of this incident timestamp", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "name": { + "type": "string", + "description": "Unique name of this timestamp", + "example": "Impact started" + }, + "rank": { + "type": "integer", + "description": "Order in which this timestamp should be shown", + "example": 1, + "format": "int64" + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 }, "required": [ - "label", - "sort_key" + "id", + "name", + "description", + "rank", + "set_on_creation", + "set_on_acceptance", + "set_on_resolution", + "set_by_rules", + "timestamp_type", + "created_at", + "updated_at" ] }, - "ExternalIssueReferenceV1": { + "IncidentTimestampValuePayloadV2": { "type": "object", "properties": { - "issue_name": { + "incident_timestamp_id": { "type": "string", - "description": "Human readable ID for the issue", - "example": "INC-123" + "description": "The id of the incident timestamp that this incident timestamp value is associated with.", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "issue_permalink": { + "value": { "type": "string", - "description": "URL linking directly to the action in the issue tracker", - "example": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up" - }, - "provider": { + "description": "The current value of this timestamp, for this incident", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + }, + "required": ["incident_timestamp_id", "id", "incident_id", "created_at"] + }, + "IncidentTimestampValueV2": { + "type": "object", + "properties": { + "value": { "type": "string", - "description": "ID of the issue tracker provider", - "example": "asana", - "enum": [ - "asana", - "click_up", - "linear", - "jira", - "jira_server", - "github", - "gitlab", - "shortcut" - ] + "description": "The current value of this timestamp, for this incident", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "value": "2021-08-17T13:28:57.801578Z" + }, + "required": ["id", "incident_id", "incident_timestamp_id", "created_at"] + }, + "IncidentTimestampWithValueV2": { + "type": "object", + "properties": { + "incident_timestamp": { + "$ref": "#/components/schemas/IncidentTimestampV2" + }, + "value": { + "$ref": "#/components/schemas/IncidentTimestampValueV2" } }, "example": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - } + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["incident_timestamp"] }, - "ExternalIssueReferenceV2": { + "IncidentTypeV1": { "type": "object", "properties": { - "issue_name": { + "create_in_triage": { "type": "string", - "description": "Human readable ID for the issue", - "example": "INC-123" + "description": "Whether incidents of this must always, or can optionally, be created in triage", + "example": "always", + "enum": ["always", "optional"] }, - "issue_permalink": { + "created_at": { "type": "string", - "description": "URL linking directly to the action in the issue tracker", - "example": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up" + "description": "When this resource was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "provider": { + "description": { "type": "string", - "description": "ID of the issue tracker provider", - "example": "asana", - "enum": [ - "asana", - "click_up", - "linear", - "jira", - "jira_server", - "github", - "gitlab", - "shortcut" - ] + "description": "What is this incident type for?", + "example": "Customer facing production outages" + }, + "id": { + "type": "string", + "description": "Unique identifier for this Incident Type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "is_default": { + "type": "boolean", + "description": "The default Incident Type is used when no other type is explicitly specified", + "example": false + }, + "name": { + "type": "string", + "description": "The name of this Incident Type", + "example": "Production Outage" + }, + "private_incidents_only": { + "type": "boolean", + "description": "Should all incidents created with this Incident Type be private?", + "example": false + }, + "updated_at": { + "type": "string", + "description": "When this resource was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ - "provider", - "provider_instance_id", - "issue_name", - "issue_permalink", - "issue_id" + "id", + "name", + "is_default", + "description", + "private_incidents_only", + "created_at", + "updated_at", + "create_in_triage", + "severity_aliases", + "rank", + "override_auto_close_incidents", + "auto_close_incidents", + "auto_close_incidents_delay_days", + "override_auto_archive_slack_channels", + "auto_archive_slack_channels", + "auto_archive_slack_channels_delay_days" ] }, - "ExternalResourceV1": { + "IncidentUpdateV2": { "type": "object", "properties": { - "external_id": { + "created_at": { "type": "string", - "description": "ID of the resource in the external system", - "example": "123" + "description": "When the update was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "permalink": { + "id": { "type": "string", - "description": "URL of the resource", - "example": "https://my.pagerduty.com/incidents/ABC" + "description": "Unique identifier for this incident update", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "resource_type": { + "incident_id": { "type": "string", - "description": "E.g. PagerDuty: the external system that holds the resource", - "example": "pager_duty_incident", - "enum": [ - "pager_duty_incident", - "opsgenie_alert", - "datadog_monitor_alert", - "github_pull_request", - "gitlab_merge_request", - "sentry_issue", - "atlassian_statuspage_incident", - "zendesk_ticket", - "google_calendar_event", - "scrubbed", - "statuspage_incident" - ] + "description": "The incident this update relates to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "title": { + "merged_into_incident_id": { "type": "string", - "description": "Title of resource", - "example": "The database has gone down" + "description": "The ID of the incident that this incident was merged into, if it was merged in to another incident", + "example": "abc123" + }, + "message": { + "type": "string", + "description": "Message that explains the context behind the update", + "example": "We're working on a fix, hoping to ship in the next 30 minutes" + }, + "new_incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + }, + "new_severity": { + "$ref": "#/components/schemas/SeverityV2" + }, + "updater": { + "$ref": "#/components/schemas/ActorV2" } }, "example": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" + "created_at": "2021-08-17T13:28:57.801578Z", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "merged_into_incident_id": "abc123", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } }, "required": [ "id", - "permalink", - "external_id", - "title", - "resource_type", - "resource_type_label", + "incident_id", + "new_incident_status", + "updater", "created_at", - "updated_at" + "next_update_in_minutes" ] }, - "FollowUpPriorityV2": { + "IncidentV1": { "type": "object", "properties": { - "description": { + "call_url": { "type": "string", - "description": "Description of the follow-up priority option", - "example": "A follow-up that requires immediate attention." + "description": "The call URL attached to this incident", + "example": "https://zoom.us/foo" + }, + "created_at": { + "type": "string", + "description": "When the incident was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "creator": { + "$ref": "#/components/schemas/ActorV2" + }, + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryV1" + }, + "description": "Custom field entries for this incident", + "example": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ] }, "id": { "type": "string", - "description": "Unique identifier for the follow-up priority option", - "example": "01GNW4BAQ7XRMFF6FHKNXDFPRW" + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "name": { - "type": "string", - "description": "Name of the follow-up priority option", - "example": "Urgent" + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentV1" + }, + "description": "A list of who is assigned to each role for this incident", + "example": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ] }, - "rank": { - "type": "integer", - "description": "Rank is used to order the follow-up priority options correctly", - "example": 10, - "format": "int64" - } - }, - "example": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 - }, - "required": [ - "id", - "name", - "rank" - ] - }, - "FollowUpV2": { - "type": "object", - "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" }, - "completed_at": { + "mode": { "type": "string", - "description": "When the follow-up was completed", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "real", + "enum": ["real", "test", "tutorial"] }, - "created_at": { + "name": { "type": "string", - "description": "When the follow-up was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "description": { + "permalink": { "type": "string", - "description": "Description of the follow-up", - "example": "Call the fire brigade" - }, - "external_issue_reference": { - "$ref": "#/components/schemas/ExternalIssueReferenceV2" + "description": "A permanent link to the homepage for this incident", + "example": "https://app.incident.io/incidents/123" }, - "id": { + "postmortem_document_url": { "type": "string", - "description": "Unique identifier for the follow-up", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Description of the incident", + "example": "https://docs.google.com/my_doc_id" }, - "incident_id": { + "reference": { "type": "string", - "description": "Unique identifier of the incident the follow-up belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Reference to this incident, as displayed across the product", + "example": "INC-123" }, - "priority": { - "$ref": "#/components/schemas/FollowUpPriorityV2" + "severity": { + "$ref": "#/components/schemas/SeverityV2" }, - "status": { + "slack_channel_id": { "type": "string", - "description": "Status of the follow-up", - "example": "outstanding", - "enum": [ - "outstanding", - "completed", - "deleted", - "not_doing" - ] + "description": "ID of the Slack channel in the organisation Slack workspace. Note that the channel is sometimes created asynchronously, so may not be present when the incident is just created.", + "example": "C02AW36C1M5" }, - "title": { + "slack_channel_name": { "type": "string", - "description": "Title of the follow-up", - "example": "Cat is stuck in the tree" + "description": "Name of the slack channel", + "example": "inc-165-green-parrot" }, - "updated_at": { + "slack_team_id": { "type": "string", - "description": "When the follow-up was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - } - }, - "example": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "priority": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 + "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", + "example": "T02A1FSLE8J" }, - "status": "outstanding", - "title": "Cat is stuck in the tree", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "id", - "incident_id", - "title", - "status", - "created_at", - "updated_at" - ] - }, - "IdentityResponseBody": { - "type": "object", - "properties": { - "identity": { - "$ref": "#/components/schemas/IdentityV1" - } - }, - "example": { - "identity": { - "dashboard_url": "https://app.incident.io/my-org", - "name": "Alertmanager token", - "roles": [ - "incident_creator" - ] - } - }, - "required": [ - "identity" - ] - }, - "IdentityV1": { - "type": "object", - "properties": { - "dashboard_url": { + "status": { "type": "string", - "description": "The dashboard URL for this organisation", - "example": "https://app.incident.io/my-org" + "description": "Current status of the incident", + "example": "triage", + "enum": [ + "triage", + "investigating", + "fixing", + "monitoring", + "closed", + "declined" + ] }, - "name": { + "summary": { "type": "string", - "description": "The name assigned to the current API Key", - "example": "Alertmanager token" + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." }, - "roles": { + "timestamps": { "type": "array", "items": { - "type": "string", - "example": "incident_creator", - "enum": [ - "viewer", - "incident_creator", - "incident_editor", - "manage_settings", - "global_access", - "catalog_viewer", - "catalog_editor", - "incident_memberships_editor" - ] + "$ref": "#/components/schemas/IncidentTimestampV1" }, - "description": "Which roles have been enabled for this key", + "description": "Incident lifecycle events and when they last occurred", "example": [ - "incident_creator" - ] - } - }, - "example": { - "dashboard_url": "https://app.incident.io/my-org", - "name": "Alertmanager token", - "roles": [ - "incident_creator" - ] - }, - "required": [ - "name", - "roles", - "dashboard_url" - ] - }, - "IncidentAttachmentV1": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of this incident membership", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "incident_id": { - "type": "string", - "description": "Unique identifier of the incident", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ] }, - "resource": { - "$ref": "#/components/schemas/ExternalResourceV1" - } - }, - "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "resource": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" - } - }, - "required": [ - "id", - "organisation_id", - "incident_id", - "resource", - "creator", - "created_at" - ] - }, - "IncidentDurationMetricV2": { - "type": "object", - "properties": { - "id": { + "updated_at": { "type": "string", - "description": "Unique ID of this incident duration metric", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "description": "When the incident was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "name": { + "visibility": { "type": "string", - "description": "Unique name of this duration metric", - "example": "Lasted" + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": ["public", "private"] } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "real", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "timestamps": [ + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" }, "required": [ + "status", "id", + "external_id", + "reference", "name", - "rank", - "from_timestamp_id", - "to_timestamp_id", - "metric_type", - "calculation_mode", + "incident_status", + "idempotency_key", + "did_opt_out_of_post_incident_flow", + "visibility", + "mode", + "organisation_id", + "creator", + "last_activity_at", + "incident_role_assignments", + "custom_field_entries", + "slack_team_id", + "slack_channel_id", "created_at", "updated_at", - "validate" - ] - }, - "IncidentDurationMetricWithValueV2": { - "type": "object", - "properties": { - "duration_metric": { - "$ref": "#/components/schemas/IncidentDurationMetricV2" - }, - "value_seconds": { - "type": "integer", - "description": "The calculated durations for this metric", - "example": 1, - "format": "int64" - } - }, - "example": { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - }, - "required": [ - "duration_metric" + "reported_at" ] }, - "IncidentEditPayloadV2": { + "IncidentV2": { "type": "object", "properties": { "call_url": { @@ -9904,1024 +15089,1891 @@ "description": "The call URL attached to this incident", "example": "https://zoom.us/foo" }, + "created_at": { + "type": "string", + "description": "When the incident was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "creator": { + "$ref": "#/components/schemas/ActorV2" + }, "custom_field_entries": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" + "$ref": "#/components/schemas/CustomFieldEntryV1" }, - "description": "Set the incident's custom fields to these values", + "description": "Custom field entries for this incident", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ] }, + "duration_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" + }, + "description": "Incident duration metrics and their measurements for this incident", + "example": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ] + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, "incident_role_assignments": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + "$ref": "#/components/schemas/IncidentRoleAssignmentV1" }, - "description": "Assign incident roles to these people", + "description": "A list of who is assigned to each role for this incident", "example": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ] }, - "incident_status_id": { - "type": "string", - "description": "Incident status to change incident to (you can only change an incident from one active status to another, any other lifecycle changes must be taken via the app.)", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" }, "incident_timestamp_values": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + "$ref": "#/components/schemas/IncidentTimestampWithValueV2" }, - "description": "Assign the incident's timestamps to these values", + "description": "Incident lifecycle events and when they occurred", "example": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } ] }, + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" + }, + "mode": { + "type": "string", + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "standard", + "enum": ["standard", "retrospective", "test", "tutorial"] + }, "name": { "type": "string", "description": "Explanation of the incident", "example": "Our database is sad" }, - "severity_id": { + "permalink": { "type": "string", - "description": "Severity to change incident to", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "A permanent link to the homepage for this incident", + "example": "https://app.incident.io/incidents/123" + }, + "postmortem_document_url": { + "type": "string", + "description": "Description of the incident", + "example": "https://docs.google.com/my_doc_id" + }, + "reference": { + "type": "string", + "description": "Reference to this incident, as displayed across the product", + "example": "INC-123" + }, + "severity": { + "$ref": "#/components/schemas/SeverityV2" + }, + "slack_channel_id": { + "type": "string", + "description": "ID of the Slack channel in the organisation Slack workspace. Note that the channel is sometimes created asynchronously, so may not be present when the incident is just created.", + "example": "C02AW36C1M5" + }, + "slack_channel_name": { + "type": "string", + "description": "Name of the slack channel", + "example": "inc-165-green-parrot" + }, + "slack_team_id": { + "type": "string", + "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", + "example": "T02A1FSLE8J" }, "summary": { "type": "string", "description": "Detailed description of the incident", "example": "Our database is really really sad, and we don't know why yet." + }, + "updated_at": { + "type": "string", + "description": "When the incident was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "visibility": { + "type": "string", + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": ["public", "private"] + }, + "workload_minutes_late": { + "type": "number", + "description": "Amount of time spent on the incident in late hours", + "example": 40.7, + "format": "double" + }, + "workload_minutes_sleeping": { + "type": "number", + "description": "Amount of time spent on the incident in sleeping hours", + "example": 0, + "format": "double" + }, + "workload_minutes_total": { + "type": "number", + "description": "Amount of time spent on the incident in total", + "example": 60.7, + "format": "double" + }, + "workload_minutes_working": { + "type": "number", + "description": "Amount of time spent on the incident in working hours", + "example": 20, + "format": "double" } }, "example": { "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, "custom_field_entries": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ], - "incident_status_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, "incident_timestamp_values": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } ], - "name": "Our database is sad", - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "summary": "Our database is really really sad, and we don't know why yet." - } - }, - "IncidentMembership": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "description": "When the membership was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "id": { - "type": "string", - "description": "Unique identifier of this incident membership", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "incident_id": { - "type": "string", - "description": "Unique identifier of the incident", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "updated_at": { - "type": "string", - "description": "When the membership was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "user": { - "$ref": "#/components/schemas/UserV1" - } - }, - "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", "updated_at": "2021-08-17T13:28:57.801578Z", - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 }, "required": [ + "incident_status", "id", - "user", - "incident_id", + "external_id", + "reference", + "name", + "idempotency_key", + "did_opt_out_of_post_incident_flow", + "visibility", + "mode", + "organisation_id", + "creator", + "last_activity_at", + "incident_role_assignments", + "custom_field_entries", + "slack_team_id", + "slack_channel_id", "created_at", - "updated_at" - ] - }, - "IncidentRoleAssignmentPayloadV1": { - "type": "object", - "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" - }, - "incident_role_id": { - "type": "string", - "description": "Unique ID of an incident role", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - }, - "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "required": [ - "incident_role_id", - "assignee" + "updated_at", + "reported_at" ] }, - "IncidentRoleAssignmentPayloadV2": { + "IncidentWithStatusChangeV2": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" - }, - "incident_role_id": { - "type": "string", - "description": "Unique ID of an incident role", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - }, - "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "incident": { + "$ref": "#/components/schemas/IncidentV2" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "required": [ - "incident_role_id" - ] - }, - "IncidentRoleAssignmentV1": { - "type": "object", - "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" + "new_status": { + "$ref": "#/components/schemas/IncidentStatusV1" }, - "role": { - "$ref": "#/components/schemas/IncidentRoleV1" + "previous_status": { + "$ref": "#/components/schemas/IncidentStatusV1" } }, "example": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 }, - "role": { + "new_status": { + "category": "triage", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "role" - ] - }, - "IncidentRoleV1": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 - }, - "id": { - "type": "string", - "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" - }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 - }, - "required": { - "type": "boolean", - "description": "DEPRECATED: this will always be false.", - "example": false - }, - "role_type": { - "type": "string", - "description": "Type of incident role", - "example": "lead", - "enum": [ - "lead", - "reporter", - "custom" - ] - }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 - }, - "updated_at": { - "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - } - }, - "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "conditions", - "id", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" - ] - }, - "IncidentRoleV2": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 }, - "id": { - "type": "string", - "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" - }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 - }, - "role_type": { - "type": "string", - "description": "Type of incident role", - "example": "lead", - "enum": [ - "lead", - "reporter", - "custom" - ] - }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 - }, - "updated_at": { - "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "conditions", - "id", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" - ] + "required": ["incident", "previous_status", "new_status"] }, - "IncidentStatusV1": { + "ListEntriesResponseBody": { "type": "object", "properties": { - "category": { - "type": "string", - "description": "What category of status it is. All statuses apart from live (renamed in the app to Active) and learning (renamed in the app to Post-incident) are managed by incident.io and cannot be configured", - "example": "triage", - "enum": [ - "triage", - "declined", - "merged", - "canceled", - "live", - "learning", - "closed", - "paused" + "catalog_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogEntryV2" + }, + "example": [ + { + "aliases": ["lawrence@incident.io", "lawrence"], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + } ] }, - "created_at": { - "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Rich text description of the incident status", - "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." - }, - "id": { - "type": "string", - "description": "Unique ID of this incident status", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "name": { - "type": "string", - "description": "Unique name of this status", - "example": "Closed" - }, - "rank": { - "type": "integer", - "description": "Order of this incident status", - "example": 4, - "format": "int64" + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" }, - "updated_at": { - "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "catalog_entries": [ + { + "aliases": ["lawrence@incident.io", "lawrence"], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ], + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + } }, - "required": [ - "id", - "name", - "description", - "rank", - "category", - "created_at", - "updated_at" - ] + "required": ["catalog_type", "catalog_entries", "pagination_meta"] }, - "IncidentTimestampV1": { + "ListResourcesResponseBody": { "type": "object", "properties": { - "last_occurred_at": { - "type": "string", - "description": "When this last occurred, if it did", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "name": { - "type": "string", - "description": "Name of the lifecycle event", - "example": "last_activity" + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogResourceV2" + }, + "example": [ + { + "category": "custom", + "description": "Boolean true or false value", + "label": "GitHub Repository", + "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", + "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + } + ] } }, "example": { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "resources": [ + { + "category": "custom", + "description": "Boolean true or false value", + "label": "GitHub Repository", + "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", + "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + } + ] }, - "required": [ - "name" - ] + "required": ["resources"] }, - "IncidentTimestampV2": { + "ListResponseBody": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique ID of this incident timestamp", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "name": { - "type": "string", - "description": "Unique name of this timestamp", - "example": "Impact started" - }, - "rank": { - "type": "integer", - "description": "Order in which this timestamp should be shown", - "example": 1, - "format": "int64" + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionV1" + }, + "example": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + } + }, + "example": { + "actions": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["actions"] + }, + "ListResponseBody10": { + "type": "object", + "properties": { + "incident_statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentStatusV1" + }, + "example": [ + { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "incident_statuses": [ + { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] }, - "required": [ - "id", - "name", - "description", - "rank", - "set_on_creation", - "set_on_acceptance", - "set_on_resolution", - "set_by_rules", - "timestamp_type", - "created_at", - "updated_at" - ] + "required": ["incident_statuses"] }, - "IncidentTimestampValuePayloadV2": { + "ListResponseBody11": { "type": "object", "properties": { - "incident_timestamp_id": { - "type": "string", - "description": "The id of the incident timestamp that this incident timestamp value is associated with.", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "value": { - "type": "string", - "description": "The current value of this timestamp, for this incident", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "incident_timestamps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampV2" + }, + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] } }, "example": { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "incident_timestamps": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] }, - "required": [ - "incident_timestamp_id", - "id", - "incident_id", - "created_at" - ] + "required": ["incident_timestamps"] }, - "IncidentTimestampValueV2": { + "ListResponseBody12": { "type": "object", "properties": { - "value": { - "type": "string", - "description": "The current value of this timestamp, for this incident", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "incident_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTypeV1" + }, + "example": [ + { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] } }, "example": { - "value": "2021-08-17T13:28:57.801578Z" + "incident_types": [ + { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] }, - "required": [ - "id", - "incident_id", - "incident_timestamp_id", - "created_at" - ] + "required": ["incident_types"] }, - "IncidentTimestampWithValueV2": { + "ListResponseBody13": { "type": "object", "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" + "incident_updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentUpdateV2" + }, + "example": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "merged_into_incident_id": "abc123", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + } + ] }, - "value": { - "$ref": "#/components/schemas/IncidentTimestampValueV2" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "incident_updates": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "merged_into_incident_id": "abc123", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 } }, - "required": [ - "incident_timestamp" - ] + "required": ["incident_updates"] }, - "IncidentTypeV1": { + "ListResponseBody14": { "type": "object", "properties": { - "create_in_triage": { - "type": "string", - "description": "Whether incidents of this must always, or can optionally, be created in triage", - "example": "always", - "enum": [ - "always", - "optional" + "incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentV1" + }, + "example": [ + { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "real", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "timestamps": [ + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" + } ] }, - "created_at": { - "type": "string", - "description": "When this resource was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "What is this incident type for?", - "example": "Customer facing production outages" - }, - "id": { - "type": "string", - "description": "Unique identifier for this Incident Type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "is_default": { - "type": "boolean", - "description": "The default Incident Type is used when no other type is explicitly specified", - "example": false - }, - "name": { - "type": "string", - "description": "The name of this Incident Type", - "example": "Production Outage" - }, - "private_incidents_only": { - "type": "boolean", - "description": "Should all incidents created with this Incident Type be private?", - "example": false - }, - "updated_at": { - "type": "string", - "description": "When this resource was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" + "incidents": [ + { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "real", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "timestamps": [ + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + } }, - "required": [ - "id", - "name", - "is_default", - "description", - "private_incidents_only", - "created_at", - "updated_at", - "create_in_triage", - "severity_aliases", - "rank", - "override_auto_close_incidents", - "auto_close_incidents", - "auto_close_incidents_delay_days", - "override_auto_archive_slack_channels", - "auto_archive_slack_channels", - "auto_archive_slack_channels_delay_days" - ] + "required": ["incidents"] }, - "IncidentUpdateV2": { + "ListResponseBody15": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the update was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "id": { - "type": "string", - "description": "Unique identifier for this incident update", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "incident_id": { - "type": "string", - "description": "The incident this update relates to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "message": { - "type": "string", - "description": "Message that explains the context behind the update", - "example": "We're working on a fix, hoping to ship in the next 30 minutes" - }, - "new_incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "new_severity": { - "$ref": "#/components/schemas/SeverityV2" + "incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentV2" + }, + "example": [ + { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + ] }, - "updater": { - "$ref": "#/components/schemas/ActorV2" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "We're working on a fix, hoping to ship in the next 30 minutes", - "new_incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "new_severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "incidents": [ + { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 } }, - "required": [ - "id", - "incident_id", - "new_incident_status", - "updater", - "created_at", - "next_update_in_minutes" - ] + "required": ["incidents"] }, - "IncidentV1": { + "ListResponseBody16": { "type": "object", "properties": { - "call_url": { - "type": "string", - "description": "The call URL attached to this incident", - "example": "https://zoom.us/foo" - }, - "created_at": { - "type": "string", - "description": "When the incident was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "creator": { - "$ref": "#/components/schemas/ActorV2" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" }, - "custom_field_entries": { + "schedules": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldEntryV1" + "$ref": "#/components/schemas/ScheduleV2" }, - "description": "Custom field entries for this incident", "example": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] }, - "values": [ + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + } + }, + "example": { + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + }, + "schedules": [ + { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } - ] - } - ] - }, - "id": { - "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - "incident_role_assignments": { + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["schedules"] + }, + "ListResponseBody17": { + "type": "object", + "properties": { + "severities": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentV1" + "$ref": "#/components/schemas/SeverityV2" }, - "description": "A list of who is assigned to each role for this incident", "example": [ { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" } ] + } + }, + "example": { + "severities": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["severities"] + }, + "ListResponseBody18": { + "type": "object", + "properties": { + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" }, - "incident_type": { - "$ref": "#/components/schemas/IncidentTypeV1" - }, - "mode": { - "type": "string", - "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", - "example": "real", - "enum": [ - "real", - "test", - "tutorial" - ] - }, - "name": { - "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" - }, - "permalink": { - "type": "string", - "description": "A permanent link to the homepage for this incident", - "example": "https://app.incident.io/incidents/123" - }, - "postmortem_document_url": { - "type": "string", - "description": "Description of the incident", - "example": "https://docs.google.com/my_doc_id" - }, - "reference": { - "type": "string", - "description": "Reference to this incident, as displayed across the product", - "example": "INC-123" - }, - "severity": { - "$ref": "#/components/schemas/SeverityV2" - }, - "slack_channel_id": { - "type": "string", - "description": "ID of the Slack channel in the organisation Slack workspace", - "example": "C02AW36C1M5" - }, - "slack_channel_name": { - "type": "string", - "description": "Name of the slack channel", - "example": "inc-165-green-parrot" - }, - "slack_team_id": { - "type": "string", - "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", - "example": "T02A1FSLE8J" - }, - "status": { - "type": "string", - "description": "Current status of the incident", - "example": "triage", - "enum": [ - "triage", - "investigating", - "fixing", - "monitoring", - "closed", - "declined" - ] - }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." - }, - "timestamps": { + "users": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampV1" + "$ref": "#/components/schemas/UserWithRolesV2" }, - "description": "Incident lifecycle events and when they last occurred", "example": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "base_role": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "custom_roles": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ] - }, - "updated_at": { - "type": "string", - "description": "When the incident was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "visibility": { - "type": "string", - "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", - "example": "public", - "enum": [ - "public", - "private" - ] } }, "example": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 }, - "custom_field_entries": [ + "users": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "base_role": { + "description": "Elevated permissions for the customer success team.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "name": "Customer Success", + "slug": "customer-success" }, - "values": [ + "custom_roles": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" } - ] + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + ] + }, + "required": ["users", "pagination_meta"] + }, + "ListResponseBody2": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionV2" + }, + "example": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + } + }, + "example": { + "actions": [ { "assignee": { "email": "lisa@incident.io", @@ -10930,173 +16982,163 @@ "role": "viewer", "slack_user_id": "U02AYNF2XJM" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["actions"] + }, + "ListResponseBody3": { + "type": "object", + "properties": { + "custom_field_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "sort_key": 10, + "value": "Product" } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "real", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + ] }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "status": "triage", - "summary": "Our database is really really sad, and we don't know why yet.", - "timestamps": [ + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" + } + }, + "example": { + "custom_field_options": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + } }, - "required": [ - "status", - "id", - "external_id", - "reference", - "name", - "incident_status", - "idempotency_key", - "did_opt_out_of_post_incident_flow", - "visibility", - "mode", - "organisation_id", - "creator", - "last_activity_at", - "incident_role_assignments", - "custom_field_entries", - "slack_team_id", - "slack_channel_id", - "created_at", - "updated_at", - "reported_at" - ] + "required": ["custom_field_options", "pagination_meta"] }, - "IncidentV2": { + "ListResponseBody4": { "type": "object", "properties": { - "call_url": { - "type": "string", - "description": "The call URL attached to this incident", - "example": "https://zoom.us/foo" - }, - "created_at": { - "type": "string", - "description": "When the incident was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "creator": { - "$ref": "#/components/schemas/ActorV2" - }, - "custom_field_entries": { + "custom_fields": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldEntryV1" + "$ref": "#/components/schemas/CustomFieldV1" }, - "description": "Custom field entries for this incident", "example": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ] + ], + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true, + "updated_at": "2021-08-17T13:28:57.801578Z" } ] - }, - "duration_metrics": { + } + }, + "example": { + "custom_fields": [ + { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ], + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["custom_fields"] + }, + "ListResponseBody5": { + "type": "object", + "properties": { + "custom_fields": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" + "$ref": "#/components/schemas/CustomFieldV2" }, - "description": "Incident duration metrics and their measurements for this incident", "example": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "updated_at": "2021-08-17T13:28:57.801578Z" } ] - }, - "external_issue_reference": { - "$ref": "#/components/schemas/ExternalIssueReferenceV2" - }, - "id": { - "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - "incident_role_assignments": { + } + }, + "example": { + "custom_fields": [ + { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["custom_fields"] + }, + "ListResponseBody6": { + "type": "object", + "properties": { + "follow_ups": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentV1" + "$ref": "#/components/schemas/FollowUpV2" }, - "description": "A list of who is assigned to each role for this incident", "example": [ { "assignee": { @@ -11106,220 +17148,111 @@ "role": "viewer", "slack_user_id": "U02AYNF2XJM" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" } ] - }, - "incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "incident_timestamp_values": { + } + }, + "example": { + "follow_ups": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["follow_ups"] + }, + "ListResponseBody7": { + "type": "object", + "properties": { + "incident_attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampWithValueV2" + "$ref": "#/components/schemas/IncidentAttachmentV1" }, - "description": "Incident lifecycle events and when they occurred", "example": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" } } ] - }, - "incident_type": { - "$ref": "#/components/schemas/IncidentTypeV1" - }, - "mode": { - "type": "string", - "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", - "example": "standard", - "enum": [ - "standard", - "retrospective", - "test", - "tutorial" - ] - }, - "name": { - "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" - }, - "permalink": { - "type": "string", - "description": "A permanent link to the homepage for this incident", - "example": "https://app.incident.io/incidents/123" - }, - "postmortem_document_url": { - "type": "string", - "description": "Description of the incident", - "example": "https://docs.google.com/my_doc_id" - }, - "reference": { - "type": "string", - "description": "Reference to this incident, as displayed across the product", - "example": "INC-123" - }, - "severity": { - "$ref": "#/components/schemas/SeverityV2" - }, - "slack_channel_id": { - "type": "string", - "description": "ID of the Slack channel in the organisation Slack workspace", - "example": "C02AW36C1M5" - }, - "slack_channel_name": { - "type": "string", - "description": "Name of the slack channel", - "example": "inc-165-green-parrot" - }, - "slack_team_id": { - "type": "string", - "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", - "example": "T02A1FSLE8J" - }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." - }, - "updated_at": { - "type": "string", - "description": "When the incident was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "visibility": { - "type": "string", - "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", - "example": "public", - "enum": [ - "public", - "private" - ] - }, - "workload_minutes_late": { - "type": "number", - "description": "Amount of time spent on the incident in late hours", - "example": 40.7, - "format": "double" - }, - "workload_minutes_sleeping": { - "type": "number", - "description": "Amount of time spent on the incident in sleeping hours", - "example": 0, - "format": "double" - }, - "workload_minutes_total": { - "type": "number", - "description": "Amount of time spent on the incident in total", - "example": 60.7, - "format": "double" - }, - "workload_minutes_working": { - "type": "number", - "description": "Amount of time spent on the incident in working hours", - "example": 20, - "format": "double" } }, "example": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "duration_metrics": [ + "incident_attachments": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { + ] + }, + "required": ["incident_attachments"] + }, + "ListResponseBody8": { + "type": "object", + "properties": { + "incident_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleV1" + }, + "example": [ + { "created_at": "2021-08-17T13:28:57.801578Z", "description": "The person currently coordinating the incident", "id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -11330,1180 +17263,1617 @@ "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ + ] + } + }, + "example": { + "incident_roles": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": ["incident_roles"] + }, + "ListResponseBody9": { + "type": "object", + "properties": { + "incident_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleV2" + }, + "example": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" } + ] + } + }, + "example": { + "incident_roles": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + ] }, - "required": [ - "incident_status", - "id", - "external_id", - "reference", - "name", - "idempotency_key", - "did_opt_out_of_post_incident_flow", - "visibility", - "mode", - "organisation_id", - "creator", - "last_activity_at", - "incident_role_assignments", - "custom_field_entries", - "slack_team_id", - "slack_channel_id", - "created_at", - "updated_at", - "reported_at" - ] + "required": ["incident_roles"] }, - "IncidentWithStatusChangeV2": { + "ListScheduleEntriesResponseBody": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV2" - }, - "new_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "pagination_meta": { + "$ref": "#/components/schemas/AfterPaginationMetaResultV2" }, - "previous_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "schedule_entries": { + "$ref": "#/components/schemas/ScheduleEntriesListPayloadV2" } }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ + "pagination_meta": { + "after": "abc123", + "after_url": "abc123" + }, + "schedule_entries": { + "final": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ], - "duration_metrics": [ + "overrides": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "scheduled": [ { - "assignee": { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" } } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + ] + } + }, + "required": ["schedule_entries"] + }, + "ListTypesResponseBody": { + "type": "object", + "properties": { + "catalog_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeV2" }, - "incident_timestamp_values": [ + "example": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { + ] + } + }, + "example": { + "catalog_types": [ + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 - }, - "new_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "previous_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + } + ] }, - "required": [ - "incident", - "previous_status", - "new_status" - ] + "required": ["catalog_types"] }, - "ListEntriesResponseBody": { + "ListWorkflowsResponseBody": { "type": "object", "properties": { - "catalog_entries": { + "workflows": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogEntryV2" + "$ref": "#/components/schemas/WorkflowSlim" }, "example": [ { - "aliases": [ - "lawrence@incident.io", - "lawrence" + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { - "array_value": [ + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } } ], - "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" + "version": 3 } ] - }, - "catalog_type": { - "$ref": "#/components/schemas/CatalogTypeV2" - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "catalog_entries": [ + "workflows": [ { - "aliases": [ - "lawrence@incident.io", - "lawrence" + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { - "array_value": [ + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } } ], - "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" - } + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + ], + "folder": "My folder 01", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ], - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ { "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" } ], - "version": 1 + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + ] + }, + "required": ["workflows"] + }, + "ManagedResourceV2": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + "managed_by": { + "type": "string", + "description": "How is this resource managed", + "example": "dashboard", + "enum": ["dashboard", "terraform", "external"] + }, + "resource_id": { + "type": "string", + "description": "The ID of the related resource", + "example": "abc123" + }, + "resource_type": { + "type": "string", + "description": "The type of the related resource", + "example": "schedule", + "enum": ["workflow", "schedule"] + }, + "source_url": { + "type": "string", + "description": "The url of the external repository where this resource is managed (if there is one)", + "example": "https://github.com/my-company/infrastructure" } }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "resource_id": "abc123", + "resource_type": "schedule", + "source_url": "https://github.com/my-company/infrastructure" + }, "required": [ - "catalog_type", - "catalog_entries", - "pagination_meta" + "resource_type", + "resource_id", + "managed_by", + "annotations" ] }, - "ListResourcesResponseBody": { + "ManagementMetaV2": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "managed_by": { + "type": "string", + "description": "How is this resource managed", + "example": "dashboard", + "enum": ["dashboard", "terraform", "external"] + }, + "source_url": { + "type": "string", + "description": "The url of the external repository where this resource is managed (if there is one)", + "example": "https://github.com/my-company/infrastructure" + } + }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" + }, + "required": ["annotations", "managed_by"] + }, + "PaginationMetaResult": { + "type": "object", + "properties": { + "after": { + "type": "string", + "description": "If provided, pass this as the 'after' param to load the next page", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "page_size": { + "type": "integer", + "description": "What was the maximum number of results requested", + "default": 25, + "example": 25, + "format": "int64" + } + }, + "example": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + }, + "required": ["page_size"] + }, + "PaginationMetaResultWithTotal": { + "type": "object", + "properties": { + "after": { + "type": "string", + "description": "If provided, pass this as the 'after' param to load the next page", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "page_size": { + "type": "integer", + "description": "What was the maximum number of results requested", + "default": 25, + "example": 25, + "format": "int64" + }, + "total_record_count": { + "type": "integer", + "description": "How many matching records were there in total, if known", + "example": 238, + "format": "int64" + } + }, + "example": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + }, + "required": ["page_size"] + }, + "PrivateIncidentAccessAttemptedV1ResponseBody": { "type": "object", "properties": { - "resources": { + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "private_incident.access_attempted" + }, + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" + }, + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" + }, + "metadata": { + "$ref": "#/components/schemas/AuditLogPrivateIncidentAccessAttemptedMetadataV2" + }, + "occurred_at": { + "type": "string", + "description": "When the entry occurred", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "targets": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogResourceV2" + "$ref": "#/components/schemas/AuditLogTargetV2" }, + "description": "The custom field that was created", "example": [ { - "category": "custom", - "description": "Boolean true or false value", - "label": "GitHub Repository", - "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", - "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "resources": [ + "action": "private_incident.access_attempted", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "metadata": { + "outcome": "granted" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ { - "category": "custom", - "description": "Boolean true or false value", - "label": "GitHub Repository", - "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", - "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } - ] + ], + "version": 1 }, "required": [ - "resources" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "ListResponseBody": { + "PrivateIncidentActionCreatedV1ResponseBody": { "type": "object", "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionV1" - }, - "example": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.action_created_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.action_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + } + }, + "example": { + "event_type": "private_incident.action_created_v1", + "private_incident.action_created_v1": { + "id": "abc123" + } + }, + "required": ["event_type", "private_incident.action_created_v1"] + }, + "PrivateIncidentActionUpdatedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.action_updated_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] + }, + "private_incident.action_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "actions": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "event_type": "private_incident.action_updated_v1", + "private_incident.action_updated_v1": { + "id": "abc123" + } + }, + "required": ["event_type", "private_incident.action_updated_v1"] + }, + "PrivateIncidentFollowUpCreatedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.follow_up_created_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + } + }, + "example": { + "event_type": "private_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1": { + "id": "abc123" + } + }, + "required": ["event_type", "private_incident.follow_up_created_v1"] + }, + "PrivateIncidentFollowUpUpdatedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.follow_up_updated_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + } }, - "required": [ - "actions" - ] + "example": { + "event_type": "private_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1": { + "id": "abc123" + } + }, + "required": ["event_type", "private_incident.follow_up_updated_v1"] }, - "ListResponseBody10": { + "PrivateIncidentIncidentCreatedV2ResponseBody": { "type": "object", "properties": { - "incident_statuses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "example": [ - { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.incident_created_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] + }, + "private_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "incident_statuses": [ - { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "event_type": "private_incident.incident_created_v2", + "private_incident.incident_created_v2": { + "id": "abc123" + } }, - "required": [ - "incident_statuses" - ] + "required": ["event_type", "private_incident.incident_created_v2"] }, - "ListResponseBody11": { + "PrivateIncidentIncidentUpdatedV2ResponseBody": { "type": "object", "properties": { - "incident_timestamps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTimestampV2" - }, - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.incident_updated_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] + }, + "private_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "incident_timestamps": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - ] + "event_type": "private_incident.incident_updated_v2", + "private_incident.incident_updated_v2": { + "id": "abc123" + } }, - "required": [ - "incident_timestamps" - ] + "required": ["event_type", "private_incident.incident_updated_v2"] }, - "ListResponseBody12": { + "PrivateIncidentMembershipGrantedV1ResponseBody": { "type": "object", "properties": { - "incident_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTypeV1" - }, - "example": [ - { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.membership_granted_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] + }, + "private_incident.membership_granted_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" } }, "example": { - "incident_types": [ - { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "event_type": "private_incident.membership_granted_v1", + "private_incident.membership_granted_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + } }, - "required": [ - "incident_types" - ] + "required": ["event_type", "private_incident.membership_granted_v1"] }, - "ListResponseBody13": { + "PrivateIncidentMembershipRevokedV1ResponseBody": { "type": "object", "properties": { - "incident_updates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentUpdateV2" - }, - "example": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "We're working on a fix, hoping to ship in the next 30 minutes", - "new_incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "new_severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - } + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "private_incident.membership_revoked_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.membership_revoked_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" + } + }, + "example": { + "event_type": "private_incident.membership_revoked_v1", + "private_incident.membership_revoked_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + } + }, + "required": ["event_type", "private_incident.membership_revoked_v1"] + }, + "PublicIncidentActionCreatedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.action_created_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" + "public_incident.action_created_v1": { + "$ref": "#/components/schemas/ActionV1" } }, "example": { - "incident_updates": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", + "event_type": "public_incident.action_created_v1", + "public_incident.action_created_v1": { + "assignee": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "We're working on a fix, hoping to ship in the next 30 minutes", - "new_incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "new_severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "incident_updates" - ] + "required": ["event_type", "public_incident.action_created_v1"] }, - "ListResponseBody14": { + "PublicIncidentActionUpdatedV1ResponseBody": { "type": "object", "properties": { - "incidents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentV1" + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.action_updated_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "public_incident.action_updated_v1": { + "$ref": "#/components/schemas/ActionV1" + } + }, + "example": { + "event_type": "public_incident.action_updated_v1", + "public_incident.action_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "example": [ - { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "real", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "status": "triage", - "summary": "Our database is really really sad, and we don't know why yet.", - "timestamps": [ - { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" - } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" - } + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["event_type", "public_incident.action_updated_v1"] + }, + "PublicIncidentFollowUpCreatedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.follow_up_created_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" + "public_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/ActionV1" } }, "example": { - "incidents": [ - { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "real", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "status": "triage", - "summary": "Our database is really really sad, and we don't know why yet.", - "timestamps": [ - { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" - } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + "event_type": "public_incident.follow_up_created_v1", + "public_incident.follow_up_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "incidents" - ] + "required": ["event_type", "public_incident.follow_up_created_v1"] }, - "ListResponseBody15": { + "PublicIncidentFollowUpUpdatedV1ResponseBody": { "type": "object", "properties": { - "incidents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentV2" + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.follow_up_updated_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "public_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/ActionV1" + } + }, + "example": { + "event_type": "public_incident.follow_up_updated_v1", + "public_incident.follow_up_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["event_type", "public_incident.follow_up_updated_v1"] + }, + "PublicIncidentIncidentCreatedV2ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.incident_created_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "public_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookIncidentV2" + } + }, + "example": { + "event_type": "public_incident.incident_created_v2", + "public_incident.incident_created_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } }, - "example": [ + "custom_field_entries": [ { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "sort_key": 10, + "value": "Product" + } + ] }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "values": [ { - "assignee": { - "email": "lisa@incident.io", + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "name": "Primary On-call" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Lasted" }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { + "role": { "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", + "description": "The person currently coordinating the incident", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "related_incidents": ["INC-237"], + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + }, + "required": ["event_type", "public_incident.incident_created_v2"] + }, + "PublicIncidentIncidentStatusUpdatedV2ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.incident_status_updated_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" ] }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" + "public_incident.incident_status_updated_v2": { + "$ref": "#/components/schemas/IncidentWithStatusChangeV2" } }, "example": { - "incidents": [ - { + "event_type": "public_incident.incident_status_updated_v2", + "public_incident.incident_status_updated_v2": { + "incident": { "call_url": "https://zoom.us/foo", "created_at": "2021-08-17T13:28:57.801578Z", "creator": { @@ -12538,10 +18908,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -12650,1164 +19017,1719 @@ "workload_minutes_sleeping": 0, "workload_minutes_total": 60.7, "workload_minutes_working": 20 + }, + "new_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 } }, - "required": [ - "incidents" - ] + "required": ["event_type", "public_incident.incident_status_updated_v2"] + }, + "PublicIncidentIncidentUpdatedV2ResponseBody": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "description": "What type of event is this webhook for?", + "example": "public_incident.incident_updated_v2", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "public_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookIncidentV2" + } + }, + "example": { + "event_type": "public_incident.incident_updated_v2", + "public_incident.incident_updated_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "related_incidents": ["INC-237"], + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + }, + "required": ["event_type", "public_incident.incident_updated_v2"] + }, + "RBACRoleV2": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the purpose for the RBAC role", + "example": "Elevated permissions for the customer success team." + }, + "id": { + "type": "string", + "description": "Unique identifier of the RBAC role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Name of the RBAC role", + "example": "Customer Success" + }, + "slug": { + "type": "string", + "description": "Unique human-readable slug for the RBAC role", + "example": "customer-success" + } + }, + "example": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "required": ["id", "name", "slug"] }, - "ListResponseBody16": { + "RetrospectiveIncidentOptionsV2": { "type": "object", "properties": { - "severities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeverityV2" - }, - "example": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "postmortem_document_url": { + "type": "string", + "description": "If the incident mode is 'retrospective', pass the URL of the postmortem to attach it to the incident", + "example": "https://docs.google.com/my_doc_id" + }, + "slack_channel_id": { + "type": "string", + "description": "If the incident mode is 'retrospective', pass the ID of a Slack channel in your workspace to attach the incident to an existing channel, rather than creating a new one", + "example": "abc123" } }, "example": { - "severities": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "required": [ - "severities" - ] + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "slack_channel_id": "abc123" + } }, - "ListResponseBody17": { + "ReturnsMetaV2": { "type": "object", "properties": { - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" + "array": { + "type": "boolean", + "description": "Whether the return value should be single or multi-value", + "example": true }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserWithRolesV2" - }, - "example": [ - { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - } - ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - ] + "type": { + "type": "string", + "description": "Expected return type of this expression (what to try casting the result to)", + "example": "IncidentStatus" } }, "example": { - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - }, - "users": [ - { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - } - ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - ] + "array": true, + "type": "IncidentStatus" }, - "required": [ - "users", - "pagination_meta" - ] + "required": ["type", "array"] }, - "ListResponseBody2": { + "ScheduleConfigCreatePayloadV2": { "type": "object", "properties": { - "actions": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/ActionV2" + "$ref": "#/components/schemas/ScheduleRotationCreatePayloadV2" }, "example": [ { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] } }, "example": { - "actions": [ + "rotations": [ { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] - }, - "required": [ - "actions" - ] + } }, - "ListResponseBody3": { + "ScheduleConfigUpdatePayloadV2": { "type": "object", "properties": { - "custom_field_options": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/ScheduleRotationUpdatePayloadV2" }, "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "custom_field_options": [ + "rotations": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } - }, - "required": [ - "custom_field_options", - "pagination_meta" - ] + ] + } }, - "ListResponseBody4": { + "ScheduleConfigV2": { "type": "object", "properties": { - "custom_fields": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldV1" + "$ref": "#/components/schemas/ScheduleRotationV2" }, + "description": "Rotas in this schedule", "example": [ { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ], - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true, - "updated_at": "2021-08-17T13:28:57.801578Z" + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] } }, "example": { - "custom_fields": [ + "rotations": [ { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ], - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true, - "updated_at": "2021-08-17T13:28:57.801578Z" + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } ] }, - "required": [ - "custom_fields" - ] + "required": ["rotations", "version"] }, - "ListResponseBody5": { + "ScheduleCreatePayloadV2": { "type": "object", "properties": { - "custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldV2" + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about the schedule", + "example": { + "incident.io/terraform/version": "version-of-terraform" }, - "example": [ - { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "config": { + "$ref": "#/components/schemas/ScheduleConfigCreatePayloadV2" + }, + "name": { + "type": "string", + "description": "Name of the schedule", + "example": "My Schedule" + }, + "timezone": { + "type": "string", + "description": "Timezone of the schedule", + "example": "America/Los_Angeles" } }, "example": { - "custom_fields": [ - { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "required": [ - "custom_fields" - ] + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } }, - "ListResponseBody6": { + "ScheduleEntriesListPayloadV2": { "type": "object", "properties": { - "follow_ups": { + "final": { "type": "array", "items": { - "$ref": "#/components/schemas/FollowUpV2" + "$ref": "#/components/schemas/ScheduleEntryV2" }, "example": [ { - "assignee": { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "priority": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 - }, - "status": "outstanding", - "title": "Cat is stuck in the tree", - "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ] + }, + "overrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleEntryV2" + }, + "example": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ] + }, + "scheduled": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleEntryV2" + }, + "example": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ] } }, "example": { - "follow_ups": [ + "final": [ { - "assignee": { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "priority": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 - }, - "status": "outstanding", - "title": "Cat is stuck in the tree", - "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "overrides": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "scheduled": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ] }, - "required": [ - "follow_ups" - ] + "required": ["scheduled", "overrides", "final"] + }, + "ScheduleEntryV2": { + "type": "object", + "properties": { + "end_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "entry_id": { + "type": "string", + "description": "Unique identifier of the schedule entry", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "fingerprint": { + "type": "string", + "description": "A unique identifier for this entry, used to determine a unique shift", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layer_id": { + "type": "string", + "description": "If present, the layer this entry applies to on the rota", + "example": "01G0J1EXE7AXZ2C93K61WBPYNH" + }, + "rotation_id": { + "type": "string", + "description": "If present, the rotation this entry applies to on the schedule", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "start_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/UserV1" + } + }, + "example": { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "required": ["external_user_id", "start_at", "end_at"] + }, + "ScheduleLayerCreatePayloadV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the layer", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "name": { + "type": "string", + "description": "Name of the layer", + "example": "Layer 1" + } + }, + "example": { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + }, + "required": ["name"] }, - "ListResponseBody7": { + "ScheduleLayerV2": { "type": "object", "properties": { - "incident_attachments": { + "id": { + "type": "string", + "description": "Unique identifier of the layer", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "name": { + "type": "string", + "description": "Name of the layer", + "example": "Layer 1" + } + }, + "example": { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + }, + "ScheduleRotationCreatePayloadV2": { + "type": "object", + "properties": { + "effective_from": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "handover_start_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "handovers": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentAttachmentV1" + "$ref": "#/components/schemas/ScheduleRotationHandoverV2" }, "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "resource": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" - } + "interval": 1, + "interval_type": "daily" } ] - } - }, - "example": { - "incident_attachments": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "resource": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" - } - } - ] - }, - "required": [ - "incident_attachments" - ] - }, - "ListResponseBody8": { - "type": "object", - "properties": { - "incident_roles": { + }, + "id": { + "type": "string", + "description": "Unique identifier of the rotation", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layers": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleV1" + "$ref": "#/components/schemas/ScheduleLayerCreatePayloadV2" }, "example": [ { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ] - } - }, - "example": { - "incident_roles": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "required": [ - "incident_roles" - ] - }, - "ListResponseBody9": { - "type": "object", - "properties": { - "incident_roles": { + }, + "name": { + "type": "string", + "description": "Name of the rotation", + "example": "My Rotation" + }, + "users": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleV2" + "$ref": "#/components/schemas/UserReferencePayloadV1" }, "example": [ { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" } ] - } - }, - "example": { - "incident_roles": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "required": [ - "incident_roles" - ] - }, - "ListTypesResponseBody": { - "type": "object", - "properties": { - "catalog_types": { + }, + "working_interval": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeV2" + "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalV2" }, "example": [ { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" } ] } }, "example": { - "catalog_types": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" } ] }, - "required": [ - "catalog_types" - ] - }, - "PaginationMetaResult": { - "type": "object", - "properties": { - "after": { - "type": "string", - "description": "If provided, pass this as the 'after' param to load the next page", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "page_size": { - "type": "integer", - "description": "What was the maximum number of results requested", - "default": 25, - "example": 25, - "format": "int64" - } - }, - "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - }, - "required": [ - "page_size" - ] + "required": ["name"] }, - "PaginationMetaResultWithTotal": { + "ScheduleRotationHandoverV2": { "type": "object", "properties": { - "after": { - "type": "string", - "description": "If provided, pass this as the 'after' param to load the next page", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "page_size": { + "interval": { "type": "integer", - "description": "What was the maximum number of results requested", - "default": 25, - "example": 25, + "example": 1, "format": "int64" }, - "total_record_count": { - "type": "integer", - "description": "How many matching records were there in total, if known", - "example": 238, - "format": "int64" + "interval_type": { + "type": "string", + "example": "daily", + "enum": ["hourly", "daily", "weekly"] } }, "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 - }, - "required": [ - "page_size" - ] + "interval": 1, + "interval_type": "daily" + } }, - "PrivateIncidentAccessAttemptedV1ResponseBody": { + "ScheduleRotationUpdatePayloadV2": { "type": "object", "properties": { - "action": { + "effective_from": { "type": "string", - "description": "The type of log entry that this is", - "example": "private_incident.access_attempted" - }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" - }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" - }, - "metadata": { - "$ref": "#/components/schemas/AuditLogPrivateIncidentAccessAttemptedMetadataV2" + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "occurred_at": { + "handover_start_at": { "type": "string", - "description": "When the entry occurred", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" }, - "targets": { + "handovers": { "type": "array", "items": { - "$ref": "#/components/schemas/AuditLogTargetV2" + "$ref": "#/components/schemas/ScheduleRotationHandoverV2" }, - "description": "The custom field that was created", "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "interval": 1, + "interval_type": "daily" } ] }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" - } - }, - "example": { - "action": "private_incident.access_attempted", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" + "id": { + "type": "string", + "description": "Unique identifier of the rotation", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayerV2" }, - "name": "John Doe", - "type": "user" + "example": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ] }, - "context": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" + "name": { + "type": "string", + "description": "Name of the rotation", + "example": "My Rotation" }, - "metadata": { - "outcome": "granted" + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReferencePayloadV1" + }, + "example": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ] }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ + "working_interval": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalUpdatePayloadV2" + }, + "example": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + }, + "example": { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "interval": 1, + "interval_type": "daily" } ], - "version": 1 - }, - "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context", - "metadata" - ] + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } }, - "PrivateIncidentActionCreatedV1ResponseBody": { + "ScheduleRotationV2": { "type": "object", "properties": { - "event_type": { + "effective_from": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.action_created_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "description": "When this rotation config will be effective from", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "handover_start_at": { + "type": "string", + "description": "Defines the next moment we'll trigger a handover", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "handovers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRotationHandoverV2" + }, + "description": "Defines the handover intervals for this rota, in order they should apply", + "example": [ + { + "interval": 1, + "interval_type": "daily" + } ] }, - "private_incident.action_created_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" - } - }, - "example": { - "event_type": "private_incident.action_created_v1", - "private_incident.action_created_v1": { - "id": "abc123" - } - }, - "required": [ - "event_type", - "private_incident.action_created_v1" - ] - }, - "PrivateIncidentActionUpdatedV1ResponseBody": { - "type": "object", - "properties": { - "event_type": { + "id": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.action_updated_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "description": "Unique internal ID of the rotation", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayerV2" + }, + "description": "Controls how many people are on-call concurrently", + "example": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } ] }, - "private_incident.action_updated_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "name": { + "type": "string", + "description": "Human readable name synced from external provider", + "example": "Primary On-Call Schedule" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserV1" + }, + "example": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ] + }, + "working_interval": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalV2" + }, + "example": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] } }, "example": { - "event_type": "private_incident.action_updated_v1", - "private_incident.action_updated_v1": { - "id": "abc123" - } + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] }, "required": [ - "event_type", - "private_incident.action_updated_v1" + "id", + "name", + "layers", + "user_ids", + "working_intervals", + "handover_start_at", + "handovers" ] }, - "PrivateIncidentFollowUpCreatedV1ResponseBody": { + "ScheduleRotationWorkingIntervalUpdatePayloadV2": { "type": "object", "properties": { - "event_type": { + "end_time": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.follow_up_created_v1", + "description": "End time of the interval, in 24hr format", + "example": "17:00" + }, + "start_time": { + "type": "string", + "description": "Start time of the interval, in 24hr format", + "example": "09:00" + }, + "weekday": { + "type": "string", + "description": "Weekday this interval applies to", + "example": "tuesday", "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" ] - }, - "private_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "event_type": "private_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1": { - "id": "abc123" - } - }, - "required": [ - "event_type", - "private_incident.follow_up_created_v1" - ] + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } }, - "PrivateIncidentFollowUpUpdatedV1ResponseBody": { + "ScheduleRotationWorkingIntervalV2": { "type": "object", "properties": { - "event_type": { + "end_time": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.follow_up_updated_v1", + "description": "End time of the interval, in 24hr format", + "example": "17:00" + }, + "start_time": { + "type": "string", + "description": "Start time of the interval, in 24hr format", + "example": "09:00" + }, + "weekday": { + "type": "string", + "description": "Weekday this interval applies to", + "example": "tuesday", "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" ] - }, - "private_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "event_type": "private_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1": { - "id": "abc123" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + }, + "required": ["weekday", "start_time", "end_time"] + }, + "ScheduleUpdatePayloadV2": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about the schedule", + "example": { + "incident.io/terraform/version": "version-of-terraform" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "config": { + "$ref": "#/components/schemas/ScheduleConfigUpdatePayloadV2" + }, + "name": { + "type": "string", + "description": "Name of the schedule", + "example": "My Schedule" + }, + "timezone": { + "type": "string", + "description": "Timezone of the schedule", + "example": "America/Los_Angeles" } }, - "required": [ - "event_type", - "private_incident.follow_up_updated_v1" - ] + "example": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } }, - "PrivateIncidentIncidentCreatedV2ResponseBody": { + "ScheduleV2": { "type": "object", "properties": { - "event_type": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "config": { + "$ref": "#/components/schemas/ScheduleConfigV2" + }, + "created_at": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.incident_created_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "current_shifts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleEntryV2" + }, + "description": "Shifts that are on-going for this schedule, if a native schedule", + "example": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } ] }, - "private_incident.incident_created_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "id": { + "type": "string", + "description": "Unique internal ID of the schedule", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "name": { + "type": "string", + "description": "Human readable name synced from external provider", + "example": "Primary On-Call Schedule" + }, + "timezone": { + "type": "string", + "description": "Timezone of the schedule, as interpreted at the point of generating the report", + "example": "Europe/London" + }, + "updated_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "event_type": "private_incident.incident_created_v2", - "private_incident.incident_created_v2": { - "id": "abc123" - } + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ - "event_type", - "private_incident.incident_created_v2" + "annotations", + "id", + "name", + "timezone", + "external_provider", + "external_provider_id", + "created_at", + "updated_at" ] }, - "PrivateIncidentIncidentUpdatedV2ResponseBody": { + "ScimGroupRoleMappingsUpdatedV1ResponseBody": { "type": "object", "properties": { - "event_type": { + "action": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.incident_updated_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" + "description": "The type of log entry that this is", + "example": "scim_group.role_mappings_updated" + }, + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" + }, + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" + }, + "metadata": { + "$ref": "#/components/schemas/AuditLogUserSCIMGroupMappingChangedMetadataV2" + }, + "occurred_at": { + "type": "string", + "description": "When the entry occurred", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogTargetV2" + }, + "description": "The custom field that was created", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Security", + "type": "scim_group" + } ] }, - "private_incident.incident_updated_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "event_type": "private_incident.incident_updated_v2", - "private_incident.incident_updated_v2": { - "id": "abc123" - } + "action": "scim_group.role_mappings_updated", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "metadata": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Security", + "type": "scim_group" + } + ], + "version": 1 }, "required": [ - "event_type", - "private_incident.incident_updated_v2" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "PrivateIncidentMembershipGrantedV1ResponseBody": { + "SeverityV2": { "type": "object", "properties": { - "event_type": { + "created_at": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.membership_granted_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "private_incident.membership_granted_v1": { - "$ref": "#/components/schemas/WebhookIncidentUserV2" - } - }, - "example": { - "event_type": "private_incident.membership_granted_v1", - "private_incident.membership_granted_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" - } - }, - "required": [ - "event_type", - "private_incident.membership_granted_v1" - ] - }, - "PrivateIncidentMembershipRevokedV1ResponseBody": { - "type": "object", - "properties": { - "event_type": { + "description": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.membership_revoked_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] + "description": "Description of the severity", + "example": "Issues with **low impact**." }, - "private_incident.membership_revoked_v1": { - "$ref": "#/components/schemas/WebhookIncidentUserV2" + "id": { + "type": "string", + "description": "Unique identifier of the severity", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Human readable name of the severity", + "example": "Minor", + "maxLength": 50 + }, + "rank": { + "type": "integer", + "description": "Rank to help sort severities (lower numbers are less severe)", + "example": 1, + "format": "int64" + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "event_type": "private_incident.membership_revoked_v1", - "private_incident.membership_revoked_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" - } + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ - "event_type", - "private_incident.membership_revoked_v1" + "id", + "name", + "description", + "rank", + "created_at", + "updated_at" ] }, - "PublicIncidentActionCreatedV1ResponseBody": { + "ShowEntryResponseBody": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.action_created_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryV2" }, - "public_incident.action_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" } }, "example": { - "event_type": "public_incident.action_created_v1", - "public_incident.action_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "follow_up": true, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": ["pager_duty"], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "event_type", - "public_incident.action_created_v1" - ] + "required": ["catalog_type", "catalog_entry"] }, - "PublicIncidentActionUpdatedV1ResponseBody": { + "ShowResponseBody": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.action_updated_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.action_updated_v1": { + "action": { "$ref": "#/components/schemas/ActionV1" } }, "example": { - "event_type": "public_incident.action_updated_v1", - "public_incident.action_updated_v1": { + "action": { "assignee": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -13830,161 +20752,54 @@ "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "event_type", - "public_incident.action_updated_v1" - ] + "required": ["action"] }, - "PublicIncidentFollowUpCreatedV1ResponseBody": { + "ShowResponseBody10": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.follow_up_created_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "incident_timestamp": { + "$ref": "#/components/schemas/IncidentTimestampV2" } }, "example": { - "event_type": "public_incident.follow_up_created_v1", - "public_incident.follow_up_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 } }, - "required": [ - "event_type", - "public_incident.follow_up_created_v1" - ] + "required": ["incident_timestamp"] }, - "PublicIncidentFollowUpUpdatedV1ResponseBody": { + "ShowResponseBody11": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.follow_up_updated_v1", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/ActionV1" + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" } }, "example": { - "event_type": "public_incident.follow_up_updated_v1", - "public_incident.follow_up_updated_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "incident_type": { + "create_in_triage": "always", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, + "description": "Customer facing production outages", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "event_type", - "public_incident.follow_up_updated_v1" - ] + "required": ["incident_type"] }, - "PublicIncidentIncidentCreatedV2ResponseBody": { + "ShowResponseBody12": { "type": "object", "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_created_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.incident_created_v2": { - "$ref": "#/components/schemas/IncidentV2" + "incident": { + "$ref": "#/components/schemas/IncidentV1" } }, "example": { - "event_type": "public_incident.incident_created_v2", - "public_incident.incident_created_v2": { + "incident": { "call_url": "https://zoom.us/foo", "created_at": "2021-08-17T13:28:57.801578Z", "creator": { @@ -14019,10 +20834,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -14040,20 +20852,6 @@ ] } ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { @@ -14064,37 +20862,16 @@ "role": "viewer", "slack_user_id": "U02AYNF2XJM" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" } } ], @@ -14108,7 +20885,7 @@ "private_incidents_only": false, "updated_at": "2021-08-17T13:28:57.801578Z" }, - "mode": "standard", + "mode": "real", "name": "Our database is sad", "permalink": "https://app.incident.io/incidents/123", "postmortem_document_url": "https://docs.google.com/my_doc_id", @@ -14120,261 +20897,33 @@ "name": "Minor", "rank": 1, "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 - } - }, - "required": [ - "event_type", - "public_incident.incident_created_v2" - ] - }, - "PublicIncidentIncidentStatusUpdatedV2ResponseBody": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_status_updated_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.incident_status_updated_v2": { - "$ref": "#/components/schemas/IncidentWithStatusChangeV2" - } - }, - "example": { - "event_type": "public_incident.incident_status_updated_v2", - "public_incident.incident_status_updated_v2": { - "incident": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 - }, - "new_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "previous_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - }, - "required": [ - "event_type", - "public_incident.incident_status_updated_v2" - ] - }, - "PublicIncidentIncidentUpdatedV2ResponseBody": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_updated_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.incident_status_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1", - "public_incident.action_created_v1", - "private_incident.action_created_v1", - "public_incident.action_updated_v1", - "private_incident.action_updated_v1", - "private_incident.membership_granted_v1", - "private_incident.membership_revoked_v1" - ] - }, - "public_incident.incident_updated_v2": { + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "timestamps": [ + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" + } + }, + "required": ["incident"] + }, + "ShowResponseBody13": { + "type": "object", + "properties": { + "incident": { "$ref": "#/components/schemas/IncidentV2" } }, "example": { - "event_type": "public_incident.incident_updated_v2", - "public_incident.incident_updated_v2": { + "incident": { "call_url": "https://zoom.us/foo", "created_at": "2021-08-17T13:28:57.801578Z", "creator": { @@ -14409,10 +20958,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -14493,1750 +21039,3484 @@ "created_at": "2021-08-17T13:28:57.801578Z", "description": "Customer facing production outages", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + }, + "required": ["incident"] + }, + "ShowResponseBody14": { + "type": "object", + "properties": { + "schedule": { + "$ref": "#/components/schemas/ScheduleV2" + } + }, + "example": { + "schedule": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "current_shifts": [ + { + "end_at": "2021-08-17T13:28:57.801578Z", + "entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["schedule"] + }, + "ShowResponseBody15": { + "type": "object", + "properties": { + "severity": { + "$ref": "#/components/schemas/SeverityV2" + } + }, + "example": { + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["severity"] + }, + "ShowResponseBody16": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/UserWithRolesV2" + } + }, + "example": { + "user": { + "base_role": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "custom_roles": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "required": ["user"] + }, + "ShowResponseBody2": { + "type": "object", + "properties": { + "action": { + "$ref": "#/components/schemas/ActionV2" + } + }, + "example": { + "action": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["action"] + }, + "ShowResponseBody3": { + "type": "object", + "properties": { + "custom_field_option": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + } + }, + "example": { + "custom_field_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + }, + "required": ["custom_field_option"] + }, + "ShowResponseBody4": { + "type": "object", + "properties": { + "custom_field": { + "$ref": "#/components/schemas/CustomFieldV1" + } + }, + "example": { + "custom_field": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ], + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["custom_field"] + }, + "ShowResponseBody5": { + "type": "object", + "properties": { + "custom_field": { + "$ref": "#/components/schemas/CustomFieldV2" + } + }, + "example": { + "custom_field": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["custom_field"] + }, + "ShowResponseBody6": { + "type": "object", + "properties": { + "follow_up": { + "$ref": "#/components/schemas/FollowUpV2" + } + }, + "example": { + "follow_up": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, - "required": [ - "event_type", - "public_incident.incident_updated_v2" - ] + "required": ["follow_up"] }, - "RBACRoleV2": { + "ShowResponseBody7": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the purpose for the RBAC role", - "example": "Elevated permissions for the customer success team." - }, - "id": { - "type": "string", - "description": "Unique identifier of the RBAC role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "name": { - "type": "string", - "description": "Name of the RBAC role", - "example": "Customer Success" - }, - "slug": { - "type": "string", - "description": "Unique human-readable slug for the RBAC role", - "example": "customer-success" + "incident_role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "example": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "incident_role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } }, - "required": [ - "id", - "name", - "slug" - ] + "required": ["incident_role"] }, - "RetrospectiveIncidentOptionsV2": { + "ShowResponseBody8": { "type": "object", "properties": { - "slack_channel_id": { - "type": "string", - "description": "If the incident mode is 'retrospective', pass the ID of a Slack channel in your workspace to attach the incident to an existing channel, rather than creating a new one", - "example": "abc123" + "incident_role": { + "$ref": "#/components/schemas/IncidentRoleV2" } }, "example": { - "slack_channel_id": "abc123" - } + "incident_role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["incident_role"] }, - "ScimGroupRoleMappingsUpdatedV1ResponseBody": { + "ShowResponseBody9": { "type": "object", "properties": { - "action": { - "type": "string", - "description": "The type of log entry that this is", - "example": "scim_group.role_mappings_updated" - }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" - }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" - }, - "metadata": { - "$ref": "#/components/schemas/AuditLogUserSCIMGroupMappingChangedMetadataV2" + "incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + } + }, + "example": { + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": ["incident_status"] + }, + "ShowWorkflowResponseBody": { + "type": "object", + "properties": { + "management_meta": { + "$ref": "#/components/schemas/ManagementMetaV2" }, - "occurred_at": { - "type": "string", - "description": "When the entry occurred", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "workflow": { + "$ref": "#/components/schemas/Workflow" + } + }, + "example": { + "management_meta": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" }, - "targets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuditLogTargetV2" + "workflow": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 }, - "description": "The custom field that was created", - "example": [ + "expressions": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } - ] - }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" - } - }, - "example": { - "action": "scim_group.role_mappings_updated", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" }, - "name": "John Doe", - "type": "user" - }, - "context": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "metadata": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" - } - ], - "version": 1 + "version": 3 + } }, - "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context", - "metadata" - ] + "required": ["workflow", "management_meta"] }, - "SeverityV2": { + "StepConfig": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { + "for_each": { "type": "string", - "description": "Description of the severity", - "example": "Issues with **low impact**." + "description": "Reference to the loop variable to run this step over", + "example": "abc123" }, "id": { "type": "string", - "description": "Unique identifier of the severity", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Unique ID of this step in a workflow", + "example": "abc123" }, - "name": { + "label": { "type": "string", - "description": "Human readable name of the severity", - "example": "Minor", - "maxLength": 50 - }, - "rank": { - "type": "integer", - "description": "Rank to help sort severities (lower numbers are less severe)", - "example": 1, - "format": "int64" + "description": "Human readable identifier for this step", + "example": "PagerDuty Escalate" }, - "updated_at": { + "name": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - } - }, - "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "id", - "name", - "description", - "rank", - "created_at", - "updated_at" - ] - }, - "ShowEntryResponseBody": { - "type": "object", - "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryV2" + "description": "Unique name of the step in the engine", + "example": "pagerduty.escalate" }, - "catalog_type": { - "$ref": "#/components/schemas/CatalogTypeV2" - } - }, - "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "description": "Bindings for the step parameters", + "example": [ + { "array_value": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "reference": "incident.severity" } ], "value": { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "helptext": "Collection of standalone automations like auto-closing incidents.", - "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", - "is_image_slack_icon": false, "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "reference": "incident.severity" } } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "yellow", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "dynamic_resource_parameter": "abc123", - "estimated_count": 7, - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "last_synced_at": "2021-08-17T13:28:57.801578Z", - "name": "Kubernetes Cluster", - "ranked": true, - "registry_type": "PagerDutyService", - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ + ] + } + }, + "example": { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "version": 1 - }, - "semantic_type": "custom", - "source_repo_url": "https://github.com/my-company/incident-io-catalog", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] }, "required": [ - "catalog_type", - "catalog_entry" + "id", + "name", + "label", + "description", + "param_bindings", + "params" ] }, - "ShowResponseBody": { + "StepConfigPayload": { "type": "object", "properties": { - "action": { - "$ref": "#/components/schemas/ActionV1" - } - }, - "example": { - "action": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "for_each": { + "type": "string", + "description": "Reference to an expression that returns resources to run this step over", + "example": "abc123" + }, + "id": { + "type": "string", + "description": "Unique ID of this step in a workflow. This must be a valid ULID.", + "example": "abc123" + }, + "name": { + "type": "string", + "description": "Unique name of the step in the engine", + "example": "pagerduty.escalate" + }, + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "description": "List of parameter bindings", + "example": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } }, + "example": { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + }, "required": [ - "action" + "id", + "name", + "param_bindings", + "label", + "description", + "params" ] }, - "ShowResponseBody10": { + "StepConfigSlim": { "type": "object", "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" + "label": { + "type": "string", + "description": "Human readable identifier for this step", + "example": "PagerDuty Escalate" + }, + "name": { + "type": "string", + "description": "Unique name of the step in the engine", + "example": "pagerduty.escalate" } }, "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" }, - "required": [ - "incident_timestamp" - ] + "required": ["name", "label", "description", "params"] }, - "ShowResponseBody11": { + "TriggerSlim": { "type": "object", "properties": { - "incident_type": { - "$ref": "#/components/schemas/IncidentTypeV1" + "label": { + "type": "string", + "description": "Human readable identifier for this trigger", + "example": "Incident Updated" + }, + "name": { + "type": "string", + "description": "Unique name of the trigger", + "example": "incident.updated" } }, "example": { - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "label": "Incident Updated", + "name": "incident.updated" }, - "required": [ - "incident_type" - ] + "required": ["name", "label"] }, - "ShowResponseBody12": { + "UpdateEntryRequestBody": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV1" - } - }, - "example": { - "incident": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ + "description": "Optional aliases that can be used to reference this entry", + "example": ["lawrence@incident.io", "lawrence"] + }, + "attribute_values": { + "type": "object", + "description": "Values of this entry", + "example": { + "abc123": { + "array_value": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" + "literal": "SEV123", + "reference": "incident.severity" } - ] - } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "real", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "status": "triage", - "summary": "Our database is really really sad, and we don't know why yet.", - "timestamps": [ - { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "external_id": { + "type": "string", + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" + }, + "rank": { + "type": "integer", + "description": "When catalog type is ranked, this is used to help order things", + "example": 3, + "format": "int32" + } + }, + "example": { + "aliases": ["lawrence@incident.io", "lawrence"], + "attribute_values": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + } + }, + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "name": "Primary On-call", + "rank": 3 + }, + "required": ["name", "attribute_values"] + }, + "UpdateRequestBody": { + "type": "object", + "properties": { + "sort_key": { + "type": "integer", + "description": "Sort key used to order the custom field options correctly", + "default": 1000, + "example": 10, + "format": "int64" + }, + "value": { + "type": "string", + "description": "Human readable name for the custom field option", + "example": "Product" + } + }, + "example": { + "sort_key": 10, + "value": "Product" + }, + "required": ["value", "custom_field_id", "sort_key"] + }, + "UpdateRequestBody2": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "required": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", + "example": "never", + "enum": ["never", "before_closure", "always"] + }, + "required_v2": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle.", + "example": "never", + "enum": ["never", "before_resolution", "always"] + }, + "show_before_closure": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", + "example": true + }, + "show_before_creation": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", + "example": true + }, + "show_before_update": { + "type": "boolean", + "description": "Whether a custom field should be shown in the incident update modal.", + "example": true + }, + "show_in_announcement_post": { + "type": "boolean", + "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", + "example": true } }, + "example": { + "description": "Which team is impacted by this issue", + "name": "Affected Team", + "required": "never", + "required_v2": "never", + "show_before_closure": true, + "show_before_creation": true, + "show_before_update": true, + "show_in_announcement_post": true + }, "required": [ - "incident" + "name", + "description", + "field_type", + "show_before_creation", + "show_before_closure", + "show_before_update", + "options", + "created_at", + "updated_at" ] }, - "ShowResponseBody13": { + "UpdateRequestBody3": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV2" + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 } }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, - "value_text": "This is my text field, I hope you like it" - } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ - { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public", - "workload_minutes_late": 40.7, - "workload_minutes_sleeping": 0, - "workload_minutes_total": 60.7, - "workload_minutes_working": 20 + "description": "Which team is impacted by this issue", + "name": "Affected Team" + }, + "required": [ + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" + ] + }, + "UpdateRequestBody4": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 + }, + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "required": { + "type": "boolean", + "description": "DEPRECATED: this will always be false.", + "example": false + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 } }, + "example": { + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "shortform": "lead" + }, "required": [ - "incident" + "condition_groups", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" ] }, - "ShowResponseBody14": { + "UpdateRequestBody5": { "type": "object", "properties": { - "severity": { - "$ref": "#/components/schemas/SeverityV2" + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 + }, + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role. Note that this will be empty for the 'reporter' role.", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead", + "minLength": 1 } }, "example": { - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "shortform": "lead" }, "required": [ - "severity" + "condition_groups", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" ] }, - "ShowResponseBody15": { + "UpdateRequestBody6": { "type": "object", "properties": { - "user": { - "$ref": "#/components/schemas/UserWithRolesV2" + "description": { + "type": "string", + "description": "Rich text description of the incident status", + "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." + }, + "name": { + "type": "string", + "description": "Unique name of this status", + "example": "Closed" } }, "example": { - "user": { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - } - ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "name": "Closed" }, "required": [ - "user" + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "ShowResponseBody2": { + "UpdateRequestBody7": { "type": "object", "properties": { - "action": { - "$ref": "#/components/schemas/ActionV2" + "schedule": { + "$ref": "#/components/schemas/ScheduleUpdatePayloadV2" } }, "example": { - "action": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "schedule": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "config": { + "rotations": [ + { + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "daily" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", + "users": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "tuesday" + } + ] + } + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" } }, "required": [ - "action" + "schedule", + "annotations", + "name", + "timezone", + "external_provider", + "external_provider_id", + "created_at", + "updated_at" ] }, - "ShowResponseBody3": { + "UpdateTypeRequestBody": { "type": "object", "properties": { - "custom_field_option": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "color": { + "type": "string", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] + }, + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." + }, + "icon": { + "type": "string", + "description": "Sets the display icon of this type in the dashboard", + "example": "bolt", + "enum": [ + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "store", + "star", + "tag", + "user", + "users" + ] + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" + }, + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true + }, + "source_repo_url": { + "type": "string", + "description": "The url of the external repository where this type is managed", + "example": "https://github.com/my-company/incident-io-catalog" + } + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "bolt", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog" + }, + "required": ["name", "description"] + }, + "UpdateTypeSchemaRequestBody": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeAttributePayloadV2" + }, + "example": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ] + }, + "version": { + "type": "integer", + "example": 1, + "format": "int64" } }, "example": { - "custom_field_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 }, "required": [ - "custom_field_option" + "attributes", + "version", + "name", + "description", + "type_name", + "semantic_type", + "ranked", + "schema", + "icon", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "engine_resource_type", + "mode", + "use_name_as_identifier" ] }, - "ShowResponseBody4": { + "UpdateWorkflowRequestBody": { "type": "object", "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldV1" - } - }, - "example": { - "custom_field": { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "List of conditions to apply to the workflow", + "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] } - ], - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true, - "updated_at": "2021-08-17T13:28:57.801578Z" + ] + }, + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true + }, + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionPayloadV2" + }, + "description": "The expressions used in the workflow", + "example": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } + ], + "reference": "abc123", + "root_reference": "incident.status" + } + ] + }, + "folder": { + "type": "string", + "description": "Folder to display the workflow in", + "example": "My folder 01" + }, + "include_private_incidents": { + "type": "boolean", + "description": "Whether to include private incidents", + "example": true + }, + "name": { + "type": "string", + "description": "The human-readable name of the workflow", + "example": "My workflow" + }, + "once_for": { + "type": "array", + "items": { + "type": "string", + "example": "incident.url" + }, + "description": "Once For strategy to apply to this workflow", + "example": ["incident.url"] + }, + "runs_on_incident_modes": { + "type": "array", + "items": { + "type": "string", + "example": "test", + "enum": ["standard", "test", "retrospective"] + }, + "description": "Which modes of incident this should run on (defaults to just standard incidents)", + "example": ["standard", "retrospective"] + }, + "runs_on_incidents": { + "type": "string", + "description": "Which incidents should the workflow be applied to? (newly_created or newly_created_and_active)", + "example": "newly_created", + "enum": ["newly_created", "newly_created_and_active"] + }, + "state": { + "type": "string", + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", + "enum": ["active", "disabled", "draft", "error"] + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepConfigPayload" + }, + "description": "List of step to execute as part of the workflow", + "example": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ] } }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "navigate": { + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + } + } + ], + "reference": "abc123", + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "include_private_incidents": true, + "name": "My workflow", + "once_for": ["incident.url"], + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ] + }, "required": [ - "custom_field" + "name", + "once_for", + "condition_groups", + "steps", + "expressions", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents" ] }, - "ShowResponseBody5": { + "UserReferencePayloadV1": { "type": "object", "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldV2" + "email": { + "type": "string", + "description": "The user's email address, matching the email on their Slack account", + "example": "bob@example.com" + }, + "id": { + "type": "string", + "description": "The incident.io ID of a user", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "slack_user_id": { + "type": "string", + "description": "The ID of the user's Slack account.", + "example": "USER123" } }, "example": { - "custom_field": { - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "custom_field" - ] + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } }, - "ShowResponseBody6": { + "UserRoleMembershipsUpdatedV1ResponseBody": { "type": "object", "properties": { - "follow_up": { - "$ref": "#/components/schemas/FollowUpV2" - } - }, - "example": { - "follow_up": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "priority": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "user.role_memberships_updated" + }, + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" + }, + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" + }, + "metadata": { + "$ref": "#/components/schemas/AuditLogUserRoleMembershipChangedMetadataV2" + }, + "occurred_at": { + "type": "string", + "description": "When the entry occurred", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogTargetV2" }, - "status": "outstanding", - "title": "Cat is stuck in the tree", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "follow_up" - ] - }, - "ShowResponseBody7": { - "type": "object", - "properties": { - "incident_role": { - "$ref": "#/components/schemas/IncidentRoleV1" - } - }, - "example": { - "incident_role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "incident_role" - ] - }, - "ShowResponseBody8": { - "type": "object", - "properties": { - "incident_role": { - "$ref": "#/components/schemas/IncidentRoleV2" + "description": "The custom field that was created", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Bob the builder", + "type": "user" + } + ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "incident_role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "action": "user.role_memberships_updated", + "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "metadata": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Bob the builder", + "type": "user" + } + ], + "version": 1 }, "required": [ - "incident_role" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "ShowResponseBody9": { + "UserV1": { "type": "object", "properties": { - "incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "email": { + "type": "string", + "description": "Email address of the user.", + "example": "lisa@incident.io" + }, + "id": { + "type": "string", + "description": "Unique identifier of the user", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Name of the user", + "example": "Lisa Karlin Curtis" + }, + "role": { + "type": "string", + "description": "DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated.", + "example": "viewer", + "enum": ["viewer", "responder", "administrator", "owner", "unset"] + }, + "slack_user_id": { + "type": "string", + "description": "Slack ID of the user", + "example": "U02AYNF2XJM" } }, "example": { - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, "required": [ - "incident_status" + "role", + "id", + "slack_role", + "name", + "deprecated_base_role", + "organisation_id" ] }, - "UpdateEntryRequestBody": { + "UserWithRolesV2": { "type": "object", "properties": { - "aliases": { + "base_role": { + "$ref": "#/components/schemas/RBACRoleV2" + }, + "custom_roles": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/RBACRoleV2" }, - "description": "Optional aliases that can be used to reference this entry", "example": [ - "lawrence@incident.io", - "lawrence" + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } ] }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "additionalProperties": { - "$ref": "#/components/schemas/EngineParamBindingPayloadV2" - } + "email": { + "type": "string", + "description": "Email address of the user.", + "example": "lisa@incident.io" }, - "external_id": { + "id": { "type": "string", - "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", - "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + "description": "Unique identifier of the user", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "name": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + "description": "Name of the user", + "example": "Lisa Karlin Curtis" }, - "rank": { - "type": "integer", - "description": "When catalog type is ranked, this is used to help order things", - "example": 3, - "format": "int32" + "role": { + "type": "string", + "description": "DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated.", + "example": "viewer", + "enum": ["viewer", "responder", "administrator", "owner", "unset"] + }, + "slack_user_id": { + "type": "string", + "description": "Slack ID of the user", + "example": "U02AYNF2XJM" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } + "base_role": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" }, - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "name": "Primary On-call", - "rank": 3 + "custom_roles": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, "required": [ + "base_role", + "custom_roles", + "role", + "id", + "slack_role", "name", - "attribute_values" + "deprecated_base_role", + "organisation_id" ] }, - "UpdateRequestBody": { + "WebhookIncidentUserV2": { "type": "object", "properties": { - "sort_key": { - "type": "integer", - "description": "Sort key used to order the custom field options correctly", - "default": 1000, - "example": 10, - "format": "int64" + "actor_user_id": { + "type": "string", + "description": "The ID of the user who performed this action. If the action was not taken by a user, for example it was taken by a Workflow, this will be empty.", + "example": "abc123" }, - "value": { + "incident_id": { "type": "string", - "description": "Human readable name for the custom field option", - "example": "Product" + "description": "The ID of the incident", + "example": "abc123" + }, + "user_id": { + "type": "string", + "description": "The ID of the user", + "example": "abc123" } }, "example": { - "sort_key": 10, - "value": "Product" + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" }, - "required": [ - "value", - "custom_field_id", - "sort_key" - ] + "required": ["incident_id", "user_id"] }, - "UpdateRequestBody2": { + "WebhookIncidentV2": { "type": "object", "properties": { - "description": { + "call_url": { + "type": "string", + "description": "The call URL attached to this incident", + "example": "https://zoom.us/foo" + }, + "created_at": { + "type": "string", + "description": "When the incident was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "creator": { + "$ref": "#/components/schemas/ActorV2" + }, + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryV1" + }, + "description": "Custom field entries for this incident", + "example": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ] + }, + "duration_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" + }, + "description": "Incident duration metrics and their measurements for this incident", + "example": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ] + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentV1" + }, + "description": "A list of who is assigned to each role for this incident", + "example": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ] + }, + "incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + }, + "incident_timestamp_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampWithValueV2" + }, + "description": "Incident lifecycle events and when they occurred", + "example": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ] + }, + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" + }, + "mode": { "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "standard", + "enum": ["standard", "retrospective", "test", "tutorial"] }, "name": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "required": { + "permalink": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" - ] + "description": "A permanent link to the homepage for this incident", + "example": "https://app.incident.io/incidents/123" }, - "required_v2": { + "postmortem_document_url": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle.", - "example": "never", - "enum": [ - "never", - "before_resolution", - "always" - ] + "description": "Description of the incident", + "example": "https://docs.google.com/my_doc_id" }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.", - "example": true + "reference": { + "type": "string", + "description": "Reference to this incident, as displayed across the product", + "example": "INC-123" }, - "show_before_creation": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.", - "example": true + "related_incidents": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Incident IDs of incidents related to this incident", + "example": ["INC-237"] }, - "show_before_update": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident update modal.", - "example": true + "severity": { + "$ref": "#/components/schemas/SeverityV2" }, - "show_in_announcement_post": { - "type": "boolean", - "description": "Whether a custom field should be shown in the list of fields as part of the announcement post when set.", - "example": true - } - }, - "example": { - "description": "Which team is impacted by this issue", - "name": "Affected Team", - "required": "never", - "required_v2": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true - }, - "required": [ - "name", - "description", - "field_type", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody3": { - "type": "object", - "properties": { - "description": { + "slack_channel_id": { "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" + "description": "ID of the Slack channel in the organisation Slack workspace. Note that the channel is sometimes created asynchronously, so may not be present when the incident is just created.", + "example": "C02AW36C1M5" }, - "name": { - "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 - } - }, - "example": { - "description": "Which team is impacted by this issue", - "name": "Affected Team" - }, - "required": [ - "name", - "description", - "field_type", - "cannot_be_unset", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody4": { - "type": "object", - "properties": { - "description": { + "slack_channel_name": { "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 + "description": "Name of the slack channel", + "example": "inc-165-green-parrot" }, - "instructions": { + "slack_team_id": { "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" + "description": "ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams.", + "example": "T02A1FSLE8J" }, - "name": { + "summary": { "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." }, - "required": { - "type": "boolean", - "description": "DEPRECATED: this will always be false.", - "example": false + "updated_at": { + "type": "string", + "description": "When the incident was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "shortform": { + "visibility": { "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": ["public", "private"] + }, + "workload_minutes_late": { + "type": "number", + "description": "Amount of time spent on the incident in late hours", + "example": 40.7, + "format": "double" + }, + "workload_minutes_sleeping": { + "type": "number", + "description": "Amount of time spent on the incident in sleeping hours", + "example": 0, + "format": "double" + }, + "workload_minutes_total": { + "type": "number", + "description": "Amount of time spent on the incident in total", + "example": 60.7, + "format": "double" + }, + "workload_minutes_working": { + "type": "number", + "description": "Amount of time spent on the incident in working hours", + "example": 20, + "format": "double" } }, "example": { - "description": "The person currently coordinating the incident", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "shortform": "lead" - }, - "required": [ - "conditions", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody5": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": ["lawrence@incident.io", "lawrence"], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 - } - }, - "example": { - "description": "The person currently coordinating the incident", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "shortform": "lead" + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "related_incidents": ["INC-237"], + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 }, "required": [ - "conditions", + "incident_status", + "id", + "external_id", + "reference", "name", - "description", - "instructions", - "shortform", - "role_type", + "idempotency_key", + "did_opt_out_of_post_incident_flow", + "visibility", + "mode", + "organisation_id", + "creator", + "last_activity_at", + "incident_role_assignments", + "custom_field_entries", + "slack_team_id", + "slack_channel_id", "created_at", - "updated_at" + "updated_at", + "reported_at" ] }, - "UpdateRequestBody6": { + "WebhookPrivateResourceV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Rich text description of the incident status", - "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." - }, - "name": { + "id": { "type": "string", - "description": "Unique name of this status", - "example": "Closed" + "description": "The ID of the resource", + "example": "abc123" } }, "example": { - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "name": "Closed" + "id": "abc123" }, - "required": [ - "name", - "description", - "rank", - "category", - "created_at", - "updated_at" - ] + "required": ["id"] }, - "UpdateTypeRequestBody": { + "Workflow": { "type": "object", "properties": { - "annotations": { - "type": "object", - "description": "Annotations that can track metadata about this type", - "example": { - "incident.io/catalog-importer/id": "id-of-config" + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" }, - "additionalProperties": { - "type": "string", - "example": "abc123" - } + "description": "Conditions that apply to the workflow trigger", + "example": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] }, - "color": { - "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "yellow", - "enum": [ - "yellow", - "green", - "blue", - "violet", - "pink", - "cyan", - "orange" + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true + }, + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionV2" + }, + "description": "Expressions that make variables available in the scope", + "example": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } ] }, - "description": { - "type": "string", - "description": "Human readble description of this type", - "example": "Represents Kubernetes clusters that we run inside of GKE." - }, - "icon": { + "folder": { "type": "string", - "description": "Sets the display icon of this type in the dashboard", - "example": "bolt", - "enum": [ - "bolt", - "box", - "briefcase", - "browser", - "bulb", - "calendar", - "clock", - "cog", - "components", - "database", - "doc", - "email", - "files", - "flag", - "folder", - "globe", - "money", - "server", - "severity", - "store", - "star", - "tag", - "user", - "users" - ] + "description": "Folder to display the workflow in", + "example": "My folder 01" }, - "name": { + "id": { "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" + "description": "Unique identifier for the workflow", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "ranked": { + "include_private_incidents": { "type": "boolean", - "description": "If this type should be ranked", + "description": "Whether to include private incidents", "example": true }, - "source_repo_url": { + "name": { "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/my-company/incident-io-catalog" - } - }, - "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" + "description": "The human-readable name of the workflow", + "example": "My workflow" }, - "color": "yellow", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "icon": "bolt", - "name": "Kubernetes Cluster", - "ranked": true, - "source_repo_url": "https://github.com/my-company/incident-io-catalog" - }, - "required": [ - "name", - "description" - ] - }, - "UpdateTypeSchemaRequestBody": { - "type": "object", - "properties": { - "attributes": { + "once_for": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeAttributePayloadV2" + "$ref": "#/components/schemas/EngineReferenceV2" }, + "description": "This workflow will run 'once for' a list of references", "example": [ { "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" } ] }, - "version": { - "type": "integer", - "example": 1, - "format": "int64" - } - }, - "example": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "required": [ - "attributes", - "version", - "name", - "description", - "type_name", - "semantic_type", - "ranked", - "schema", - "icon", - "color", - "is_editable", - "annotations", - "created_at", - "updated_at", - "mode" - ] - }, - "UserReferencePayloadV1": { - "type": "object", - "properties": { - "email": { + "runs_from": { "type": "string", - "description": "The user's email address, matching the email on their Slack account", - "example": "bob@example.com" + "description": "The time from which this workflow will run on incidents", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "id": { - "type": "string", - "description": "The incident.io ID of a user", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "runs_on_incident_modes": { + "type": "array", + "items": { + "type": "string", + "example": "test", + "enum": ["standard", "test", "retrospective"] + }, + "description": "Which modes of incident this should run on (defaults to just standard incidents)", + "example": ["standard", "retrospective"] }, - "slack_user_id": { - "type": "string", - "description": "The ID of the user's Slack account.", - "example": "USER123" - } - }, - "example": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - } - }, - "UserRoleMembershipsUpdatedV1ResponseBody": { - "type": "object", - "properties": { - "action": { + "runs_on_incidents": { "type": "string", - "description": "The type of log entry that this is", - "example": "user.role_memberships_updated" - }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" - }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" + "description": "Which incidents should the workflow be applied to? (newly_created or newly_created_and_active)", + "example": "newly_created", + "enum": ["newly_created", "newly_created_and_active"] }, - "metadata": { - "$ref": "#/components/schemas/AuditLogUserRoleMembershipChangedMetadataV2" - }, - "occurred_at": { + "state": { "type": "string", - "description": "When the entry occurred", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", + "enum": ["active", "disabled", "draft", "error"] }, - "targets": { + "steps": { "type": "array", "items": { - "$ref": "#/components/schemas/AuditLogTargetV2" + "$ref": "#/components/schemas/StepConfig" }, - "description": "The custom field that was created", + "description": "Steps that are executed as part of the workflow", "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Bob the builder", - "type": "user" + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } ] }, + "trigger": { + "$ref": "#/components/schemas/TriggerSlim" + }, "version": { "type": "integer", - "description": "Which version the event is", - "example": 1, + "description": "Revision of the workflow, uniquely identifying its version", + "example": 3, "format": "int64" } }, "example": { - "action": "user.role_memberships_updated", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "name": "John Doe", - "type": "user" - }, - "context": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "metadata": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Bob the builder", - "type": "user" + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" } ], - "version": 1 + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 }, "required": [ - "action", - "occurred_at", + "id", + "name", + "trigger", "version", - "actor", - "targets", - "context", - "metadata" + "expressions", + "condition_groups", + "steps", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents", + "once_for", + "state" ] }, - "UserV1": { + "WorkflowDelay": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "Email address of the user.", - "example": "lisa@incident.io" - }, - "id": { - "type": "string", - "description": "Unique identifier of the user", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "name": { - "type": "string", - "description": "Name of the user", - "example": "Lisa Karlin Curtis" - }, - "role": { - "type": "string", - "description": "DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated.", - "example": "viewer", - "enum": [ - "viewer", - "responder", - "administrator", - "owner", - "unset" - ] + "conditions_apply_over_delay": { + "type": "boolean", + "description": "If this workflow is delayed, whether the conditions should be rechecked between trigger firing and execution", + "example": false }, - "slack_user_id": { - "type": "string", - "description": "Slack ID of the user", - "example": "U02AYNF2XJM" + "for_seconds": { + "type": "integer", + "description": "Delay in seconds between trigger firing and running the workflow", + "example": 60, + "format": "int64" } }, "example": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "conditions_apply_over_delay": false, + "for_seconds": 60 }, - "required": [ - "role", - "id", - "slack_role", - "name", - "deprecated_base_role", - "organisation_id" - ] + "required": ["for_seconds", "conditions_apply_over_delay"] }, - "UserWithRolesV2": { + "WorkflowSlim": { "type": "object", "properties": { - "base_role": { - "$ref": "#/components/schemas/RBACRoleV2" + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "Conditions that apply to the workflow trigger", + "example": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] }, - "custom_roles": { + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true + }, + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" + }, + "expressions": { "type": "array", "items": { - "$ref": "#/components/schemas/RBACRoleV2" + "$ref": "#/components/schemas/ExpressionV2" }, + "description": "Expressions that make variables available in the scope", "example": [ { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" } ] }, - "email": { + "folder": { "type": "string", - "description": "Email address of the user.", - "example": "lisa@incident.io" + "description": "Folder to display the workflow in", + "example": "My folder 01" }, "id": { "type": "string", - "description": "Unique identifier of the user", + "description": "Unique identifier for the workflow", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "name": { - "type": "string", - "description": "Name of the user", - "example": "Lisa Karlin Curtis" - }, - "role": { - "type": "string", - "description": "DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated.", - "example": "viewer", - "enum": [ - "viewer", - "responder", - "administrator", - "owner", - "unset" - ] + "include_private_incidents": { + "type": "boolean", + "description": "Whether to include private incidents", + "example": true }, - "slack_user_id": { + "name": { "type": "string", - "description": "Slack ID of the user", - "example": "U02AYNF2XJM" - } - }, - "example": { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "description": "The human-readable name of the workflow", + "example": "My workflow" }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" - } - ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "required": [ - "base_role", - "custom_roles", - "role", - "id", - "slack_role", - "name", - "deprecated_base_role", - "organisation_id" - ] - }, - "WebhookIncidentUserV2": { - "type": "object", - "properties": { - "actor_user_id": { - "type": "string", - "description": "The ID of the user who performed this action", - "example": "abc123" + "once_for": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineReferenceV2" + }, + "description": "This workflow will run 'once for' a list of references", + "example": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ] }, - "incident_id": { + "runs_from": { "type": "string", - "description": "The ID of the incident", - "example": "abc123" + "description": "The time from which this workflow will run on incidents", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "user_id": { + "runs_on_incident_modes": { + "type": "array", + "items": { + "type": "string", + "example": "test", + "enum": ["standard", "test", "retrospective"] + }, + "description": "Which modes of incident this should run on (defaults to just standard incidents)", + "example": ["standard", "retrospective"] + }, + "runs_on_incidents": { "type": "string", - "description": "The ID of the user", - "example": "abc123" - } - }, - "example": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" - }, - "required": [ - "incident_id", - "user_id" - ] - }, - "WebhookPrivateResourceV2": { - "type": "object", - "properties": { - "id": { + "description": "Which incidents should the workflow be applied to? (newly_created or newly_created_and_active)", + "example": "newly_created", + "enum": ["newly_created", "newly_created_and_active"] + }, + "state": { "type": "string", - "description": "The ID of the resource", - "example": "abc123" + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", + "enum": ["active", "disabled", "draft", "error"] + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepConfigSlim" + }, + "description": "Steps that are executed as part of the workflow", + "example": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ] + }, + "trigger": { + "$ref": "#/components/schemas/TriggerSlim" + }, + "version": { + "type": "integer", + "description": "Revision of the workflow, uniquely identifying its version", + "example": 3, + "format": "int64" } }, "example": { - "id": "abc123" + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "navigate": { + "reference": "1235", + "reference_label": "Teams" + }, + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" + } + } + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "root_reference": "incident.status" + } + ], + "folder": "My folder 01", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": ["standard", "retrospective"], + "runs_on_incidents": "newly_created", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 }, "required": [ - "id" + "id", + "name", + "trigger", + "version", + "expressions", + "condition_groups", + "steps", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents", + "once_for", + "state" ] } } @@ -16256,7 +24536,7 @@ }, { "name": "Catalog V2", - "description": "Manage and browse catalog resources.\n\nUse the incident.io catalog to track services, teams, product features and anything\nelse that helps build a map of your organisation. These different categories of thing\nbecome catalog types, and each instance (like a particular service or team) is a\ncatalog entry.\n\nEach type is made up of a series of attributes, and each attribute has a type. Types\ncan even have attributes that refer to other catalog types.\n\nWe automatically create catalog types when you connect an integration, such as GitHub \nrepositories or PagerDuty services and teams. You can use this API to create custom\ntypes, that are specifically tailored to your organisation.\n\nExamples might be a 'Service' type with an 'Alert channel' which you can point at a \nSlack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack\nusers. You can then use these types to create powerful new workflows.\n" + "description": "Manage and browse catalog resources.\n\nUse the incident.io catalog to track services, teams, product features and anything\nelse that helps build a map of your organisation. These different categories of thing\nbecome catalog types, and each instance (like a particular service or team) is a\ncatalog entry.\n\nEach type is made up of a series of attributes, and each attribute has a type. Types\ncan even have attributes that refer to other catalog types.\n\nWe automatically create catalog types when you connect an integration, such as GitHub \nrepositories or PagerDuty services and teams. You can use this API to create custom\ntypes, that are specifically tailored to your organisation.\n\nExamples might be a 'Service' type with an 'Alert channel' which you can point at a \nSlack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack\nusers. You can then use these types to create powerful new workflows.\n\nConsider using our official [catalog importer](https://github.com/incident-io/catalog-importer).\nIt can be used to sync catalog data from sources like local files or GitHub and push \nthem into the incident.io catalog without having to directly interact with our public API.\n" }, { "name": "Custom Field Options V1", @@ -16314,6 +24594,14 @@ "name": "Incidents V2", "description": "Create and read incidents.\n\nIncidents are a core resource, on which many other resources (actions, etc) are created.\n\nCare should be taken around these endpoints, as automation that creates duplicate\nincidents can be distracting, and impact reporting.\n" }, + { + "name": "Managed Resources V2", + "description": "Manage how resources are managed.\n\nAllows callers to set whether a resource is being managed externally, and where the source configuration is.\n" + }, + { + "name": "Schedules V2", + "description": "Beta: \nView and manage schedules.\nManage your full schedule of on-call rotations, including the users and rotation configuration.\n" + }, { "name": "Severities V1", "description": "Manage incident severities.\n\nEach incident has a severity, picked from one of the severities configured in your\norganisations settings.\n\nSeverities help categorise incidents, and communicate urgency/impact. You can use\nseverities when filtering incidents in the dashboard, and in workflows and announcement\nrules.\n" @@ -16330,6 +24618,10 @@ "name": "Webhooks", "description": "Webhooks can be used to receive notifications when certain events occur in incident.io. This might be useful for annotating graphs in a monitoring tool with incidents, or keeping track of follow-ups in another system. Our webhooks are powered by Svix.\n\n## Getting started with webhooks\n\nTo start using webhooks, you’ll need to create a webhook endpoint. You can do this in the same way that you’d create any other endpoint in your application. If you’d like to play around with our webhooks, we’d recommend using Svix play which allows you to set up an endpoint and inspect the payloads via their web interface. There are also other services (e.g. ngrok) which have great debugging tools to help getting started with webhooks.\n\nOnce you have a webhook endpoint set up, you can head to Settings > Webhooks to configure your endpoint. In here you'll be able to choose which types of events you'd like to recieve, send test events, see recent event deliveries, and retry any failed events.\n\n## Status codes, errors and retries\n\nWhen processing webhooks, please return a 2xx status code (e.g. `200 OK` or `204 No Content`). If the endpoint returns a non-2xx status code, we’ll try to resend the event with a backoff over the next 24 hours. If attempts to a specific endpoint repeatedly fail over a 5 day period, we’ll mark the endpoint as disabled and notify you via email. If you do miss some messages (e.g. due to unexpected downtime), Svix offer a number of options for [replaying messages](https://docs.svix.com/receiving/using-app-portal/replaying-messages) which you can access via Settings > Webhooks.\n\n## Verifying webhooks\n\nIt’s important to know whether a webhook has come from incident.io, or a third party that might be trying to exploit a vulnerability. To avoid this, we send a `signature` in the header of our webhooks, which you can verify using the `Signing secret` from the webhook endpoint settings page. The webhooks we send will have three headers that you’ll want to look at:\n\n```json\n{\n \"webhook-id\": \"123\",\n \"webhook-timestamp\": 1676033031,\n \"webhook-signature\": \"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=\"\n}\n```\n\nThese are signed using a HMAC signature in the following format:\n\n```\n${webhook-id}.${webhook-timestamp}.${request_body}\n```\n\nYou can verify the signature either using the Svix client libraries, or manually by following these instructions.\n\n## Keeping another system in-line with incident.io\n\nA common use-case for webhooks is to keep another system up-to-date with everything that’s happening in incident.io. As we deliver webhooks individually over HTTPS, we cannot guarantee that they’ll be delivered in the correct order. That means that, to keep the other system up-to-date, we’d recommend that you build an application which:\n\n- Receives a webhook about INC-123\n- Makes a request to our public API to get the latest state of INC-123\n- Save that state to your system\n\nThis means you aren’t relying on the order in which you receive webhooks to make sure your system remains up-to-date.\n\n## Webhooks on private incidents\n\nIn general, we try to send webhooks with all the relevant information in the payload (e.g. the name, summary, status etc.). However, private incidents are the exception. For private incidents, we only send the ID of the resource that’s been changed. If your integration needs to access the full data, you’ll need to create an API Key that can view private incidents. You can then use that key to get the details about the specific incident or follow-up. This is to make sure we don’t leak information about private incidents to a system that shouldn’t have access to them.\n" }, + { + "name": "Workflows V2", + "description": "Manage workflows.\n\nWorkflows allow you to automate certain actions and behaviors based on specific triggers." + }, { "name": "Audit logs", "description": "To give you visibility over the changes that are made within your incident.io account, we use an audit log. Our audit log is powered by WorkOS. The log is available for customers on our [Enterprise plan](https://incident.io/pricing).\n\nThe audit log contains information about any configuration changes, as well as changes to a user's permissions (e.g. being given a new role, or access to a private incident).\n\nEach entry will have an actor (the person or system that made the change) and one or more targets (a thing that was modified by this change). It will also include the Location and User Agent of the actor, where applicable.\n\nEach entry will conform to a schema, which is documented here. Each entry also has a version, so that if our schema changes over time you’ll still be able to parse old events.\n\nWe’ll retain these entries for one year.\n\nAudit log entries start from 18 April, 2023 (there are no entries available from before that date).\n\n## Viewing your audit log\n\nYou can view your audit log via our [security settings](https://app.incident.io/settings/security) page.\n\nFrom there, you'll be able to:\n\n- View the entries via a web interface (filterable by target, event type, actor and date)\n- Export the entries for a given time period to a CSV\n- Set up a log stream to a provider of your choice (e.g. Splunk or an Amazon S3 bucket)\n\n## Understanding actors\n\nEach entry will have an actor associated with it, which is one of 5 types:\n\n### Users\n\nThis is for changes triggered by the actions of a particular user in your account.\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"user\",\n \"id\": \"01G0J1EXE7AXZ2C93K61WBPYEH\",\n \"name\": \"Kelsey Mills\",\n \"metadata\": {\n \"user_base_role_slug\": \"admin\",\n \"user_custom_role_slugs\": \"engineering,security\"\n }\n }\n```\n\n### API Keys\n\nThis is for changes triggered by an API key.\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"api_key\",\n \"id\": \"01G0J1EXE7AXZ2C93K61WBPYEH\",\n \"name\": \"Lisa's development key\",\n \"metadata\": {\n \"api_key_roles\": \"incident_creator,global_access\"\n }\n }\n```\n\n### Integrations\n\nThis is for changes triggered by a system. Sometimes that will be a third party system (e.g. a user might be created\nvia Slack) or sometimes it might be something triggered from inside incident.io (e.g. a severity created as part of setup).\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"system\",\n \"id\": \"incident_setup\",\n \"name\": \"incident.io (setup)\",\n \"metadata\": {}\n }\n```\n\n### Workflows\n\nThis is for changes triggered by a workflow: for example, a workflow that invites users to a private incident.\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"workflow\",\n \"id\": \"01G0J1EXE7AXZ2C93K61WBPYEH\",\n \"name\": \"Auto-invite security team to private incidents\",\n \"metadata\": {}\n }\n```\n\n### External resources\n\nThis is for changes triggered by a specific [external resource](https://api-docs.incident.io/tag/Incident-Attachments-V1) (also known as an attachment).\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"external_resource\",\n \"id\": \"01G0J1EXE7AXZ2C93K61WBPYEH\",\n \"name\": \"#1234 Increased API latency\",\n \"metadata\": {\n \"external_resource_type\": \"pager_duty_incident\",\n \"external_resource_external_id\": \"q1234\"\n }\n }\n```\n" @@ -16338,9 +24630,7 @@ "x-webhooks": { "/x-webhooks/private_incident.action_created_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentActionCreatedV1", "description": "This webhook is emitted whenever a follow-up for a private incident is created.", "operationId": "Webhooks#PrivateIncidentActionCreatedV1", @@ -16366,9 +24656,7 @@ }, "/x-webhooks/private_incident.action_updated_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentActionUpdatedV1", "description": "This webhook is emitted whenever a follow-up for a private incident is updated.", "operationId": "Webhooks#PrivateIncidentActionUpdatedV1", @@ -16394,9 +24682,7 @@ }, "/x-webhooks/private_incident.follow_up_created_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentFollowUpCreatedV1", "description": "This webhook is emitted whenever a follow-up for a private incident is created.", "operationId": "Webhooks#PrivateIncidentFollowUpCreatedV1", @@ -16422,9 +24708,7 @@ }, "/x-webhooks/private_incident.follow_up_updated_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentFollowUpUpdatedV1", "description": "This webhook is emitted whenever a follow-up for a private incident is updated.", "operationId": "Webhooks#PrivateIncidentFollowUpUpdatedV1", @@ -16450,9 +24734,7 @@ }, "/x-webhooks/private_incident.incident_created_v2": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentIncidentCreatedV2", "description": "This webhook is emitted whenever a new private incident is created.", "operationId": "Webhooks#PrivateIncidentIncidentCreatedV2", @@ -16478,9 +24760,7 @@ }, "/x-webhooks/private_incident.incident_updated_v2": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentIncidentUpdatedV2", "description": "This webhook is emitted whenever a private incident is updated.", "operationId": "Webhooks#PrivateIncidentIncidentUpdatedV2", @@ -16506,9 +24786,7 @@ }, "/x-webhooks/private_incident.membership_granted_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentMembershipGrantedV1", "description": "This webhook is emitted whenever a user is given access to a private incident.", "operationId": "Webhooks#PrivateIncidentMembershipGrantedV1", @@ -16536,9 +24814,7 @@ }, "/x-webhooks/private_incident.membership_revoked_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PrivateIncidentMembershipRevokedV1", "description": "This webhook is emitted whenever a user's access to a private incident is revoked.", "operationId": "Webhooks#PrivateIncidentMembershipRevokedV1", @@ -16566,9 +24842,7 @@ }, "/x-webhooks/public_incident.action_created_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentActionCreatedV1", "description": "This webhook is emitted whenever a follow-up is created.", "operationId": "Webhooks#PublicIncidentActionCreatedV1", @@ -16613,9 +24887,7 @@ }, "/x-webhooks/public_incident.action_updated_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentActionUpdatedV1", "description": "This webhook is emitted whenever a follow-up is updated.", "operationId": "Webhooks#PublicIncidentActionUpdatedV1", @@ -16660,9 +24932,7 @@ }, "/x-webhooks/public_incident.follow_up_created_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentFollowUpCreatedV1", "description": "This webhook is emitted whenever a follow-up is created.", "operationId": "Webhooks#PublicIncidentFollowUpCreatedV1", @@ -16707,9 +24977,7 @@ }, "/x-webhooks/public_incident.follow_up_updated_v1": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentFollowUpUpdatedV1", "description": "This webhook is emitted whenever a follow-up is updated.", "operationId": "Webhooks#PublicIncidentFollowUpUpdatedV1", @@ -16754,9 +25022,7 @@ }, "/x-webhooks/public_incident.incident_created_v2": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentIncidentCreatedV2", "description": "This webhook is emitted whenever a new incident is created.", "operationId": "Webhooks#PublicIncidentIncidentCreatedV2", @@ -16805,10 +25071,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -16899,6 +25162,7 @@ "permalink": "https://app.incident.io/incidents/123", "postmortem_document_url": "https://docs.google.com/my_doc_id", "reference": "INC-123", + "related_incidents": ["INC-237"], "severity": { "created_at": "2021-08-17T13:28:57.801578Z", "description": "Issues with **low impact**.", @@ -16927,9 +25191,7 @@ }, "/x-webhooks/public_incident.incident_status_updated_v2": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentIncidentStatusUpdatedV2", "description": "This webhook is emitted whenever an incident's status changes.", "operationId": "Webhooks#PublicIncidentIncidentStatusUpdatedV2", @@ -16979,10 +25241,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -17120,9 +25379,7 @@ }, "/x-webhooks/public_incident.incident_updated_v2": { "get": { - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "summary": "PublicIncidentIncidentUpdatedV2", "description": "This webhook is emitted whenever an incident is updated.", "operationId": "Webhooks#PublicIncidentIncidentUpdatedV2", @@ -17171,10 +25428,7 @@ "values": [ { "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], + "aliases": ["lawrence@incident.io", "lawrence"], "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Primary On-call" @@ -17265,6 +25519,7 @@ "permalink": "https://app.incident.io/incidents/123", "postmortem_document_url": "https://docs.google.com/my_doc_id", "reference": "INC-123", + "related_incidents": ["INC-237"], "severity": { "created_at": "2021-08-17T13:28:57.801578Z", "description": "Issues with **low impact**.", @@ -17293,9 +25548,7 @@ }, "/x-audit-logs/alert_route.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertRouteCreatedV1", "description": "This entry is created whenever an alert route is created", "operationId": "Audit logs#AlertRouteCreatedV1", @@ -17340,9 +25593,7 @@ }, "/x-audit-logs/alert_route.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertRouteDeletedV1", "description": "This entry is created whenever an alert route is deleted", "operationId": "Audit logs#AlertRouteDeletedV1", @@ -17387,9 +25638,7 @@ }, "/x-audit-logs/alert_route.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertRouteUpdatedV1", "description": "This entry is created whenever an alert route is updated", "operationId": "Audit logs#AlertRouteUpdatedV1", @@ -17434,9 +25683,7 @@ }, "/x-audit-logs/alert_schema.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertSchemaUpdatedV1", "description": "This entry is created whenever alert attributes are updated", "operationId": "Audit logs#AlertSchemaUpdatedV1", @@ -17481,9 +25728,7 @@ }, "/x-audit-logs/alert_source_config.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertSourceConfigCreatedV1", "description": "This entry is created whenever an alert source is created", "operationId": "Audit logs#AlertSourceConfigCreatedV1", @@ -17528,9 +25773,7 @@ }, "/x-audit-logs/alert_source_config.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertSourceConfigDeletedV1", "description": "This entry is created whenever an alert source is deleted", "operationId": "Audit logs#AlertSourceConfigDeletedV1", @@ -17575,9 +25818,7 @@ }, "/x-audit-logs/alert_source_config.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AlertSourceConfigUpdatedV1", "description": "This entry is created whenever an alert source is updated", "operationId": "Audit logs#AlertSourceConfigUpdatedV1", @@ -17622,9 +25863,7 @@ }, "/x-audit-logs/announcement_rule.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AnnouncementRuleCreatedV1", "description": "This entry is created whenever a announcement rule is created", "operationId": "Audit logs#AnnouncementRuleCreatedV1", @@ -17669,9 +25908,7 @@ }, "/x-audit-logs/announcement_rule.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AnnouncementRuleDeletedV1", "description": "This entry is created whenever a announcement rule is deleted", "operationId": "Audit logs#AnnouncementRuleDeletedV1", @@ -17716,9 +25953,7 @@ }, "/x-audit-logs/announcement_rule.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "AnnouncementRuleUpdatedV1", "description": "This entry is created whenever a announcement rule is updated", "operationId": "Audit logs#AnnouncementRuleUpdatedV1", @@ -17763,9 +25998,7 @@ }, "/x-audit-logs/api_key.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ApiKeyCreatedV1", "description": "This entry is created whenever a api key is created", "operationId": "Audit logs#ApiKeyCreatedV1", @@ -17810,9 +26043,7 @@ }, "/x-audit-logs/api_key.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ApiKeyDeletedV1", "description": "This entry is created whenever a api key is deleted", "operationId": "Audit logs#ApiKeyDeletedV1", @@ -17857,9 +26088,7 @@ }, "/x-audit-logs/catalog_type.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CatalogTypeCreatedV1", "description": "This entry is created whenever a catalog type is created", "operationId": "Audit logs#CatalogTypeCreatedV1", @@ -17904,9 +26133,7 @@ }, "/x-audit-logs/catalog_type.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CatalogTypeDeletedV1", "description": "This entry is created whenever a catalog type is deleted", "operationId": "Audit logs#CatalogTypeDeletedV1", @@ -17951,9 +26178,7 @@ }, "/x-audit-logs/catalog_type.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CatalogTypeUpdatedV1", "description": "This entry is created whenever a catalog type is updated", "operationId": "Audit logs#CatalogTypeUpdatedV1", @@ -17998,9 +26223,7 @@ }, "/x-audit-logs/custom_field.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CustomFieldCreatedV1", "description": "This entry is created whenever a custom field is created", "operationId": "Audit logs#CustomFieldCreatedV1", @@ -18045,9 +26268,7 @@ }, "/x-audit-logs/custom_field.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CustomFieldDeletedV1", "description": "This entry is created whenever a custom field is deleted", "operationId": "Audit logs#CustomFieldDeletedV1", @@ -18092,9 +26313,7 @@ }, "/x-audit-logs/custom_field.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "CustomFieldUpdatedV1", "description": "This entry is created whenever a custom field is updated", "operationId": "Audit logs#CustomFieldUpdatedV1", @@ -18139,9 +26358,7 @@ }, "/x-audit-logs/debrief_invite_rule.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "DebriefInviteRuleCreatedV1", "description": "This entry is created whenever a debrief invite rule is created", "operationId": "Audit logs#DebriefInviteRuleCreatedV1", @@ -18186,9 +26403,7 @@ }, "/x-audit-logs/debrief_invite_rule.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "DebriefInviteRuleDeletedV1", "description": "This entry is created whenever a debrief invite rule is deleted", "operationId": "Audit logs#DebriefInviteRuleDeletedV1", @@ -18233,9 +26448,7 @@ }, "/x-audit-logs/debrief_invite_rule.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "DebriefInviteRuleUpdatedV1", "description": "This entry is created whenever a debrief invite rule is updated", "operationId": "Audit logs#DebriefInviteRuleUpdatedV1", @@ -18280,9 +26493,7 @@ }, "/x-audit-logs/escalation_path.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "EscalationPathCreatedV1", "description": "This entry is created whenever an escalation path is created", "operationId": "Audit logs#EscalationPathCreatedV1", @@ -18327,9 +26538,7 @@ }, "/x-audit-logs/escalation_path.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "EscalationPathDeletedV1", "description": "This entry is created whenever an escalation path is deleted", "operationId": "Audit logs#EscalationPathDeletedV1", @@ -18374,9 +26583,7 @@ }, "/x-audit-logs/escalation_path.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "EscalationPathUpdatedV1", "description": "This entry is created whenever an escalation path is updated", "operationId": "Audit logs#EscalationPathUpdatedV1", @@ -18421,9 +26628,7 @@ }, "/x-audit-logs/follow_up_priority.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "FollowUpPriorityCreatedV1", "description": "This entry is created whenever a follow up priority is created", "operationId": "Audit logs#FollowUpPriorityCreatedV1", @@ -18468,9 +26673,7 @@ }, "/x-audit-logs/follow_up_priority.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "FollowUpPriorityDeletedV1", "description": "This entry is created whenever a follow up priority is deleted", "operationId": "Audit logs#FollowUpPriorityDeletedV1", @@ -18515,9 +26718,7 @@ }, "/x-audit-logs/follow_up_priority.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "FollowUpPriorityUpdatedV1", "description": "This entry is created whenever a follow up priority is updated", "operationId": "Audit logs#FollowUpPriorityUpdatedV1", @@ -18562,9 +26763,7 @@ }, "/x-audit-logs/incident_duration_metric.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentDurationMetricCreatedV1", "description": "This entry is created whenever a incident duration metric is created", "operationId": "Audit logs#IncidentDurationMetricCreatedV1", @@ -18609,9 +26808,7 @@ }, "/x-audit-logs/incident_duration_metric.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentDurationMetricDeletedV1", "description": "This entry is created whenever a incident duration metric is deleted", "operationId": "Audit logs#IncidentDurationMetricDeletedV1", @@ -18656,9 +26853,7 @@ }, "/x-audit-logs/incident_duration_metric.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentDurationMetricUpdatedV1", "description": "This entry is created whenever a incident duration metric is updated", "operationId": "Audit logs#IncidentDurationMetricUpdatedV1", @@ -18703,9 +26898,7 @@ }, "/x-audit-logs/incident_role.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentRoleCreatedV1", "description": "This entry is created whenever a incident role is created", "operationId": "Audit logs#IncidentRoleCreatedV1", @@ -18750,9 +26943,7 @@ }, "/x-audit-logs/incident_role.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentRoleDeletedV1", "description": "This entry is created whenever a incident role is deleted", "operationId": "Audit logs#IncidentRoleDeletedV1", @@ -18797,9 +26988,7 @@ }, "/x-audit-logs/incident_role.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentRoleUpdatedV1", "description": "This entry is created whenever a incident role is updated", "operationId": "Audit logs#IncidentRoleUpdatedV1", @@ -18844,9 +27033,7 @@ }, "/x-audit-logs/incident_status.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentStatusCreatedV1", "description": "This entry is created whenever a incident status is created", "operationId": "Audit logs#IncidentStatusCreatedV1", @@ -18891,9 +27078,7 @@ }, "/x-audit-logs/incident_status.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentStatusDeletedV1", "description": "This entry is created whenever a incident status is deleted", "operationId": "Audit logs#IncidentStatusDeletedV1", @@ -18938,9 +27123,7 @@ }, "/x-audit-logs/incident_status.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentStatusUpdatedV1", "description": "This entry is created whenever a incident status is updated", "operationId": "Audit logs#IncidentStatusUpdatedV1", @@ -18985,9 +27168,7 @@ }, "/x-audit-logs/incident_timestamp.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTimestampCreatedV1", "description": "This entry is created whenever a incident timestamp is created", "operationId": "Audit logs#IncidentTimestampCreatedV1", @@ -19032,9 +27213,7 @@ }, "/x-audit-logs/incident_timestamp.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTimestampDeletedV1", "description": "This entry is created whenever a incident timestamp is deleted", "operationId": "Audit logs#IncidentTimestampDeletedV1", @@ -19079,9 +27258,7 @@ }, "/x-audit-logs/incident_timestamp.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTimestampUpdatedV1", "description": "This entry is created whenever a incident timestamp is updated", "operationId": "Audit logs#IncidentTimestampUpdatedV1", @@ -19126,9 +27303,7 @@ }, "/x-audit-logs/incident_type.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTypeCreatedV1", "description": "This entry is created whenever a incident type is created", "operationId": "Audit logs#IncidentTypeCreatedV1", @@ -19173,9 +27348,7 @@ }, "/x-audit-logs/incident_type.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTypeDeletedV1", "description": "This entry is created whenever a incident type is deleted", "operationId": "Audit logs#IncidentTypeDeletedV1", @@ -19220,9 +27393,7 @@ }, "/x-audit-logs/incident_type.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IncidentTypeUpdatedV1", "description": "This entry is created whenever a incident type is updated", "operationId": "Audit logs#IncidentTypeUpdatedV1", @@ -19267,9 +27438,7 @@ }, "/x-audit-logs/integration.installed.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IntegrationInstalledV1", "description": "This entry is created whenever an integration is installed", "operationId": "Audit logs#IntegrationInstalledV1", @@ -19314,9 +27483,7 @@ }, "/x-audit-logs/integration.uninstalled.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "IntegrationUninstalledV1", "description": "This entry is created whenever an integration is uninstalled", "operationId": "Audit logs#IntegrationUninstalledV1", @@ -19361,9 +27528,7 @@ }, "/x-audit-logs/internal_status_page.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "InternalStatusPageCreatedV1", "description": "This entry is created whenever an internal status page is created", "operationId": "Audit logs#InternalStatusPageCreatedV1", @@ -19408,9 +27573,7 @@ }, "/x-audit-logs/internal_status_page.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "InternalStatusPageDeletedV1", "description": "This entry is created whenever an internal status page is deleted", "operationId": "Audit logs#InternalStatusPageDeletedV1", @@ -19455,9 +27618,7 @@ }, "/x-audit-logs/internal_status_page.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "InternalStatusPageUpdatedV1", "description": "This entry is created whenever an internal status page has its configuration updated", "operationId": "Audit logs#InternalStatusPageUpdatedV1", @@ -19502,9 +27663,7 @@ }, "/x-audit-logs/nudge.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "NudgeCreatedV1", "description": "This entry is created whenever a nudge is created", "operationId": "Audit logs#NudgeCreatedV1", @@ -19549,9 +27708,7 @@ }, "/x-audit-logs/nudge.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "NudgeDeletedV1", "description": "This entry is created whenever a nudge is deleted", "operationId": "Audit logs#NudgeDeletedV1", @@ -19596,9 +27753,7 @@ }, "/x-audit-logs/nudge.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "NudgeUpdatedV1", "description": "This entry is created whenever a nudge is updated", "operationId": "Audit logs#NudgeUpdatedV1", @@ -19643,9 +27798,7 @@ }, "/x-audit-logs/policy.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PolicyCreatedV1", "description": "This entry is created whenever a policy is created", "operationId": "Audit logs#PolicyCreatedV1", @@ -19690,9 +27843,7 @@ }, "/x-audit-logs/policy.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PolicyDeletedV1", "description": "This entry is created whenever a policy is deleted", "operationId": "Audit logs#PolicyDeletedV1", @@ -19737,9 +27888,7 @@ }, "/x-audit-logs/policy.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PolicyUpdatedV1", "description": "This entry is created whenever a policy is updated", "operationId": "Audit logs#PolicyUpdatedV1", @@ -19784,9 +27933,7 @@ }, "/x-audit-logs/post_incident_task.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PostIncidentTaskCreatedV1", "description": "This entry is created whenever a post-incident task is created", "operationId": "Audit logs#PostIncidentTaskCreatedV1", @@ -19831,9 +27978,7 @@ }, "/x-audit-logs/post_incident_task.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PostIncidentTaskDeletedV1", "description": "This entry is created whenever a post-incident task is deleted", "operationId": "Audit logs#PostIncidentTaskDeletedV1", @@ -19878,9 +28023,7 @@ }, "/x-audit-logs/post_incident_task.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PostIncidentTaskUpdatedV1", "description": "This entry is created whenever a post-incident task is updated", "operationId": "Audit logs#PostIncidentTaskUpdatedV1", @@ -19925,9 +28068,7 @@ }, "/x-audit-logs/private_incident.access_attempted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PrivateIncidentAccessAttemptedV1", "description": "This entry is created whenever someone attempts to access a private incident.", "operationId": "Audit logs#PrivateIncidentAccessAttemptedV1", @@ -19975,9 +28116,7 @@ }, "/x-audit-logs/private_incident.access_requested.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PrivateIncidentAccessRequestedV1", "description": "This entry is created whenever someone requests access to a private incident.", "operationId": "Audit logs#PrivateIncidentAccessRequestedV1", @@ -20022,9 +28161,7 @@ }, "/x-audit-logs/private_incident_membership.granted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PrivateIncidentMembershipGrantedV1", "description": "This entry is created whenever someone is granted access to a private incident. If they have the 'manage private incidents' permission, then it'll appear that the system has given them access to the incident.", "operationId": "Audit logs#PrivateIncidentMembershipGrantedV1", @@ -20074,9 +28211,7 @@ }, "/x-audit-logs/private_incident_membership.revoked.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "PrivateIncidentMembershipRevokedV1", "description": "This entry is created whenever someone's access to a private incident is revoked.", "operationId": "Audit logs#PrivateIncidentMembershipRevokedV1", @@ -20126,9 +28261,7 @@ }, "/x-audit-logs/rbac_role.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "RbacRoleCreatedV1", "description": "This entry is created whenever a rbac role is created", "operationId": "Audit logs#RbacRoleCreatedV1", @@ -20173,9 +28306,7 @@ }, "/x-audit-logs/rbac_role.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "RbacRoleDeletedV1", "description": "This entry is created whenever a rbac role is deleted", "operationId": "Audit logs#RbacRoleDeletedV1", @@ -20220,9 +28351,7 @@ }, "/x-audit-logs/rbac_role.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "RbacRoleUpdatedV1", "description": "This entry is created whenever a rbac role is updated", "operationId": "Audit logs#RbacRoleUpdatedV1", @@ -20267,9 +28396,7 @@ }, "/x-audit-logs/schedule.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ScheduleCreatedV1", "description": "This entry is created whenever a schedule is created", "operationId": "Audit logs#ScheduleCreatedV1", @@ -20314,9 +28441,7 @@ }, "/x-audit-logs/schedule.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ScheduleDeletedV1", "description": "This entry is created whenever a schedule is deleted", "operationId": "Audit logs#ScheduleDeletedV1", @@ -20361,9 +28486,7 @@ }, "/x-audit-logs/schedule.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ScheduleUpdatedV1", "description": "This entry is created whenever a schedule is updated", "operationId": "Audit logs#ScheduleUpdatedV1", @@ -20408,9 +28531,7 @@ }, "/x-audit-logs/scim_group.role_mappings_updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "ScimGroupRoleMappingsUpdatedV1", "description": "This entry is created whenever a SCIM group is mapped to a new RBAC role", "operationId": "Audit logs#ScimGroupRoleMappingsUpdatedV1", @@ -20461,9 +28582,7 @@ }, "/x-audit-logs/severity.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "SeverityCreatedV1", "description": "This entry is created whenever a severity is created", "operationId": "Audit logs#SeverityCreatedV1", @@ -20508,9 +28627,7 @@ }, "/x-audit-logs/severity.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "SeverityDeletedV1", "description": "This entry is created whenever a severity is deleted", "operationId": "Audit logs#SeverityDeletedV1", @@ -20555,9 +28672,7 @@ }, "/x-audit-logs/severity.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "SeverityUpdatedV1", "description": "This entry is created whenever a severity is updated", "operationId": "Audit logs#SeverityUpdatedV1", @@ -20602,9 +28717,7 @@ }, "/x-audit-logs/status_page.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageCreatedV1", "description": "This entry is created whenever a status page is created", "operationId": "Audit logs#StatusPageCreatedV1", @@ -20649,9 +28762,7 @@ }, "/x-audit-logs/status_page.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageDeletedV1", "description": "This entry is created whenever a status page is deleted", "operationId": "Audit logs#StatusPageDeletedV1", @@ -20696,9 +28807,7 @@ }, "/x-audit-logs/status_page.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageUpdatedV1", "description": "This entry is created whenever a status page has its configuration updated", "operationId": "Audit logs#StatusPageUpdatedV1", @@ -20743,9 +28852,7 @@ }, "/x-audit-logs/status_page_sub_page.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageSubPageCreatedV1", "description": "This entry is created whenever a status page sub-page is created", "operationId": "Audit logs#StatusPageSubPageCreatedV1", @@ -20790,9 +28897,7 @@ }, "/x-audit-logs/status_page_sub_page.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageSubPageDeletedV1", "description": "This entry is created whenever a status page sub-page is deleted", "operationId": "Audit logs#StatusPageSubPageDeletedV1", @@ -20837,9 +28942,7 @@ }, "/x-audit-logs/status_page_sub_page.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageSubPageUpdatedV1", "description": "This entry is created whenever a status page sub-page has its configuration updated", "operationId": "Audit logs#StatusPageSubPageUpdatedV1", @@ -20884,9 +28987,7 @@ }, "/x-audit-logs/status_page_template.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageTemplateCreatedV1", "description": "This entry is created whenever a status page template is created", "operationId": "Audit logs#StatusPageTemplateCreatedV1", @@ -20931,9 +29032,7 @@ }, "/x-audit-logs/status_page_template.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageTemplateDeletedV1", "description": "This entry is created whenever a status page template is deleted", "operationId": "Audit logs#StatusPageTemplateDeletedV1", @@ -20978,9 +29077,7 @@ }, "/x-audit-logs/status_page_template.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "StatusPageTemplateUpdatedV1", "description": "This entry is created whenever a status page template is updated", "operationId": "Audit logs#StatusPageTemplateUpdatedV1", @@ -21025,9 +29122,7 @@ }, "/x-audit-logs/user.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "UserCreatedV1", "description": "This entry is created whenever a user is created", "operationId": "Audit logs#UserCreatedV1", @@ -21072,9 +29167,7 @@ }, "/x-audit-logs/user.deactivated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "UserDeactivatedV1", "description": "This entry is created whenever a user is deactivated", "operationId": "Audit logs#UserDeactivatedV1", @@ -21119,9 +29212,7 @@ }, "/x-audit-logs/user.reinstated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "UserReinstatedV1", "description": "This entry is created when a user is reinstated after being deactivated", "operationId": "Audit logs#UserReinstatedV1", @@ -21166,9 +29257,7 @@ }, "/x-audit-logs/user.role_memberships_updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "UserRoleMembershipsUpdatedV1", "description": "This entry is created whenever a user's role memberships are changed.", "operationId": "Audit logs#UserRoleMembershipsUpdatedV1", @@ -21219,9 +29308,7 @@ }, "/x-audit-logs/user.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "UserUpdatedV1", "description": "This entry is created whenever a user is updated", "operationId": "Audit logs#UserUpdatedV1", @@ -21266,9 +29353,7 @@ }, "/x-audit-logs/workflow.created.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "WorkflowCreatedV1", "description": "This entry is created whenever a workflow is created", "operationId": "Audit logs#WorkflowCreatedV1", @@ -21313,9 +29398,7 @@ }, "/x-audit-logs/workflow.deleted.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "WorkflowDeletedV1", "description": "This entry is created whenever a workflow is deleted", "operationId": "Audit logs#WorkflowDeletedV1", @@ -21360,9 +29443,7 @@ }, "/x-audit-logs/workflow.updated.1": { "get": { - "tags": [ - "Audit logs" - ], + "tags": ["Audit logs"], "summary": "WorkflowUpdatedV1", "description": "This entry is created whenever a workflow is updated", "operationId": "Audit logs#WorkflowUpdatedV1", @@ -21406,4 +29487,4 @@ } } } -} \ No newline at end of file +} diff --git a/cmd/catalog-importer/cmd/sync.go b/cmd/catalog-importer/cmd/sync.go index 19c0b3f..09c7b56 100644 --- a/cmd/catalog-importer/cmd/sync.go +++ b/cmd/catalog-importer/cmd/sync.go @@ -259,6 +259,18 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf Attributes: []client.CatalogTypeAttributeV2{}, } for _, attr := range model.Attributes { + var path *[]client.CatalogTypeAttributePathItemV2 + + if attr.Path != nil { + noPtrPath := *attr.Path + newPath := lo.Map(noPtrPath, func(item client.CatalogTypeAttributePathItemPayloadV2, _ int) client.CatalogTypeAttributePathItemV2 { + return client.CatalogTypeAttributePathItemV2{ + AttributeId: item.AttributeId, + } + }) + path = &newPath + } + updatedCatalogType.Schema.Attributes = append(updatedCatalogType.Schema.Attributes, client.CatalogTypeAttributeV2{ Id: *attr.Id, Name: attr.Name, @@ -266,6 +278,7 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf Array: attr.Array, Mode: client.CatalogTypeAttributeV2Mode(*attr.Mode), BacklinkAttribute: attr.BacklinkAttribute, + Path: path, }) } }