From 07064e6b440d564664bdfb0ad505023070e474a8 Mon Sep 17 00:00:00 2001 From: Sam Starling <42478+samstarling@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:49:53 +0000 Subject: [PATCH] Update client to the latest OpenAPI definition --- client/client.gen.go | 2467 +- client/openapi3.json | 51687 +++++++++++++++++++++++++---------------- 2 files changed, 34133 insertions(+), 20021 deletions(-) diff --git a/client/client.gen.go b/client/client.gen.go index 713d40d..c33021b 100644 --- a/client/client.gen.go +++ b/client/client.gen.go @@ -15,7 +15,6 @@ import ( "time" "github.com/deepmap/oapi-codegen/pkg/runtime" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) // Defines values for ActionV1Status. @@ -49,6 +48,25 @@ const ( Success AlertResultStatus = "success" ) +// Defines values for AlertRouteIncidentTemplatePayloadV2PrioritySeverity. +const ( + AlertRouteIncidentTemplatePayloadV2PrioritySeveritySeverityFirstWins AlertRouteIncidentTemplatePayloadV2PrioritySeverity = "severity-first-wins" + AlertRouteIncidentTemplatePayloadV2PrioritySeveritySeverityMax AlertRouteIncidentTemplatePayloadV2PrioritySeverity = "severity-max" +) + +// Defines values for AlertRouteIncidentTemplateV2CustomFieldPriorities. +const ( + Append AlertRouteIncidentTemplateV2CustomFieldPriorities = "append" + FirstWins AlertRouteIncidentTemplateV2CustomFieldPriorities = "first-wins" + LastWins AlertRouteIncidentTemplateV2CustomFieldPriorities = "last-wins" +) + +// Defines values for AlertRouteIncidentTemplateV2PrioritySeverity. +const ( + AlertRouteIncidentTemplateV2PrioritySeveritySeverityFirstWins AlertRouteIncidentTemplateV2PrioritySeverity = "severity-first-wins" + AlertRouteIncidentTemplateV2PrioritySeveritySeverityMax AlertRouteIncidentTemplateV2PrioritySeverity = "severity-max" +) + // Defines values for CatalogResourceV2Category. const ( CatalogResourceV2CategoryCustom CatalogResourceV2Category = "custom" @@ -102,30 +120,33 @@ const ( // Defines values for CatalogTypeV2Icon. const ( - CatalogTypeV2IconBolt CatalogTypeV2Icon = "bolt" - CatalogTypeV2IconBox CatalogTypeV2Icon = "box" - CatalogTypeV2IconBriefcase CatalogTypeV2Icon = "briefcase" - CatalogTypeV2IconBrowser CatalogTypeV2Icon = "browser" - CatalogTypeV2IconBulb CatalogTypeV2Icon = "bulb" - CatalogTypeV2IconCalendar CatalogTypeV2Icon = "calendar" - CatalogTypeV2IconClock CatalogTypeV2Icon = "clock" - CatalogTypeV2IconCog CatalogTypeV2Icon = "cog" - CatalogTypeV2IconComponents CatalogTypeV2Icon = "components" - CatalogTypeV2IconDatabase CatalogTypeV2Icon = "database" - CatalogTypeV2IconDoc CatalogTypeV2Icon = "doc" - CatalogTypeV2IconEmail CatalogTypeV2Icon = "email" - CatalogTypeV2IconFiles CatalogTypeV2Icon = "files" - CatalogTypeV2IconFlag CatalogTypeV2Icon = "flag" - CatalogTypeV2IconFolder CatalogTypeV2Icon = "folder" - CatalogTypeV2IconGlobe CatalogTypeV2Icon = "globe" - CatalogTypeV2IconMoney CatalogTypeV2Icon = "money" - CatalogTypeV2IconServer CatalogTypeV2Icon = "server" - CatalogTypeV2IconSeverity CatalogTypeV2Icon = "severity" - CatalogTypeV2IconStar CatalogTypeV2Icon = "star" - CatalogTypeV2IconStore CatalogTypeV2Icon = "store" - CatalogTypeV2IconTag CatalogTypeV2Icon = "tag" - CatalogTypeV2IconUser CatalogTypeV2Icon = "user" - CatalogTypeV2IconUsers CatalogTypeV2Icon = "users" + CatalogTypeV2IconAlert CatalogTypeV2Icon = "alert" + CatalogTypeV2IconBolt CatalogTypeV2Icon = "bolt" + CatalogTypeV2IconBox CatalogTypeV2Icon = "box" + CatalogTypeV2IconBriefcase CatalogTypeV2Icon = "briefcase" + CatalogTypeV2IconBrowser CatalogTypeV2Icon = "browser" + CatalogTypeV2IconBulb CatalogTypeV2Icon = "bulb" + CatalogTypeV2IconCalendar CatalogTypeV2Icon = "calendar" + CatalogTypeV2IconClock CatalogTypeV2Icon = "clock" + CatalogTypeV2IconCog CatalogTypeV2Icon = "cog" + CatalogTypeV2IconComponents CatalogTypeV2Icon = "components" + CatalogTypeV2IconDatabase CatalogTypeV2Icon = "database" + CatalogTypeV2IconDoc CatalogTypeV2Icon = "doc" + CatalogTypeV2IconEmail CatalogTypeV2Icon = "email" + CatalogTypeV2IconEscalationPath CatalogTypeV2Icon = "escalation-path" + CatalogTypeV2IconFiles CatalogTypeV2Icon = "files" + CatalogTypeV2IconFlag CatalogTypeV2Icon = "flag" + CatalogTypeV2IconFolder CatalogTypeV2Icon = "folder" + CatalogTypeV2IconGlobe CatalogTypeV2Icon = "globe" + CatalogTypeV2IconMoney CatalogTypeV2Icon = "money" + CatalogTypeV2IconServer CatalogTypeV2Icon = "server" + CatalogTypeV2IconSeverity CatalogTypeV2Icon = "severity" + CatalogTypeV2IconStar CatalogTypeV2Icon = "star" + CatalogTypeV2IconStatusPage CatalogTypeV2Icon = "status-page" + CatalogTypeV2IconStore CatalogTypeV2Icon = "store" + CatalogTypeV2IconTag CatalogTypeV2Icon = "tag" + CatalogTypeV2IconUser CatalogTypeV2Icon = "user" + CatalogTypeV2IconUsers CatalogTypeV2Icon = "users" ) // Defines values for CreateHTTPRequestBodyStatus. @@ -134,26 +155,6 @@ const ( Resolved CreateHTTPRequestBodyStatus = "resolved" ) -// Defines values for CreateManagedResourceRequestBodyResourceType. -const ( - CreateManagedResourceRequestBodyResourceTypeSchedule CreateManagedResourceRequestBodyResourceType = "schedule" - CreateManagedResourceRequestBodyResourceTypeWorkflow CreateManagedResourceRequestBodyResourceType = "workflow" -) - -// Defines values for CreateRequestBody10Mode. -const ( - CreateRequestBody10ModeRetrospective CreateRequestBody10Mode = "retrospective" - CreateRequestBody10ModeStandard CreateRequestBody10Mode = "standard" - CreateRequestBody10ModeTest CreateRequestBody10Mode = "test" - CreateRequestBody10ModeTutorial CreateRequestBody10Mode = "tutorial" -) - -// Defines values for CreateRequestBody10Visibility. -const ( - CreateRequestBody10VisibilityPrivate CreateRequestBody10Visibility = "private" - CreateRequestBody10VisibilityPublic CreateRequestBody10Visibility = "public" -) - // Defines values for CreateRequestBody2FieldType. const ( CreateRequestBody2FieldTypeLink CreateRequestBody2FieldType = "link" @@ -209,28 +210,6 @@ const ( CreateRequestBody8CategoryLive CreateRequestBody8Category = "live" ) -// Defines values for CreateRequestBody9Mode. -const ( - CreateRequestBody9ModeReal CreateRequestBody9Mode = "real" - CreateRequestBody9ModeTest CreateRequestBody9Mode = "test" -) - -// Defines values for CreateRequestBody9Status. -const ( - CreateRequestBody9StatusClosed CreateRequestBody9Status = "closed" - CreateRequestBody9StatusDeclined CreateRequestBody9Status = "declined" - CreateRequestBody9StatusFixing CreateRequestBody9Status = "fixing" - CreateRequestBody9StatusInvestigating CreateRequestBody9Status = "investigating" - CreateRequestBody9StatusMonitoring CreateRequestBody9Status = "monitoring" - CreateRequestBody9StatusTriage CreateRequestBody9Status = "triage" -) - -// Defines values for CreateRequestBody9Visibility. -const ( - CreateRequestBody9VisibilityPrivate CreateRequestBody9Visibility = "private" - CreateRequestBody9VisibilityPublic CreateRequestBody9Visibility = "public" -) - // Defines values for CreateTypeRequestBodyCategories. const ( CreateTypeRequestBodyCategoriesCustomer CreateTypeRequestBodyCategories = "customer" @@ -255,51 +234,54 @@ const ( // Defines values for CreateTypeRequestBodyIcon. const ( - CreateTypeRequestBodyIconBolt CreateTypeRequestBodyIcon = "bolt" - CreateTypeRequestBodyIconBox CreateTypeRequestBodyIcon = "box" - CreateTypeRequestBodyIconBriefcase CreateTypeRequestBodyIcon = "briefcase" - CreateTypeRequestBodyIconBrowser CreateTypeRequestBodyIcon = "browser" - CreateTypeRequestBodyIconBulb CreateTypeRequestBodyIcon = "bulb" - CreateTypeRequestBodyIconCalendar CreateTypeRequestBodyIcon = "calendar" - CreateTypeRequestBodyIconClock CreateTypeRequestBodyIcon = "clock" - CreateTypeRequestBodyIconCog CreateTypeRequestBodyIcon = "cog" - CreateTypeRequestBodyIconComponents CreateTypeRequestBodyIcon = "components" - CreateTypeRequestBodyIconDatabase CreateTypeRequestBodyIcon = "database" - CreateTypeRequestBodyIconDoc CreateTypeRequestBodyIcon = "doc" - CreateTypeRequestBodyIconEmail CreateTypeRequestBodyIcon = "email" - CreateTypeRequestBodyIconFiles CreateTypeRequestBodyIcon = "files" - CreateTypeRequestBodyIconFlag CreateTypeRequestBodyIcon = "flag" - CreateTypeRequestBodyIconFolder CreateTypeRequestBodyIcon = "folder" - CreateTypeRequestBodyIconGlobe CreateTypeRequestBodyIcon = "globe" - CreateTypeRequestBodyIconMoney CreateTypeRequestBodyIcon = "money" - CreateTypeRequestBodyIconServer CreateTypeRequestBodyIcon = "server" - CreateTypeRequestBodyIconSeverity CreateTypeRequestBodyIcon = "severity" - CreateTypeRequestBodyIconStar CreateTypeRequestBodyIcon = "star" - CreateTypeRequestBodyIconStore CreateTypeRequestBodyIcon = "store" - CreateTypeRequestBodyIconTag CreateTypeRequestBodyIcon = "tag" - CreateTypeRequestBodyIconUser CreateTypeRequestBodyIcon = "user" - CreateTypeRequestBodyIconUsers CreateTypeRequestBodyIcon = "users" + CreateTypeRequestBodyIconAlert CreateTypeRequestBodyIcon = "alert" + CreateTypeRequestBodyIconBolt CreateTypeRequestBodyIcon = "bolt" + CreateTypeRequestBodyIconBox CreateTypeRequestBodyIcon = "box" + CreateTypeRequestBodyIconBriefcase CreateTypeRequestBodyIcon = "briefcase" + CreateTypeRequestBodyIconBrowser CreateTypeRequestBodyIcon = "browser" + CreateTypeRequestBodyIconBulb CreateTypeRequestBodyIcon = "bulb" + CreateTypeRequestBodyIconCalendar CreateTypeRequestBodyIcon = "calendar" + CreateTypeRequestBodyIconClock CreateTypeRequestBodyIcon = "clock" + CreateTypeRequestBodyIconCog CreateTypeRequestBodyIcon = "cog" + CreateTypeRequestBodyIconComponents CreateTypeRequestBodyIcon = "components" + CreateTypeRequestBodyIconDatabase CreateTypeRequestBodyIcon = "database" + CreateTypeRequestBodyIconDoc CreateTypeRequestBodyIcon = "doc" + CreateTypeRequestBodyIconEmail CreateTypeRequestBodyIcon = "email" + CreateTypeRequestBodyIconEscalationPath CreateTypeRequestBodyIcon = "escalation-path" + CreateTypeRequestBodyIconFiles CreateTypeRequestBodyIcon = "files" + CreateTypeRequestBodyIconFlag CreateTypeRequestBodyIcon = "flag" + CreateTypeRequestBodyIconFolder CreateTypeRequestBodyIcon = "folder" + CreateTypeRequestBodyIconGlobe CreateTypeRequestBodyIcon = "globe" + CreateTypeRequestBodyIconMoney CreateTypeRequestBodyIcon = "money" + CreateTypeRequestBodyIconServer CreateTypeRequestBodyIcon = "server" + CreateTypeRequestBodyIconSeverity CreateTypeRequestBodyIcon = "severity" + CreateTypeRequestBodyIconStar CreateTypeRequestBodyIcon = "star" + CreateTypeRequestBodyIconStatusPage CreateTypeRequestBodyIcon = "status-page" + CreateTypeRequestBodyIconStore CreateTypeRequestBodyIcon = "store" + CreateTypeRequestBodyIconTag CreateTypeRequestBodyIcon = "tag" + CreateTypeRequestBodyIconUser CreateTypeRequestBodyIcon = "user" + CreateTypeRequestBodyIconUsers CreateTypeRequestBodyIcon = "users" ) -// Defines values for CreateWorkflowRequestBodyRunsOnIncidentModes. +// Defines values for CreateWorkflowPayloadRunsOnIncidentModes. const ( - CreateWorkflowRequestBodyRunsOnIncidentModesRetrospective CreateWorkflowRequestBodyRunsOnIncidentModes = "retrospective" - CreateWorkflowRequestBodyRunsOnIncidentModesStandard CreateWorkflowRequestBodyRunsOnIncidentModes = "standard" - CreateWorkflowRequestBodyRunsOnIncidentModesTest CreateWorkflowRequestBodyRunsOnIncidentModes = "test" + CreateWorkflowPayloadRunsOnIncidentModesRetrospective CreateWorkflowPayloadRunsOnIncidentModes = "retrospective" + CreateWorkflowPayloadRunsOnIncidentModesStandard CreateWorkflowPayloadRunsOnIncidentModes = "standard" + CreateWorkflowPayloadRunsOnIncidentModesTest CreateWorkflowPayloadRunsOnIncidentModes = "test" ) -// Defines values for CreateWorkflowRequestBodyRunsOnIncidents. +// Defines values for CreateWorkflowPayloadRunsOnIncidents. const ( - CreateWorkflowRequestBodyRunsOnIncidentsNewlyCreated CreateWorkflowRequestBodyRunsOnIncidents = "newly_created" - CreateWorkflowRequestBodyRunsOnIncidentsNewlyCreatedAndActive CreateWorkflowRequestBodyRunsOnIncidents = "newly_created_and_active" + CreateWorkflowPayloadRunsOnIncidentsNewlyCreated CreateWorkflowPayloadRunsOnIncidents = "newly_created" + CreateWorkflowPayloadRunsOnIncidentsNewlyCreatedAndActive CreateWorkflowPayloadRunsOnIncidents = "newly_created_and_active" ) -// Defines values for CreateWorkflowRequestBodyState. +// Defines values for CreateWorkflowPayloadState. const ( - CreateWorkflowRequestBodyStateActive CreateWorkflowRequestBodyState = "active" - CreateWorkflowRequestBodyStateDisabled CreateWorkflowRequestBodyState = "disabled" - CreateWorkflowRequestBodyStateDraft CreateWorkflowRequestBodyState = "draft" - CreateWorkflowRequestBodyStateError CreateWorkflowRequestBodyState = "error" + CreateWorkflowPayloadStateActive CreateWorkflowPayloadState = "active" + CreateWorkflowPayloadStateDisabled CreateWorkflowPayloadState = "disabled" + CreateWorkflowPayloadStateDraft CreateWorkflowPayloadState = "draft" + CreateWorkflowPayloadStateError CreateWorkflowPayloadState = "error" ) // Defines values for CustomFieldTypeInfoV1FieldType. @@ -311,6 +293,15 @@ const ( CustomFieldTypeInfoV1FieldTypeText CustomFieldTypeInfoV1FieldType = "text" ) +// Defines values for CustomFieldTypeInfoV2FieldType. +const ( + CustomFieldTypeInfoV2FieldTypeLink CustomFieldTypeInfoV2FieldType = "link" + CustomFieldTypeInfoV2FieldTypeMultiSelect CustomFieldTypeInfoV2FieldType = "multi_select" + CustomFieldTypeInfoV2FieldTypeNumeric CustomFieldTypeInfoV2FieldType = "numeric" + CustomFieldTypeInfoV2FieldTypeSingleSelect CustomFieldTypeInfoV2FieldType = "single_select" + CustomFieldTypeInfoV2FieldTypeText CustomFieldTypeInfoV2FieldType = "text" +) + // Defines values for CustomFieldV1FieldType. const ( CustomFieldV1FieldTypeLink CustomFieldV1FieldType = "link" @@ -336,11 +327,18 @@ const ( // Defines values for CustomFieldV2FieldType. const ( - Link CustomFieldV2FieldType = "link" - MultiSelect CustomFieldV2FieldType = "multi_select" - Numeric CustomFieldV2FieldType = "numeric" - SingleSelect CustomFieldV2FieldType = "single_select" - Text CustomFieldV2FieldType = "text" + CustomFieldV2FieldTypeLink CustomFieldV2FieldType = "link" + CustomFieldV2FieldTypeMultiSelect CustomFieldV2FieldType = "multi_select" + CustomFieldV2FieldTypeNumeric CustomFieldV2FieldType = "numeric" + CustomFieldV2FieldTypeSingleSelect CustomFieldV2FieldType = "single_select" + CustomFieldV2FieldTypeText CustomFieldV2FieldType = "text" +) + +// Defines values for EmbeddedIncidentRoleV2RoleType. +const ( + EmbeddedIncidentRoleV2RoleTypeCustom EmbeddedIncidentRoleV2RoleType = "custom" + EmbeddedIncidentRoleV2RoleTypeLead EmbeddedIncidentRoleV2RoleType = "lead" + EmbeddedIncidentRoleV2RoleTypeReporter EmbeddedIncidentRoleV2RoleType = "reporter" ) // Defines values for EscalationPathNodeLevelV2TimeToAckIntervalCondition. @@ -349,6 +347,12 @@ const ( EscalationPathNodeLevelV2TimeToAckIntervalConditionInactive EscalationPathNodeLevelV2TimeToAckIntervalCondition = "inactive" ) +// Defines values for EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition. +const ( + EscalationPathNodeNotifyChannelV2TimeToAckIntervalConditionActive EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition = "active" + EscalationPathNodeNotifyChannelV2TimeToAckIntervalConditionInactive EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition = "inactive" +) + // Defines values for EscalationPathNodePayloadV2Type. const ( EscalationPathNodePayloadV2TypeIfElse EscalationPathNodePayloadV2Type = "if_else" @@ -365,6 +369,14 @@ const ( EscalationPathNodeV2TypeRepeat EscalationPathNodeV2Type = "repeat" ) +// Defines values for EscalationPathTargetV2ScheduleMode. +const ( + EscalationPathTargetV2ScheduleModeAllUsers EscalationPathTargetV2ScheduleMode = "all_users" + EscalationPathTargetV2ScheduleModeAllUsersForRota EscalationPathTargetV2ScheduleMode = "all_users_for_rota" + EscalationPathTargetV2ScheduleModeCurrentlyOnCall EscalationPathTargetV2ScheduleMode = "currently_on_call" + EscalationPathTargetV2ScheduleModeEmpty EscalationPathTargetV2ScheduleMode = "" +) + // Defines values for EscalationPathTargetV2Type. const ( EscalationPathTargetV2TypeSchedule EscalationPathTargetV2Type = "schedule" @@ -389,6 +401,7 @@ const ( ExpressionOperationPayloadV2OperationTypeNavigate ExpressionOperationPayloadV2OperationType = "navigate" ExpressionOperationPayloadV2OperationTypeParse ExpressionOperationPayloadV2OperationType = "parse" ExpressionOperationPayloadV2OperationTypeRandom ExpressionOperationPayloadV2OperationType = "random" + ExpressionOperationPayloadV2OperationTypeSum ExpressionOperationPayloadV2OperationType = "sum" ) // Defines values for ExpressionOperationV2OperationType. @@ -402,6 +415,7 @@ const ( ExpressionOperationV2OperationTypeNavigate ExpressionOperationV2OperationType = "navigate" ExpressionOperationV2OperationTypeParse ExpressionOperationV2OperationType = "parse" ExpressionOperationV2OperationTypeRandom ExpressionOperationV2OperationType = "random" + ExpressionOperationV2OperationTypeSum ExpressionOperationV2OperationType = "sum" ) // Defines values for ExternalIssueReferenceV1Provider. @@ -463,12 +477,49 @@ const ( IdentityV1RolesManageSettings IdentityV1Roles = "manage_settings" IdentityV1RolesOnCallEditor IdentityV1Roles = "on_call_editor" IdentityV1RolesPrivateWorkflowsEditor IdentityV1Roles = "private_workflows_editor" + IdentityV1RolesScheduleOverridesEditor IdentityV1Roles = "schedule_overrides_editor" IdentityV1RolesSchedulesEditor IdentityV1Roles = "schedules_editor" IdentityV1RolesSchedulesReader IdentityV1Roles = "schedules_reader" IdentityV1RolesViewer IdentityV1Roles = "viewer" IdentityV1RolesWorkflowsEditor IdentityV1Roles = "workflows_editor" ) +// Defines values for IncidentCreatePayloadV1Mode. +const ( + IncidentCreatePayloadV1ModeReal IncidentCreatePayloadV1Mode = "real" + IncidentCreatePayloadV1ModeTest IncidentCreatePayloadV1Mode = "test" +) + +// Defines values for IncidentCreatePayloadV1Status. +const ( + IncidentCreatePayloadV1StatusClosed IncidentCreatePayloadV1Status = "closed" + IncidentCreatePayloadV1StatusDeclined IncidentCreatePayloadV1Status = "declined" + IncidentCreatePayloadV1StatusFixing IncidentCreatePayloadV1Status = "fixing" + IncidentCreatePayloadV1StatusInvestigating IncidentCreatePayloadV1Status = "investigating" + IncidentCreatePayloadV1StatusMonitoring IncidentCreatePayloadV1Status = "monitoring" + IncidentCreatePayloadV1StatusTriage IncidentCreatePayloadV1Status = "triage" +) + +// Defines values for IncidentCreatePayloadV1Visibility. +const ( + IncidentCreatePayloadV1VisibilityPrivate IncidentCreatePayloadV1Visibility = "private" + IncidentCreatePayloadV1VisibilityPublic IncidentCreatePayloadV1Visibility = "public" +) + +// Defines values for IncidentCreatePayloadV2Mode. +const ( + IncidentCreatePayloadV2ModeRetrospective IncidentCreatePayloadV2Mode = "retrospective" + IncidentCreatePayloadV2ModeStandard IncidentCreatePayloadV2Mode = "standard" + IncidentCreatePayloadV2ModeTest IncidentCreatePayloadV2Mode = "test" + IncidentCreatePayloadV2ModeTutorial IncidentCreatePayloadV2Mode = "tutorial" +) + +// Defines values for IncidentCreatePayloadV2Visibility. +const ( + IncidentCreatePayloadV2VisibilityPrivate IncidentCreatePayloadV2Visibility = "private" + IncidentCreatePayloadV2VisibilityPublic IncidentCreatePayloadV2Visibility = "public" +) + // Defines values for IncidentRoleV1RoleType. const ( IncidentRoleV1RoleTypeCustom IncidentRoleV1RoleType = "custom" @@ -478,9 +529,9 @@ const ( // Defines values for IncidentRoleV2RoleType. const ( - IncidentRoleV2RoleTypeCustom IncidentRoleV2RoleType = "custom" - IncidentRoleV2RoleTypeLead IncidentRoleV2RoleType = "lead" - IncidentRoleV2RoleTypeReporter IncidentRoleV2RoleType = "reporter" + Custom IncidentRoleV2RoleType = "custom" + Lead IncidentRoleV2RoleType = "lead" + Reporter IncidentRoleV2RoleType = "reporter" ) // Defines values for IncidentStatusV1Category. @@ -495,12 +546,30 @@ const ( IncidentStatusV1CategoryTriage IncidentStatusV1Category = "triage" ) +// Defines values for IncidentStatusV2Category. +const ( + IncidentStatusV2CategoryCanceled IncidentStatusV2Category = "canceled" + IncidentStatusV2CategoryClosed IncidentStatusV2Category = "closed" + IncidentStatusV2CategoryDeclined IncidentStatusV2Category = "declined" + IncidentStatusV2CategoryLearning IncidentStatusV2Category = "learning" + IncidentStatusV2CategoryLive IncidentStatusV2Category = "live" + IncidentStatusV2CategoryMerged IncidentStatusV2Category = "merged" + IncidentStatusV2CategoryPaused IncidentStatusV2Category = "paused" + IncidentStatusV2CategoryTriage IncidentStatusV2Category = "triage" +) + // Defines values for IncidentTypeV1CreateInTriage. const ( IncidentTypeV1CreateInTriageAlways IncidentTypeV1CreateInTriage = "always" IncidentTypeV1CreateInTriageOptional IncidentTypeV1CreateInTriage = "optional" ) +// Defines values for IncidentTypeV2CreateInTriage. +const ( + IncidentTypeV2CreateInTriageAlways IncidentTypeV2CreateInTriage = "always" + IncidentTypeV2CreateInTriageOptional IncidentTypeV2CreateInTriage = "optional" +) + // Defines values for IncidentV1Mode. const ( IncidentV1ModeReal IncidentV1Mode = "real" @@ -510,12 +579,12 @@ const ( // Defines values for IncidentV1Status. const ( - IncidentV1StatusClosed IncidentV1Status = "closed" - IncidentV1StatusDeclined IncidentV1Status = "declined" - IncidentV1StatusFixing IncidentV1Status = "fixing" - IncidentV1StatusInvestigating IncidentV1Status = "investigating" - IncidentV1StatusMonitoring IncidentV1Status = "monitoring" - IncidentV1StatusTriage IncidentV1Status = "triage" + Closed IncidentV1Status = "closed" + Declined IncidentV1Status = "declined" + Fixing IncidentV1Status = "fixing" + Investigating IncidentV1Status = "investigating" + Monitoring IncidentV1Status = "monitoring" + Triage IncidentV1Status = "triage" ) // Defines values for IncidentV1Visibility. @@ -538,19 +607,6 @@ const ( IncidentV2VisibilityPublic IncidentV2Visibility = "public" ) -// Defines values for ManagedResourceV2ManagedBy. -const ( - ManagedResourceV2ManagedByDashboard ManagedResourceV2ManagedBy = "dashboard" - ManagedResourceV2ManagedByExternal ManagedResourceV2ManagedBy = "external" - ManagedResourceV2ManagedByTerraform ManagedResourceV2ManagedBy = "terraform" -) - -// Defines values for ManagedResourceV2ResourceType. -const ( - ManagedResourceV2ResourceTypeSchedule ManagedResourceV2ResourceType = "schedule" - ManagedResourceV2ResourceTypeWorkflow ManagedResourceV2ResourceType = "workflow" -) - // Defines values for ManagementMetaV2ManagedBy. const ( Dashboard ManagementMetaV2ManagedBy = "dashboard" @@ -565,29 +621,51 @@ const ( Weekly ScheduleRotationHandoverV2IntervalType = "weekly" ) +// Defines values for ScheduleRotationWorkingIntervalCreatePayloadV2Weekday. +const ( + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdayFriday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "friday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdayMonday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "monday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdaySaturday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "saturday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdaySunday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "sunday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdayThursday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "thursday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdayTuesday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "tuesday" + ScheduleRotationWorkingIntervalCreatePayloadV2WeekdayWednesday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday = "wednesday" +) + // Defines values for ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday. const ( - Friday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "friday" - Monday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "monday" - Saturday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "saturday" - Sunday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "sunday" - Thursday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "thursday" - Tuesday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "tuesday" - Wednesday ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday = "wednesday" + 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 ( + Friday ScheduleRotationWorkingIntervalV2Weekday = "friday" + Monday ScheduleRotationWorkingIntervalV2Weekday = "monday" + Saturday ScheduleRotationWorkingIntervalV2Weekday = "saturday" + Sunday ScheduleRotationWorkingIntervalV2Weekday = "sunday" + Thursday ScheduleRotationWorkingIntervalV2Weekday = "thursday" + Tuesday ScheduleRotationWorkingIntervalV2Weekday = "tuesday" + Wednesday ScheduleRotationWorkingIntervalV2Weekday = "wednesday" ) -// Defines values for UpdateRequestBody2Required. +// Defines values for UpdateRequestBody3Required. const ( - UpdateRequestBody2RequiredAlways UpdateRequestBody2Required = "always" - UpdateRequestBody2RequiredBeforeClosure UpdateRequestBody2Required = "before_closure" - UpdateRequestBody2RequiredNever UpdateRequestBody2Required = "never" + UpdateRequestBody3RequiredAlways UpdateRequestBody3Required = "always" + UpdateRequestBody3RequiredBeforeClosure UpdateRequestBody3Required = "before_closure" + UpdateRequestBody3RequiredNever UpdateRequestBody3Required = "never" ) -// Defines values for UpdateRequestBody2RequiredV2. +// Defines values for UpdateRequestBody3RequiredV2. const ( - Always UpdateRequestBody2RequiredV2 = "always" - BeforeResolution UpdateRequestBody2RequiredV2 = "before_resolution" - Never UpdateRequestBody2RequiredV2 = "never" + UpdateRequestBody3RequiredV2Always UpdateRequestBody3RequiredV2 = "always" + UpdateRequestBody3RequiredV2BeforeResolution UpdateRequestBody3RequiredV2 = "before_resolution" + UpdateRequestBody3RequiredV2Never UpdateRequestBody3RequiredV2 = "never" ) // Defines values for UpdateTypeRequestBodyCategories. @@ -614,51 +692,54 @@ const ( // Defines values for UpdateTypeRequestBodyIcon. const ( - UpdateTypeRequestBodyIconBolt UpdateTypeRequestBodyIcon = "bolt" - UpdateTypeRequestBodyIconBox UpdateTypeRequestBodyIcon = "box" - UpdateTypeRequestBodyIconBriefcase UpdateTypeRequestBodyIcon = "briefcase" - UpdateTypeRequestBodyIconBrowser UpdateTypeRequestBodyIcon = "browser" - UpdateTypeRequestBodyIconBulb UpdateTypeRequestBodyIcon = "bulb" - UpdateTypeRequestBodyIconCalendar UpdateTypeRequestBodyIcon = "calendar" - UpdateTypeRequestBodyIconClock UpdateTypeRequestBodyIcon = "clock" - UpdateTypeRequestBodyIconCog UpdateTypeRequestBodyIcon = "cog" - UpdateTypeRequestBodyIconComponents UpdateTypeRequestBodyIcon = "components" - UpdateTypeRequestBodyIconDatabase UpdateTypeRequestBodyIcon = "database" - UpdateTypeRequestBodyIconDoc UpdateTypeRequestBodyIcon = "doc" - UpdateTypeRequestBodyIconEmail UpdateTypeRequestBodyIcon = "email" - UpdateTypeRequestBodyIconFiles UpdateTypeRequestBodyIcon = "files" - UpdateTypeRequestBodyIconFlag UpdateTypeRequestBodyIcon = "flag" - UpdateTypeRequestBodyIconFolder UpdateTypeRequestBodyIcon = "folder" - UpdateTypeRequestBodyIconGlobe UpdateTypeRequestBodyIcon = "globe" - UpdateTypeRequestBodyIconMoney UpdateTypeRequestBodyIcon = "money" - UpdateTypeRequestBodyIconServer UpdateTypeRequestBodyIcon = "server" - UpdateTypeRequestBodyIconSeverity UpdateTypeRequestBodyIcon = "severity" - UpdateTypeRequestBodyIconStar UpdateTypeRequestBodyIcon = "star" - UpdateTypeRequestBodyIconStore UpdateTypeRequestBodyIcon = "store" - UpdateTypeRequestBodyIconTag UpdateTypeRequestBodyIcon = "tag" - UpdateTypeRequestBodyIconUser UpdateTypeRequestBodyIcon = "user" - UpdateTypeRequestBodyIconUsers UpdateTypeRequestBodyIcon = "users" + Alert UpdateTypeRequestBodyIcon = "alert" + Bolt UpdateTypeRequestBodyIcon = "bolt" + Box UpdateTypeRequestBodyIcon = "box" + Briefcase UpdateTypeRequestBodyIcon = "briefcase" + Browser UpdateTypeRequestBodyIcon = "browser" + Bulb UpdateTypeRequestBodyIcon = "bulb" + Calendar UpdateTypeRequestBodyIcon = "calendar" + Clock UpdateTypeRequestBodyIcon = "clock" + Cog UpdateTypeRequestBodyIcon = "cog" + Components UpdateTypeRequestBodyIcon = "components" + Database UpdateTypeRequestBodyIcon = "database" + Doc UpdateTypeRequestBodyIcon = "doc" + Email UpdateTypeRequestBodyIcon = "email" + EscalationPath UpdateTypeRequestBodyIcon = "escalation-path" + Files UpdateTypeRequestBodyIcon = "files" + Flag UpdateTypeRequestBodyIcon = "flag" + Folder UpdateTypeRequestBodyIcon = "folder" + Globe UpdateTypeRequestBodyIcon = "globe" + Money UpdateTypeRequestBodyIcon = "money" + Server UpdateTypeRequestBodyIcon = "server" + Severity UpdateTypeRequestBodyIcon = "severity" + Star UpdateTypeRequestBodyIcon = "star" + StatusPage UpdateTypeRequestBodyIcon = "status-page" + Store UpdateTypeRequestBodyIcon = "store" + Tag UpdateTypeRequestBodyIcon = "tag" + User UpdateTypeRequestBodyIcon = "user" + Users UpdateTypeRequestBodyIcon = "users" ) -// Defines values for UpdateWorkflowRequestBodyRunsOnIncidentModes. +// Defines values for UpdateWorkflowPayloadRunsOnIncidentModes. const ( - UpdateWorkflowRequestBodyRunsOnIncidentModesRetrospective UpdateWorkflowRequestBodyRunsOnIncidentModes = "retrospective" - UpdateWorkflowRequestBodyRunsOnIncidentModesStandard UpdateWorkflowRequestBodyRunsOnIncidentModes = "standard" - UpdateWorkflowRequestBodyRunsOnIncidentModesTest UpdateWorkflowRequestBodyRunsOnIncidentModes = "test" + UpdateWorkflowPayloadRunsOnIncidentModesRetrospective UpdateWorkflowPayloadRunsOnIncidentModes = "retrospective" + UpdateWorkflowPayloadRunsOnIncidentModesStandard UpdateWorkflowPayloadRunsOnIncidentModes = "standard" + UpdateWorkflowPayloadRunsOnIncidentModesTest UpdateWorkflowPayloadRunsOnIncidentModes = "test" ) -// Defines values for UpdateWorkflowRequestBodyRunsOnIncidents. +// Defines values for UpdateWorkflowPayloadRunsOnIncidents. const ( - UpdateWorkflowRequestBodyRunsOnIncidentsNewlyCreated UpdateWorkflowRequestBodyRunsOnIncidents = "newly_created" - UpdateWorkflowRequestBodyRunsOnIncidentsNewlyCreatedAndActive UpdateWorkflowRequestBodyRunsOnIncidents = "newly_created_and_active" + UpdateWorkflowPayloadRunsOnIncidentsNewlyCreated UpdateWorkflowPayloadRunsOnIncidents = "newly_created" + UpdateWorkflowPayloadRunsOnIncidentsNewlyCreatedAndActive UpdateWorkflowPayloadRunsOnIncidents = "newly_created_and_active" ) -// Defines values for UpdateWorkflowRequestBodyState. +// Defines values for UpdateWorkflowPayloadState. const ( - UpdateWorkflowRequestBodyStateActive UpdateWorkflowRequestBodyState = "active" - UpdateWorkflowRequestBodyStateDisabled UpdateWorkflowRequestBodyState = "disabled" - UpdateWorkflowRequestBodyStateDraft UpdateWorkflowRequestBodyState = "draft" - UpdateWorkflowRequestBodyStateError UpdateWorkflowRequestBodyState = "error" + UpdateWorkflowPayloadStateActive UpdateWorkflowPayloadState = "active" + UpdateWorkflowPayloadStateDisabled UpdateWorkflowPayloadState = "disabled" + UpdateWorkflowPayloadStateDraft UpdateWorkflowPayloadState = "draft" + UpdateWorkflowPayloadStateError UpdateWorkflowPayloadState = "error" ) // Defines values for UserV1Role. @@ -670,13 +751,22 @@ const ( UserV1RoleViewer UserV1Role = "viewer" ) +// Defines values for UserV2Role. +const ( + UserV2RoleAdministrator UserV2Role = "administrator" + UserV2RoleOwner UserV2Role = "owner" + UserV2RoleResponder UserV2Role = "responder" + UserV2RoleUnset UserV2Role = "unset" + UserV2RoleViewer UserV2Role = "viewer" +) + // Defines values for UserWithRolesV2Role. const ( - Administrator UserWithRolesV2Role = "administrator" - Owner UserWithRolesV2Role = "owner" - Responder UserWithRolesV2Role = "responder" - Unset UserWithRolesV2Role = "unset" - Viewer UserWithRolesV2Role = "viewer" + UserWithRolesV2RoleAdministrator UserWithRolesV2Role = "administrator" + UserWithRolesV2RoleOwner UserWithRolesV2Role = "owner" + UserWithRolesV2RoleResponder UserWithRolesV2Role = "responder" + UserWithRolesV2RoleUnset UserWithRolesV2Role = "unset" + UserWithRolesV2RoleViewer UserWithRolesV2Role = "viewer" ) // Defines values for WorkflowRunsOnIncidentModes. @@ -715,10 +805,10 @@ const ( // Defines values for WorkflowSlimState. const ( - Active WorkflowSlimState = "active" - Disabled WorkflowSlimState = "disabled" - Draft WorkflowSlimState = "draft" - Error WorkflowSlimState = "error" + WorkflowSlimStateActive WorkflowSlimState = "active" + WorkflowSlimStateDisabled WorkflowSlimState = "disabled" + WorkflowSlimStateDraft WorkflowSlimState = "draft" + WorkflowSlimStateError WorkflowSlimState = "error" ) // Defines values for ActionsV1ListParamsIncidentMode. @@ -762,6 +852,15 @@ const ( Tutorial FollowUpsV2ListParamsIncidentMode = "tutorial" ) +// APIKeyV1 defines model for APIKeyV1. +type APIKeyV1 struct { + // Id Unique identifier for this API key + Id string `json:"id"` + + // Name The name of the API key, for the user's reference + Name string `json:"name"` +} + // APIKeyV2 defines model for APIKeyV2. type APIKeyV2 struct { // Id Unique identifier for this API key @@ -806,7 +905,7 @@ type ActionV1Status string // ActionV2 defines model for ActionV2. type ActionV2 struct { - Assignee *UserV1 `json:"assignee,omitempty"` + Assignee *UserV2 `json:"assignee,omitempty"` // CompletedAt When the action was completed CompletedAt *time.Time `json:"completed_at,omitempty"` @@ -833,10 +932,16 @@ type ActionV2 struct { // ActionV2Status Status of the action type ActionV2Status string +// ActorV1 defines model for ActorV1. +type ActorV1 struct { + ApiKey *APIKeyV1 `json:"api_key,omitempty"` + User *UserV1 `json:"user,omitempty"` +} + // ActorV2 defines model for ActorV2. type ActorV2 struct { ApiKey *APIKeyV2 `json:"api_key,omitempty"` - User *UserV1 `json:"user,omitempty"` + User *UserV2 `json:"user,omitempty"` } // AfterPaginationMetaResultV2 defines model for AfterPaginationMetaResultV2. @@ -869,6 +974,138 @@ type AlertResultMessage string // AlertResultStatus Status of the event type AlertResultStatus string +// AlertRouteAlertSourcePayloadV2 defines model for AlertRouteAlertSourcePayloadV2. +type AlertRouteAlertSourcePayloadV2 struct { + // AlertSourceId The alert source ID that will match for the route + AlertSourceId string `json:"alert_source_id"` + + // ConditionGroups What conditions should alerts from this source meet to be included in this alert route? + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` +} + +// AlertRouteEscalationBindingPayloadV2 defines model for AlertRouteEscalationBindingPayloadV2. +type AlertRouteEscalationBindingPayloadV2 struct { + Binding EngineParamBindingPayloadV2 `json:"binding"` +} + +// AlertRouteEscalationBindingV2 defines model for AlertRouteEscalationBindingV2. +type AlertRouteEscalationBindingV2 struct { + Binding EngineParamBindingV2 `json:"binding"` +} + +// AlertRouteIncidentTemplatePayloadV2 defines model for AlertRouteIncidentTemplatePayloadV2. +type AlertRouteIncidentTemplatePayloadV2 struct { + // CustomFieldPriorities lookup of the priority options for each custom field in the template + CustomFieldPriorities map[string]string `json:"custom_field_priorities"` + + // CustomFields Custom field keys mapped to values + CustomFields *map[string]EngineParamBindingPayloadV2 `json:"custom_fields,omitempty"` + IncidentMode *EngineParamBindingPayloadV2 `json:"incident_mode,omitempty"` + IncidentType *EngineParamBindingPayloadV2 `json:"incident_type,omitempty"` + Name *EngineParamBindingPayloadV2 `json:"name,omitempty"` + + // PrioritySeverity option defining whether to cause subsequent alerts to increase the severity + PrioritySeverity AlertRouteIncidentTemplatePayloadV2PrioritySeverity `json:"priority_severity"` + Severity *EngineParamBindingPayloadV2 `json:"severity,omitempty"` + Summary *EngineParamBindingPayloadV2 `json:"summary,omitempty"` + Workspace *EngineParamBindingPayloadV2 `json:"workspace,omitempty"` +} + +// AlertRouteIncidentTemplatePayloadV2PrioritySeverity option defining whether to cause subsequent alerts to increase the severity +type AlertRouteIncidentTemplatePayloadV2PrioritySeverity string + +// AlertRouteIncidentTemplateV2 defines model for AlertRouteIncidentTemplateV2. +type AlertRouteIncidentTemplateV2 struct { + // CustomFieldPriorities lookup of the priority options for each custom field in the template + CustomFieldPriorities map[string]AlertRouteIncidentTemplateV2CustomFieldPriorities `json:"custom_field_priorities"` + + // CustomFields Custom field keys mapped to values + CustomFields *map[string]EngineParamBindingV2 `json:"custom_fields,omitempty"` + IncidentMode *EngineParamBindingV2 `json:"incident_mode,omitempty"` + IncidentType *EngineParamBindingV2 `json:"incident_type,omitempty"` + Name *EngineParamBindingV2 `json:"name,omitempty"` + + // PrioritySeverity binding to use to resolve the workspace to create an incident in + PrioritySeverity AlertRouteIncidentTemplateV2PrioritySeverity `json:"priority_severity"` + Severity *EngineParamBindingV2 `json:"severity,omitempty"` + Summary *EngineParamBindingV2 `json:"summary,omitempty"` + Workspace *EngineParamBindingV2 `json:"workspace,omitempty"` +} + +// AlertRouteIncidentTemplateV2CustomFieldPriorities defines model for AlertRouteIncidentTemplateV2.CustomFieldPriorities. +type AlertRouteIncidentTemplateV2CustomFieldPriorities string + +// AlertRouteIncidentTemplateV2PrioritySeverity binding to use to resolve the workspace to create an incident in +type AlertRouteIncidentTemplateV2PrioritySeverity string + +// AlertRoutePayloadV2 defines model for AlertRoutePayloadV2. +type AlertRoutePayloadV2 struct { + // AlertSources Which alert sources should this alert route match? + AlertSources *[]AlertRouteAlertSourcePayloadV2 `json:"alert_sources,omitempty"` + + // AutoDeclineEnabled Should triage incidents be declined when alerts are resolved? + AutoDeclineEnabled *bool `json:"auto_decline_enabled,omitempty"` + + // ConditionGroups What condition groups must be true for this alert route to fire? + ConditionGroups *[]ConditionGroupPayloadV2 `json:"condition_groups,omitempty"` + + // DeferTimeSeconds How long should the escalation defer time be? + DeferTimeSeconds *int64 `json:"defer_time_seconds,omitempty"` + + // Enabled Whether this alert route is enabled or not + Enabled *bool `json:"enabled,omitempty"` + + // EscalationBindings Which escalation paths should this alert route escalate to? + EscalationBindings *[]AlertRouteEscalationBindingPayloadV2 `json:"escalation_bindings,omitempty"` + + // Expressions The expressions used in this template + Expressions *[]ExpressionPayloadV2 `json:"expressions,omitempty"` + + // GroupingKeys Which attributes should this alert route use to group alerts? + GroupingKeys *[]GroupingKeyV2 `json:"grouping_keys,omitempty"` + + // GroupingWindowSeconds How large should the grouping window be? + GroupingWindowSeconds *int64 `json:"grouping_window_seconds,omitempty"` + + // IncidentConditionGroups What condition groups must be true for this alert route to create an incident? + IncidentConditionGroups *[]ConditionGroupPayloadV2 `json:"incident_condition_groups,omitempty"` + + // IncidentEnabled Whether this alert route will create incidents or not + IncidentEnabled *bool `json:"incident_enabled,omitempty"` + + // Name The name of this alert route config, for the user's reference + Name *string `json:"name,omitempty"` + Template *AlertRouteIncidentTemplatePayloadV2 `json:"template,omitempty"` +} + +// AlertRouteV2 defines model for AlertRouteV2. +type AlertRouteV2 struct { + // ConditionGroups What condition groups must be true for this alert route to fire? + ConditionGroups []ConditionGroupV2 `json:"condition_groups"` + + // DeferTimeSeconds How long should the escalation defer time be? + DeferTimeSeconds int64 `json:"defer_time_seconds"` + + // EscalationBindings Which escalation paths should this alert route escalate to? + EscalationBindings []AlertRouteEscalationBindingV2 `json:"escalation_bindings"` + + // Expressions The expressions used in this template + Expressions *[]ExpressionV2 `json:"expressions,omitempty"` + + // GroupingKeys Which attributes should this alert route use to group alerts? + GroupingKeys []GroupingKeyV2 `json:"grouping_keys"` + + // GroupingWindowSeconds How large should the grouping window be? + GroupingWindowSeconds int64 `json:"grouping_window_seconds"` + + // Id Unique identifier for this alert route config + Id string `json:"id"` + + // Name The name of this alert route config, for the user's reference + Name string `json:"name"` + Template *AlertRouteIncidentTemplateV2 `json:"template,omitempty"` +} + // CatalogEntryEngineParamBindingV2 defines model for CatalogEntryEngineParamBindingV2. type CatalogEntryEngineParamBindingV2 struct { // ArrayValue If array_value is set, this helps render the values @@ -880,13 +1117,13 @@ type CatalogEntryEngineParamBindingV2 struct { type CatalogEntryEngineParamBindingValueV2 struct { CatalogEntry *CatalogEntryReferenceV2 `json:"catalog_entry,omitempty"` - // Helptext Gives a description of the option to the user + // Helptext This field is deprecated. It will not be present in any responses, and will be removed in a future version Helptext *string `json:"helptext,omitempty"` - // ImageUrl If appropriate, URL to an image that can be displayed alongside the option + // ImageUrl This field is deprecated. It will not be present in any responses, and will be removed in a future version ImageUrl *string `json:"image_url,omitempty"` - // IsImageSlackIcon If true, the image_url is a Slack icon and should be displayed as such + // IsImageSlackIcon This field is deprecated. It will not be present in any responses, and will be removed in a future version IsImageSlackIcon *bool `json:"is_image_slack_icon,omitempty"` // Label Human readable label to be displayed for user to select @@ -895,16 +1132,16 @@ type CatalogEntryEngineParamBindingValueV2 struct { // 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 This field is deprecated. It will not be present in any responses, and will be removed in a future version Reference *string `json:"reference,omitempty"` - // SortKey Gives an indication of how to sort the options when displayed to the user + // SortKey This field is deprecated. It will not be present in any responses, and will be removed in a future version SortKey string `json:"sort_key"` - // Unavailable Unavailable is true if we've failed to build the value for this binding + // Unavailable This field is deprecated. It will not be present in any responses, and will be removed in a future version 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 This field is deprecated. It will not be present in any responses, and will be removed in a future version Value *string `json:"value,omitempty"` } @@ -1103,7 +1340,7 @@ type CatalogTypeV2 struct { RequiredIntegrations *[]string `json:"required_integrations,omitempty"` Schema CatalogTypeSchemaV2 `json:"schema"` - // SemanticType Semantic type of this resource (unused) + // SemanticType What type of resource this catalog type should be understodd as SemanticType string `json:"semantic_type"` // SourceRepoUrl The url of the external repository where this type is managed @@ -1134,7 +1371,7 @@ type ConditionGroupPayloadV2 struct { // ConditionGroupV2 defines model for ConditionGroupV2. type ConditionGroupV2 struct { // Conditions All conditions in this list must be satisfied for the group to be satisfied - Conditions []ConditionV3 `json:"conditions"` + Conditions []ConditionV2 `json:"conditions"` } // ConditionOperationV2 defines model for ConditionOperationV2. @@ -1146,15 +1383,6 @@ type ConditionOperationV2 struct { Value string `json:"value"` } -// ConditionOperationV3 defines model for ConditionOperationV3. -type ConditionOperationV3 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 @@ -1176,15 +1404,6 @@ type ConditionSubjectV2 struct { Reference string `json:"reference"` } -// ConditionSubjectV3 defines model for ConditionSubjectV3. -type ConditionSubjectV3 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"` @@ -1194,15 +1413,6 @@ type ConditionV2 struct { Subject ConditionSubjectV2 `json:"subject"` } -// ConditionV3 defines model for ConditionV3. -type ConditionV3 struct { - Operation ConditionOperationV3 `json:"operation"` - - // ParamBindings Bindings for the operation parameters - ParamBindings []EngineParamBindingV3 `json:"param_bindings"` - Subject ConditionSubjectV3 `json:"subject"` -} - // CreateEntryRequestBody defines model for CreateEntryRequestBody. type CreateEntryRequestBody struct { // Aliases Optional aliases that can be used to reference this entry @@ -1253,36 +1463,9 @@ type CreateHTTPRequestBody struct { // CreateHTTPRequestBodyStatus Current status of this alert type CreateHTTPRequestBodyStatus string -// CreateManagedResourceRequestBody defines model for CreateManagedResourceRequestBody. -type CreateManagedResourceRequestBody struct { - // Annotations Annotations that track metadata about this resource - Annotations map[string]string `json:"annotations"` - - // ResourceId The ID of the related resource - ResourceId string `json:"resource_id"` - - // ResourceType The type of the related resource - ResourceType CreateManagedResourceRequestBodyResourceType `json:"resource_type"` -} - -// CreateManagedResourceRequestBodyResourceType The type of the related resource -type CreateManagedResourceRequestBodyResourceType string - -// CreateManagedResourceResponseBody defines model for CreateManagedResourceResponseBody. -type CreateManagedResourceResponseBody struct { - ManagedResource ManagedResourceV2 `json:"managed_resource"` -} - -// CreatePathRequestBody defines model for CreatePathRequestBody. -type CreatePathRequestBody struct { - // Name The name of this escalation path, for the user's reference. - Name string `json:"name"` - - // Path The nodes that form the levels and branches of this escalation path. - Path []EscalationPathNodePayloadV2 `json:"path"` - - // WorkingHours The working hours for this escalation path. - WorkingHours *[]WeekdayIntervalConfigV2 `json:"working_hours,omitempty"` +// CreateOverrideResponseBody defines model for CreateOverrideResponseBody. +type CreateOverrideResponseBody struct { + Override ScheduleOverrideV2 `json:"override"` } // CreatePathResponseBody defines model for CreatePathResponseBody. @@ -1304,63 +1487,6 @@ type CreateRequestBody struct { // CreateRequestBody10 defines model for CreateRequestBody10. type CreateRequestBody10 struct { - // CustomFieldEntries Set the incident's custom fields to these values - CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` - - // Id Unique identifier for the incident - Id *string `json:"id,omitempty"` - - // IdempotencyKey Unique string used to de-duplicate incident create requests - IdempotencyKey string `json:"idempotency_key"` - - // IncidentRoleAssignments Assign incident roles to these people - IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV2 `json:"incident_role_assignments,omitempty"` - - // IncidentStatusId Incident status to assign to the incident - IncidentStatusId *string `json:"incident_status_id,omitempty"` - - // IncidentTimestampValues Assign the incident's timestamps to these values - IncidentTimestampValues *[]IncidentTimestampValuePayloadV2 `json:"incident_timestamp_values,omitempty"` - - // IncidentTypeId Incident type to create this incident as - IncidentTypeId *string `json:"incident_type_id,omitempty"` - - // Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident - Mode *CreateRequestBody10Mode `json:"mode,omitempty"` - - // Name Explanation of the incident - Name *string `json:"name,omitempty"` - RetrospectiveIncidentOptions *RetrospectiveIncidentOptionsV2 `json:"retrospective_incident_options,omitempty"` - - // SeverityId Severity to create incident as - SeverityId *string `json:"severity_id,omitempty"` - - // SlackChannelNameOverride Name of the Slack channel to create for this incident - SlackChannelNameOverride *string `json:"slack_channel_name_override,omitempty"` - - // SlackTeamId Slack Team to create the incident in - SlackTeamId *string `json:"slack_team_id,omitempty"` - - // Summary Detailed description of the incident - Summary *string `json:"summary,omitempty"` - - // Visibility 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). - Visibility CreateRequestBody10Visibility `json:"visibility"` -} - -// CreateRequestBody10Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident -type CreateRequestBody10Mode string - -// CreateRequestBody10Visibility 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). -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"` @@ -1497,63 +1623,22 @@ type CreateRequestBody8Category string // CreateRequestBody9 defines model for CreateRequestBody9. type CreateRequestBody9 struct { - // CustomFieldEntries Set the incident's custom fields to these values - CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` - - // IdempotencyKey Unique string used to de-duplicate incident create requests - IdempotencyKey string `json:"idempotency_key"` - - // IncidentRoleAssignments Assign incident roles to these people - IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV1 `json:"incident_role_assignments,omitempty"` - - // IncidentTypeId Incident type to create this incident as - IncidentTypeId *string `json:"incident_type_id,omitempty"` - - // Mode Whether the incident is real or test - Mode *CreateRequestBody9Mode `json:"mode,omitempty"` - - // Name Explanation of the incident - Name *string `json:"name,omitempty"` - - // SeverityId Severity to create incident as - SeverityId *string `json:"severity_id,omitempty"` - - // SlackTeamId ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams. - SlackTeamId *string `json:"slack_team_id,omitempty"` - - // SourceMessageChannelId Channel ID of the source message, if this incident was created from one - SourceMessageChannelId *string `json:"source_message_channel_id,omitempty"` - - // SourceMessageTimestamp Timestamp of the source message, if this incident was created from one - SourceMessageTimestamp *string `json:"source_message_timestamp,omitempty"` - - // Status Current status of the incident - Status *CreateRequestBody9Status `json:"status,omitempty"` - - // Summary Detailed description of the incident - Summary *string `json:"summary,omitempty"` - - // Visibility 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). - Visibility CreateRequestBody9Visibility `json:"visibility"` + Schedule ScheduleCreatePayloadV2 `json:"schedule"` } -// CreateRequestBody9Mode Whether the incident is real or test -type CreateRequestBody9Mode string - -// CreateRequestBody9Status Current status of the incident -type CreateRequestBody9Status string - -// CreateRequestBody9Visibility 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). -type CreateRequestBody9Visibility string - // CreateResponseBody defines model for CreateResponseBody. type CreateResponseBody struct { - IncidentAttachment IncidentAttachmentV1 `json:"incident_attachment"` + AlertRoute AlertRouteV2 `json:"alert_route"` } // CreateResponseBody2 defines model for CreateResponseBody2. type CreateResponseBody2 struct { - IncidentMembership IncidentMembership `json:"incident_membership"` + IncidentAttachment IncidentAttachmentV1 `json:"incident_attachment"` +} + +// CreateResponseBody3 defines model for CreateResponseBody3. +type CreateResponseBody3 struct { + IncidentMembership IncidentMembership `json:"incident_membership"` } // CreateTypeRequestBody defines model for CreateTypeRequestBody. @@ -1600,8 +1685,8 @@ type CreateTypeResponseBody struct { CatalogType CatalogTypeV2 `json:"catalog_type"` } -// CreateWorkflowRequestBody defines model for CreateWorkflowRequestBody. -type CreateWorkflowRequestBody struct { +// CreateWorkflowPayload defines model for CreateWorkflowPayload. +type CreateWorkflowPayload struct { // Annotations Annotations that track metadata about this resource Annotations *map[string]string `json:"annotations,omitempty"` @@ -1628,13 +1713,16 @@ type CreateWorkflowRequestBody struct { 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"` + RunsOnIncidentModes []CreateWorkflowPayloadRunsOnIncidentModes `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"` + RunsOnIncidents CreateWorkflowPayloadRunsOnIncidents `json:"runs_on_incidents"` + + // Shortform Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo` + Shortform *string `json:"shortform,omitempty"` // State The state of the workflow (e.g. is it draft, or disabled) - State *CreateWorkflowRequestBodyState `json:"state,omitempty"` + State *CreateWorkflowPayloadState `json:"state,omitempty"` // Steps List of step to execute as part of the workflow Steps []StepConfigPayload `json:"steps"` @@ -1643,14 +1731,14 @@ type CreateWorkflowRequestBody struct { Trigger string `json:"trigger"` } -// CreateWorkflowRequestBodyRunsOnIncidentModes defines model for CreateWorkflowRequestBody.RunsOnIncidentModes. -type CreateWorkflowRequestBodyRunsOnIncidentModes string +// CreateWorkflowPayloadRunsOnIncidentModes Incident mode that workflows can run on +type CreateWorkflowPayloadRunsOnIncidentModes string -// CreateWorkflowRequestBodyRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) -type CreateWorkflowRequestBodyRunsOnIncidents string +// CreateWorkflowPayloadRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type CreateWorkflowPayloadRunsOnIncidents string -// CreateWorkflowRequestBodyState The state of the workflow (e.g. is it draft, or disabled) -type CreateWorkflowRequestBodyState string +// CreateWorkflowPayloadState The state of the workflow (e.g. is it draft, or disabled) +type CreateWorkflowPayloadState string // CustomFieldEntryPayloadV1 defines model for CustomFieldEntryPayloadV1. type CustomFieldEntryPayloadV1 struct { @@ -1661,6 +1749,15 @@ type CustomFieldEntryPayloadV1 struct { Values []CustomFieldValuePayloadV1 `json:"values"` } +// CustomFieldEntryPayloadV2 defines model for CustomFieldEntryPayloadV2. +type CustomFieldEntryPayloadV2 struct { + // CustomFieldId ID of the custom field this entry is linked against + CustomFieldId string `json:"custom_field_id"` + + // Values List of values to associate with this entry. Use an empty array to unset the value of the custom field. + Values []CustomFieldValuePayloadV2 `json:"values"` +} + // CustomFieldEntryV1 defines model for CustomFieldEntryV1. type CustomFieldEntryV1 struct { CustomField CustomFieldTypeInfoV1 `json:"custom_field"` @@ -1669,6 +1766,14 @@ type CustomFieldEntryV1 struct { Values []CustomFieldValueV1 `json:"values"` } +// CustomFieldEntryV2 defines model for CustomFieldEntryV2. +type CustomFieldEntryV2 struct { + CustomField CustomFieldTypeInfoV2 `json:"custom_field"` + + // Values List of custom field values set on this entry + Values []CustomFieldValueV2 `json:"values"` +} + // CustomFieldOptionV1 defines model for CustomFieldOptionV1. type CustomFieldOptionV1 struct { // CustomFieldId ID of the custom field this option belongs to @@ -1684,6 +1789,21 @@ type CustomFieldOptionV1 struct { Value string `json:"value"` } +// CustomFieldOptionV2 defines model for CustomFieldOptionV2. +type CustomFieldOptionV2 struct { + // CustomFieldId ID of the custom field this option belongs to + CustomFieldId string `json:"custom_field_id"` + + // Id Unique identifier for the custom field option + Id string `json:"id"` + + // SortKey Sort key used to order the custom field options correctly + SortKey int64 `json:"sort_key"` + + // Value Human readable name for the custom field option + Value string `json:"value"` +} + // CustomFieldTypeInfoV1 defines model for CustomFieldTypeInfoV1. type CustomFieldTypeInfoV1 struct { // Description Description of the custom field @@ -1705,6 +1825,27 @@ type CustomFieldTypeInfoV1 struct { // CustomFieldTypeInfoV1FieldType Type of custom field type CustomFieldTypeInfoV1FieldType string +// CustomFieldTypeInfoV2 defines model for CustomFieldTypeInfoV2. +type CustomFieldTypeInfoV2 struct { + // Description Description of the custom field + Description string `json:"description"` + + // FieldType Type of custom field + FieldType CustomFieldTypeInfoV2FieldType `json:"field_type"` + + // Id Unique identifier for the custom field + Id string `json:"id"` + + // Name Human readable name for the custom field + Name string `json:"name"` + + // Options What options are available for this custom field, if this field has options + Options []CustomFieldOptionV2 `json:"options"` +} + +// CustomFieldTypeInfoV2FieldType Type of custom field +type CustomFieldTypeInfoV2FieldType string + // CustomFieldV1 defines model for CustomFieldV1. type CustomFieldV1 struct { // CatalogTypeId For catalog fields, the ID of the associated catalog type @@ -1810,6 +1951,30 @@ type CustomFieldValuePayloadV1 struct { ValueTimestamp *string `json:"value_timestamp,omitempty"` } +// CustomFieldValuePayloadV2 defines model for CustomFieldValuePayloadV2. +type CustomFieldValuePayloadV2 struct { + // Id Unique identifier for the custom field value + Id *string `json:"id,omitempty"` + + // ValueCatalogEntryId ID of the catalog entry. You can also use an ExternalID or an Alias of the catalog entry. + ValueCatalogEntryId *string `json:"value_catalog_entry_id,omitempty"` + + // ValueLink If the custom field type is 'link', this will contain the value assigned. + ValueLink *string `json:"value_link,omitempty"` + + // ValueNumeric If the custom field type is 'numeric', this will contain the value assigned. + ValueNumeric *string `json:"value_numeric,omitempty"` + + // ValueOptionId ID of the custom field option + ValueOptionId *string `json:"value_option_id,omitempty"` + + // ValueText If the custom field type is 'text', this will contain the value assigned. + ValueText *string `json:"value_text,omitempty"` + + // ValueTimestamp Deprecated: please use incident timestamp values instead + ValueTimestamp *string `json:"value_timestamp,omitempty"` +} + // CustomFieldValueV1 defines model for CustomFieldValueV1. type CustomFieldValueV1 struct { ValueCatalogEntry *EmbeddedCatalogEntryV1 `json:"value_catalog_entry,omitempty"` @@ -1825,6 +1990,21 @@ type CustomFieldValueV1 struct { ValueText *string `json:"value_text,omitempty"` } +// CustomFieldValueV2 defines model for CustomFieldValueV2. +type CustomFieldValueV2 struct { + ValueCatalogEntry *EmbeddedCatalogEntryV2 `json:"value_catalog_entry,omitempty"` + + // ValueLink If the custom field type is 'link', this will contain the value assigned. + ValueLink *string `json:"value_link,omitempty"` + + // ValueNumeric If the custom field type is 'numeric', this will contain the value assigned. + ValueNumeric *string `json:"value_numeric,omitempty"` + ValueOption *CustomFieldOptionV2 `json:"value_option,omitempty"` + + // ValueText If the custom field type is 'text', this will contain the value assigned. + ValueText *string `json:"value_text,omitempty"` +} + // EditRequestBody defines model for EditRequestBody. type EditRequestBody struct { Incident IncidentEditPayloadV2 `json:"incident"` @@ -1848,6 +2028,54 @@ type EmbeddedCatalogEntryV1 struct { Name string `json:"name"` } +// EmbeddedCatalogEntryV2 defines model for EmbeddedCatalogEntryV2. +type EmbeddedCatalogEntryV2 struct { + // Aliases Optional aliases that can be used to reference this entry + Aliases *[]string `json:"aliases,omitempty"` + + // ExternalId An optional alternative ID for this entry, which is ensured to be unique for the type + ExternalId *string `json:"external_id,omitempty"` + + // Id ID of this catalog entry + Id string `json:"id"` + + // Name Name is the human readable name of this entry + Name string `json:"name"` +} + +// EmbeddedIncidentRoleV2 defines model for EmbeddedIncidentRoleV2. +type EmbeddedIncidentRoleV2 struct { + // CreatedAt When the role was created + CreatedAt time.Time `json:"created_at"` + + // Description Describes the purpose of the role + Description string `json:"description"` + + // Id Unique identifier for the role + Id string `json:"id"` + + // 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"` + + // Required This field is deprecated. + Required *bool `json:"required,omitempty"` + + // RoleType Type of incident role + RoleType EmbeddedIncidentRoleV2RoleType `json:"role_type"` + + // Shortform Short human readable name for Slack. Note that this will be empty for the 'reporter' role. + Shortform string `json:"shortform"` + + // UpdatedAt When the role was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// EmbeddedIncidentRoleV2RoleType Type of incident role +type EmbeddedIncidentRoleV2RoleType string + // EngineParamBindingPayloadV2 defines model for EngineParamBindingPayloadV2. type EngineParamBindingPayloadV2 struct { // ArrayValue If set, this is the array value of the step parameter @@ -1862,13 +2090,6 @@ type EngineParamBindingV2 struct { Value *EngineParamBindingValueV2 `json:"value,omitempty"` } -// EngineParamBindingV3 defines model for EngineParamBindingV3. -type EngineParamBindingV3 struct { - // ArrayValue If array_value is set, this helps render the values - ArrayValue *[]EngineParamBindingValueV3 `json:"array_value,omitempty"` - Value *EngineParamBindingValueV3 `json:"value,omitempty"` -} - // EngineParamBindingValuePayloadV2 defines model for EngineParamBindingValuePayloadV2. type EngineParamBindingValuePayloadV2 struct { // Literal If set, this is the literal value of the step parameter @@ -1890,18 +2111,6 @@ type EngineParamBindingValueV2 struct { Reference *string `json:"reference,omitempty"` } -// EngineParamBindingValueV3 defines model for EngineParamBindingValueV3. -type EngineParamBindingValueV3 struct { - // 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"` -} - // EngineReferenceV2 defines model for EngineReferenceV2. type EngineReferenceV2 struct { // Array If true, the reference can refer to 0 to many items @@ -1943,6 +2152,8 @@ type EscalationPathNodeIfElseV2 struct { // EscalationPathNodeLevelV2 defines model for EscalationPathNodeLevelV2. type EscalationPathNodeLevelV2 struct { + RoundRobinConfig *EscalationPathRoundRobinConfigV2 `json:"round_robin_config,omitempty"` + // Targets The targets for this level Targets []EscalationPathTargetV2 `json:"targets"` @@ -1959,13 +2170,32 @@ type EscalationPathNodeLevelV2 struct { // EscalationPathNodeLevelV2TimeToAckIntervalCondition If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive type EscalationPathNodeLevelV2TimeToAckIntervalCondition string +// EscalationPathNodeNotifyChannelV2 defines model for EscalationPathNodeNotifyChannelV2. +type EscalationPathNodeNotifyChannelV2 struct { + // Targets The targets for this level + Targets []EscalationPathTargetV2 `json:"targets"` + + // TimeToAckIntervalCondition If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive + TimeToAckIntervalCondition *EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition `json:"time_to_ack_interval_condition,omitempty"` + + // TimeToAckSeconds How long should we wait for this level to acknowledge before escalating? + TimeToAckSeconds *int64 `json:"time_to_ack_seconds,omitempty"` + + // TimeToAckWeekdayIntervalConfigId If the time to ack is relative to a time window, this identifies which window it is relative to + TimeToAckWeekdayIntervalConfigId *string `json:"time_to_ack_weekday_interval_config_id,omitempty"` +} + +// EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive +type EscalationPathNodeNotifyChannelV2TimeToAckIntervalCondition string + // EscalationPathNodePayloadV2 defines model for EscalationPathNodePayloadV2. type EscalationPathNodePayloadV2 struct { // Id Unique internal ID of the escalation path node - Id string `json:"id"` - IfElse *EscalationPathNodeIfElsePayloadV2 `json:"if_else,omitempty"` - Level *EscalationPathNodeLevelV2 `json:"level,omitempty"` - Repeat *EscalationPathNodeRepeatV2 `json:"repeat,omitempty"` + Id string `json:"id"` + IfElse *EscalationPathNodeIfElsePayloadV2 `json:"if_else,omitempty"` + Level *EscalationPathNodeLevelV2 `json:"level,omitempty"` + NotifyChannel *EscalationPathNodeNotifyChannelV2 `json:"notify_channel,omitempty"` + Repeat *EscalationPathNodeRepeatV2 `json:"repeat,omitempty"` // Type The type of this node: level or branch Type EscalationPathNodePayloadV2Type `json:"type"` @@ -1986,10 +2216,11 @@ type EscalationPathNodeRepeatV2 struct { // EscalationPathNodeV2 defines model for EscalationPathNodeV2. type EscalationPathNodeV2 struct { // Id Unique internal ID of the escalation path node - Id string `json:"id"` - IfElse *EscalationPathNodeIfElseV2 `json:"if_else,omitempty"` - Level *EscalationPathNodeLevelV2 `json:"level,omitempty"` - Repeat *EscalationPathNodeRepeatV2 `json:"repeat,omitempty"` + Id string `json:"id"` + IfElse *EscalationPathNodeIfElseV2 `json:"if_else,omitempty"` + Level *EscalationPathNodeLevelV2 `json:"level,omitempty"` + NotifyChannel *EscalationPathNodeNotifyChannelV2 `json:"notify_channel,omitempty"` + Repeat *EscalationPathNodeRepeatV2 `json:"repeat,omitempty"` // Type The type of this node: level or branch Type EscalationPathNodeV2Type `json:"type"` @@ -1998,19 +2229,44 @@ type EscalationPathNodeV2 struct { // EscalationPathNodeV2Type The type of this node: level or branch type EscalationPathNodeV2Type string +// EscalationPathPayloadV2 defines model for EscalationPathPayloadV2. +type EscalationPathPayloadV2 struct { + // Name The name of this escalation path, for the user's reference. + Name string `json:"name"` + + // Path The nodes that form the levels and branches of this escalation path. + Path []EscalationPathNodePayloadV2 `json:"path"` + + // WorkingHours The working hours for this escalation path. + WorkingHours *[]WeekdayIntervalConfigV2 `json:"working_hours,omitempty"` +} + +// EscalationPathRoundRobinConfigV2 defines model for EscalationPathRoundRobinConfigV2. +type EscalationPathRoundRobinConfigV2 struct { + // Enabled Whether round robin is enabled for this level + Enabled bool `json:"enabled"` + + // RotateAfterSeconds How long should we wait before rotating to the next target in a round robin, if not set will stick with a single target per level. + RotateAfterSeconds *int64 `json:"rotate_after_seconds,omitempty"` +} + // EscalationPathTargetV2 defines model for EscalationPathTargetV2. type EscalationPathTargetV2 struct { // Id Uniquely identifies an entity of this type Id string `json:"id"` - // Type Controls what type of entity this target identifies, such as EscalationPolicy or User - Type EscalationPathTargetV2Type `json:"type"` + // ScheduleMode Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule + ScheduleMode *EscalationPathTargetV2ScheduleMode `json:"schedule_mode,omitempty"` + Type EscalationPathTargetV2Type `json:"type"` // Urgency The urgency of this escalation path target Urgency EscalationPathTargetV2Urgency `json:"urgency"` } -// EscalationPathTargetV2Type Controls what type of entity this target identifies, such as EscalationPolicy or User +// EscalationPathTargetV2ScheduleMode Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule +type EscalationPathTargetV2ScheduleMode string + +// EscalationPathTargetV2Type defines model for EscalationPathTargetV2.Type. type EscalationPathTargetV2Type string // EscalationPathTargetV2Urgency The urgency of this escalation path target @@ -2042,7 +2298,7 @@ type ExpressionBranchPayloadV2 struct { type ExpressionBranchV2 struct { // ConditionGroups When one of these condition groups are satisfied, this branch will be evaluated ConditionGroups []ConditionGroupV2 `json:"condition_groups"` - Result EngineParamBindingV3 `json:"result"` + Result EngineParamBindingV2 `json:"result"` } // ExpressionBranchesOptsPayloadV2 defines model for ExpressionBranchesOptsPayloadV2. @@ -2066,7 +2322,7 @@ type ExpressionElseBranchPayloadV2 struct { // ExpressionElseBranchV2 defines model for ExpressionElseBranchV2. type ExpressionElseBranchV2 struct { - Result EngineParamBindingV3 `json:"result"` + Result EngineParamBindingV2 `json:"result"` } // ExpressionFilterOptsPayloadV2 defines model for ExpressionFilterOptsPayloadV2. @@ -2104,7 +2360,7 @@ type ExpressionOperationPayloadV2 struct { // OperationType The type of the operation OperationType ExpressionOperationPayloadV2OperationType `json:"operation_type"` - Parse *ExpressionParseOptsV2 `json:"parse,omitempty"` + Parse *ExpressionParseOptsPayloadV2 `json:"parse,omitempty"` } // ExpressionOperationPayloadV2OperationType The type of the operation @@ -2125,6 +2381,14 @@ type ExpressionOperationV2 struct { // ExpressionOperationV2OperationType The type of the operation type ExpressionOperationV2OperationType string +// ExpressionParseOptsPayloadV2 defines model for ExpressionParseOptsPayloadV2. +type ExpressionParseOptsPayloadV2 struct { + Returns ReturnsMetaV2 `json:"returns"` + + // Source Source expression that is evaluated to a result + Source string `json:"source"` +} + // ExpressionParseOptsV2 defines model for ExpressionParseOptsV2. type ExpressionParseOptsV2 struct { Returns ReturnsMetaV2 `json:"returns"` @@ -2229,7 +2493,7 @@ type FollowUpPriorityV2 struct { // FollowUpV2 defines model for FollowUpV2. type FollowUpV2 struct { - Assignee *UserV1 `json:"assignee,omitempty"` + Assignee *UserV2 `json:"assignee,omitempty"` // CompletedAt When the follow-up was completed CompletedAt *time.Time `json:"completed_at,omitempty"` @@ -2261,6 +2525,12 @@ type FollowUpV2 struct { // FollowUpV2Status Status of the follow-up type FollowUpV2Status string +// GroupingKeyV2 defines model for GroupingKeyV2. +type GroupingKeyV2 struct { + // Id Unique identifier of the alert attribute the user wishes to group on + Id string `json:"id"` +} + // IdentityResponseBody defines model for IdentityResponseBody. type IdentityResponseBody struct { Identity IdentityV1 `json:"identity"` @@ -2278,7 +2548,7 @@ type IdentityV1 struct { Roles []IdentityV1Roles `json:"roles"` } -// IdentityV1Roles defines model for IdentityV1.Roles. +// IdentityV1Roles API key roles type IdentityV1Roles string // IncidentAttachmentV1 defines model for IncidentAttachmentV1. @@ -2291,6 +2561,109 @@ type IncidentAttachmentV1 struct { Resource ExternalResourceV1 `json:"resource"` } +// IncidentCreatePayloadV1 defines model for IncidentCreatePayloadV1. +type IncidentCreatePayloadV1 struct { + // CustomFieldEntries Set the incident's custom fields to these values + CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` + + // IdempotencyKey Unique string used to de-duplicate incident create requests + IdempotencyKey string `json:"idempotency_key"` + + // IncidentRoleAssignments Assign incident roles to these people + IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV1 `json:"incident_role_assignments,omitempty"` + + // IncidentTypeId Incident type to create this incident as + IncidentTypeId *string `json:"incident_type_id,omitempty"` + + // Mode Whether the incident is real or test + Mode *IncidentCreatePayloadV1Mode `json:"mode,omitempty"` + + // Name Explanation of the incident + Name *string `json:"name,omitempty"` + + // SeverityId Severity to create incident as + SeverityId *string `json:"severity_id,omitempty"` + + // SlackTeamId ID of the Slack team / workspace. This is only required if you are using a Slack Enterprise Grid with multiple teams. + SlackTeamId *string `json:"slack_team_id,omitempty"` + + // SourceMessageChannelId Channel ID of the source message, if this incident was created from one + SourceMessageChannelId *string `json:"source_message_channel_id,omitempty"` + + // SourceMessageTimestamp Timestamp of the source message, if this incident was created from one + SourceMessageTimestamp *string `json:"source_message_timestamp,omitempty"` + + // Status Current status of the incident + Status *IncidentCreatePayloadV1Status `json:"status,omitempty"` + + // Summary Detailed description of the incident + Summary *string `json:"summary,omitempty"` + + // Visibility 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). + Visibility IncidentCreatePayloadV1Visibility `json:"visibility"` +} + +// IncidentCreatePayloadV1Mode Whether the incident is real or test +type IncidentCreatePayloadV1Mode string + +// IncidentCreatePayloadV1Status Current status of the incident +type IncidentCreatePayloadV1Status string + +// IncidentCreatePayloadV1Visibility 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). +type IncidentCreatePayloadV1Visibility string + +// IncidentCreatePayloadV2 defines model for IncidentCreatePayloadV2. +type IncidentCreatePayloadV2 struct { + // CustomFieldEntries Set the incident's custom fields to these values + CustomFieldEntries *[]CustomFieldEntryPayloadV2 `json:"custom_field_entries,omitempty"` + + // Id Unique identifier for the incident + Id *string `json:"id,omitempty"` + + // IdempotencyKey Unique string used to de-duplicate incident create requests + IdempotencyKey string `json:"idempotency_key"` + + // IncidentRoleAssignments Assign incident roles to these people + IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV2 `json:"incident_role_assignments,omitempty"` + + // IncidentStatusId Incident status to assign to the incident + IncidentStatusId *string `json:"incident_status_id,omitempty"` + + // IncidentTimestampValues Assign the incident's timestamps to these values + IncidentTimestampValues *[]IncidentTimestampValuePayloadV2 `json:"incident_timestamp_values,omitempty"` + + // IncidentTypeId Incident type to create this incident as + IncidentTypeId *string `json:"incident_type_id,omitempty"` + + // Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident + Mode *IncidentCreatePayloadV2Mode `json:"mode,omitempty"` + + // Name Explanation of the incident + Name *string `json:"name,omitempty"` + RetrospectiveIncidentOptions *RetrospectiveIncidentOptionsV2 `json:"retrospective_incident_options,omitempty"` + + // SeverityId Severity to create incident as + SeverityId *string `json:"severity_id,omitempty"` + + // SlackChannelNameOverride Name of the Slack channel to create for this incident + SlackChannelNameOverride *string `json:"slack_channel_name_override,omitempty"` + + // SlackTeamId Slack Team to create the incident in + SlackTeamId *string `json:"slack_team_id,omitempty"` + + // Summary Detailed description of the incident + Summary *string `json:"summary,omitempty"` + + // Visibility 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). + Visibility IncidentCreatePayloadV2Visibility `json:"visibility"` +} + +// IncidentCreatePayloadV2Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident +type IncidentCreatePayloadV2Mode string + +// IncidentCreatePayloadV2Visibility 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). +type IncidentCreatePayloadV2Visibility string + // IncidentDurationMetricV2 defines model for IncidentDurationMetricV2. type IncidentDurationMetricV2 struct { // Id Unique ID of this incident duration metric @@ -2314,7 +2687,7 @@ type IncidentEditPayloadV2 struct { CallUrl *string `json:"call_url,omitempty"` // CustomFieldEntries Set the incident's custom fields to these values - CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` + CustomFieldEntries *[]CustomFieldEntryPayloadV2 `json:"custom_field_entries,omitempty"` // IncidentRoleAssignments Assign incident roles to these people IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV2 `json:"incident_role_assignments,omitempty"` @@ -2331,6 +2704,9 @@ type IncidentEditPayloadV2 struct { // SeverityId Severity to change incident to SeverityId *string `json:"severity_id,omitempty"` + // SlackChannelNameOverride Override the name of the incident Slack channel + SlackChannelNameOverride *string `json:"slack_channel_name_override,omitempty"` + // Summary Detailed description of the incident Summary *string `json:"summary,omitempty"` } @@ -2348,7 +2724,7 @@ type IncidentMembership struct { // UpdatedAt When the membership was last updated UpdatedAt time.Time `json:"updated_at"` - User UserV1 `json:"user"` + User UserV2 `json:"user"` } // IncidentRoleAssignmentPayloadV1 defines model for IncidentRoleAssignmentPayloadV1. @@ -2361,7 +2737,7 @@ type IncidentRoleAssignmentPayloadV1 struct { // IncidentRoleAssignmentPayloadV2 defines model for IncidentRoleAssignmentPayloadV2. type IncidentRoleAssignmentPayloadV2 struct { - Assignee *UserReferencePayloadV1 `json:"assignee,omitempty"` + Assignee *UserReferencePayloadV2 `json:"assignee,omitempty"` // IncidentRoleId Unique ID of an incident role IncidentRoleId string `json:"incident_role_id"` @@ -2373,6 +2749,12 @@ type IncidentRoleAssignmentV1 struct { Role IncidentRoleV1 `json:"role"` } +// IncidentRoleAssignmentV2 defines model for IncidentRoleAssignmentV2. +type IncidentRoleAssignmentV2 struct { + Assignee *UserV2 `json:"assignee,omitempty"` + Role EmbeddedIncidentRoleV2 `json:"role"` +} + // IncidentRoleV1 defines model for IncidentRoleV1. type IncidentRoleV1 struct { // CreatedAt When the role was created @@ -2459,6 +2841,29 @@ type IncidentStatusV1 struct { // IncidentStatusV1Category 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 type IncidentStatusV1Category string +// IncidentStatusV2 defines model for IncidentStatusV2. +type IncidentStatusV2 struct { + // Category 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 + Category IncidentStatusV2Category `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // Description Rich text description of the incident status + Description string `json:"description"` + + // Id Unique ID of this incident status + Id string `json:"id"` + + // Name Unique name of this status + Name string `json:"name"` + + // Rank Order of this incident status + Rank int64 `json:"rank"` + UpdatedAt time.Time `json:"updated_at"` +} + +// IncidentStatusV2Category 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 +type IncidentStatusV2Category string + // IncidentTimestampV1 defines model for IncidentTimestampV1. type IncidentTimestampV1 struct { // LastOccurredAt When this last occurred, if it did @@ -2501,10 +2906,40 @@ type IncidentTimestampWithValueV2 struct { Value *IncidentTimestampValueV2 `json:"value,omitempty"` } -// IncidentTypeV1 defines model for IncidentTypeV1. -type IncidentTypeV1 struct { +// IncidentTypeV1 defines model for IncidentTypeV1. +type IncidentTypeV1 struct { + // CreateInTriage Whether incidents of this must always, or can optionally, be created in triage + CreateInTriage IncidentTypeV1CreateInTriage `json:"create_in_triage"` + + // CreatedAt When this resource was created + CreatedAt time.Time `json:"created_at"` + + // Description What is this incident type for? + Description string `json:"description"` + + // Id Unique identifier for this Incident Type + Id string `json:"id"` + + // IsDefault The default Incident Type is used when no other type is explicitly specified + IsDefault bool `json:"is_default"` + + // Name The name of this Incident Type + Name string `json:"name"` + + // PrivateIncidentsOnly Should all incidents created with this Incident Type be private? + PrivateIncidentsOnly bool `json:"private_incidents_only"` + + // UpdatedAt When this resource was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IncidentTypeV1CreateInTriage Whether incidents of this must always, or can optionally, be created in triage +type IncidentTypeV1CreateInTriage string + +// IncidentTypeV2 defines model for IncidentTypeV2. +type IncidentTypeV2 struct { // CreateInTriage Whether incidents of this must always, or can optionally, be created in triage - CreateInTriage IncidentTypeV1CreateInTriage `json:"create_in_triage"` + CreateInTriage IncidentTypeV2CreateInTriage `json:"create_in_triage"` // CreatedAt When this resource was created CreatedAt time.Time `json:"created_at"` @@ -2528,8 +2963,8 @@ type IncidentTypeV1 struct { UpdatedAt time.Time `json:"updated_at"` } -// IncidentTypeV1CreateInTriage Whether incidents of this must always, or can optionally, be created in triage -type IncidentTypeV1CreateInTriage string +// IncidentTypeV2CreateInTriage Whether incidents of this must always, or can optionally, be created in triage +type IncidentTypeV2CreateInTriage string // IncidentUpdateV2 defines model for IncidentUpdateV2. type IncidentUpdateV2 struct { @@ -2547,7 +2982,7 @@ type IncidentUpdateV2 struct { // Message Message that explains the context behind the update Message *string `json:"message,omitempty"` - NewIncidentStatus IncidentStatusV1 `json:"new_incident_status"` + NewIncidentStatus IncidentStatusV2 `json:"new_incident_status"` NewSeverity *SeverityV2 `json:"new_severity,omitempty"` Updater ActorV2 `json:"updater"` } @@ -2559,7 +2994,7 @@ type IncidentV1 struct { // CreatedAt When the incident was created CreatedAt time.Time `json:"created_at"` - Creator ActorV2 `json:"creator"` + Creator ActorV1 `json:"creator"` // CustomFieldEntries Custom field entries for this incident CustomFieldEntries []CustomFieldEntryV1 `json:"custom_field_entries"` @@ -2585,7 +3020,7 @@ type IncidentV1 struct { // Reference Reference to this incident, as displayed across the product Reference string `json:"reference"` - Severity *SeverityV2 `json:"severity,omitempty"` + Severity *SeverityV1 `json:"severity,omitempty"` // 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"` @@ -2631,22 +3066,25 @@ type IncidentV2 struct { Creator ActorV2 `json:"creator"` // CustomFieldEntries Custom field entries for this incident - CustomFieldEntries []CustomFieldEntryV1 `json:"custom_field_entries"` + CustomFieldEntries []CustomFieldEntryV2 `json:"custom_field_entries"` // DurationMetrics Incident duration metrics and their measurements for this incident DurationMetrics *[]IncidentDurationMetricWithValueV2 `json:"duration_metrics,omitempty"` ExternalIssueReference *ExternalIssueReferenceV2 `json:"external_issue_reference,omitempty"` + // HasDebrief If this incident has a debrief attached + HasDebrief *bool `json:"has_debrief,omitempty"` + // Id Unique identifier for the incident Id string `json:"id"` // IncidentRoleAssignments A list of who is assigned to each role for this incident - IncidentRoleAssignments []IncidentRoleAssignmentV1 `json:"incident_role_assignments"` - IncidentStatus IncidentStatusV1 `json:"incident_status"` + IncidentRoleAssignments []IncidentRoleAssignmentV2 `json:"incident_role_assignments"` + IncidentStatus IncidentStatusV2 `json:"incident_status"` // IncidentTimestampValues Incident lifecycle events and when they occurred IncidentTimestampValues *[]IncidentTimestampWithValueV2 `json:"incident_timestamp_values,omitempty"` - IncidentType *IncidentTypeV1 `json:"incident_type,omitempty"` + IncidentType *IncidentTypeV2 `json:"incident_type,omitempty"` // Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident Mode IncidentV2Mode `json:"mode"` @@ -2759,7 +3197,7 @@ type ListResponseBody16 struct { // ListResponseBody17 defines model for ListResponseBody17. type ListResponseBody17 struct { - Severities []SeverityV2 `json:"severities"` + Severities []SeverityV1 `json:"severities"` } // ListResponseBody18 defines model for ListResponseBody18. @@ -2825,30 +3263,6 @@ type ListWorkflowsResponseBody struct { Workflows []WorkflowSlim `json:"workflows"` } -// ManagedResourceV2 defines model for ManagedResourceV2. -type ManagedResourceV2 struct { - // Annotations Annotations that track metadata about this resource - Annotations map[string]string `json:"annotations"` - - // ManagedBy How is this resource managed - ManagedBy ManagedResourceV2ManagedBy `json:"managed_by"` - - // ResourceId The ID of the related resource - ResourceId string `json:"resource_id"` - - // ResourceType The type of the related resource - ResourceType ManagedResourceV2ResourceType `json:"resource_type"` - - // SourceUrl The url of the external repository where this resource is managed (if there is one) - SourceUrl *string `json:"source_url,omitempty"` -} - -// ManagedResourceV2ManagedBy How is this resource managed -type ManagedResourceV2ManagedBy string - -// ManagedResourceV2ResourceType The type of the related resource -type ManagedResourceV2ResourceType string - // ManagementMetaV2 defines model for ManagementMetaV2. type ManagementMetaV2 struct { // Annotations Annotations that track metadata about this resource @@ -2937,8 +3351,9 @@ type ScheduleConfigV2 struct { // 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"` + Annotations *map[string]string `json:"annotations,omitempty"` + Config *ScheduleConfigCreatePayloadV2 `json:"config,omitempty"` + HolidaysPublicConfig *ScheduleHolidaysPublicConfigPayloadV2 `json:"holidays_public_config,omitempty"` // Name Name of the schedule Name *string `json:"name,omitempty"` @@ -2970,7 +3385,19 @@ type ScheduleEntryV2 struct { // 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"` + User *UserV2 `json:"user,omitempty"` +} + +// ScheduleHolidaysPublicConfigPayloadV2 defines model for ScheduleHolidaysPublicConfigPayloadV2. +type ScheduleHolidaysPublicConfigPayloadV2 struct { + // CountryCodes ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for + CountryCodes []string `json:"country_codes"` +} + +// ScheduleHolidaysPublicConfigV2 defines model for ScheduleHolidaysPublicConfigV2. +type ScheduleHolidaysPublicConfigV2 struct { + // CountryCodes ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for + CountryCodes []string `json:"country_codes"` } // ScheduleLayerCreatePayloadV2 defines model for ScheduleLayerCreatePayloadV2. @@ -2982,6 +3409,15 @@ type ScheduleLayerCreatePayloadV2 struct { Name string `json:"name"` } +// ScheduleLayerUpdatePayloadV2 defines model for ScheduleLayerUpdatePayloadV2. +type ScheduleLayerUpdatePayloadV2 struct { + // Id Unique identifier of the layer + Id *string `json:"id,omitempty"` + + // Name Name of the layer + Name *string `json:"name,omitempty"` +} + // ScheduleLayerV2 defines model for ScheduleLayerV2. type ScheduleLayerV2 struct { // Id Unique identifier of the layer @@ -2991,6 +3427,50 @@ type ScheduleLayerV2 struct { Name *string `json:"name,omitempty"` } +// ScheduleOverrideCreatePayloadV2 defines model for ScheduleOverrideCreatePayloadV2. +type ScheduleOverrideCreatePayloadV2 struct { + // EndAt End time of the override + EndAt time.Time `json:"end_at"` + + // LayerId The layer this override applies to + LayerId string `json:"layer_id"` + + // RotationId The rotation this override applies to + RotationId string `json:"rotation_id"` + + // ScheduleId The schedule this override applies to + ScheduleId string `json:"schedule_id"` + + // StartAt Start time of the override + StartAt time.Time `json:"start_at"` + User UserReferencePayloadV2 `json:"user"` +} + +// ScheduleOverrideV2 defines model for ScheduleOverrideV2. +type ScheduleOverrideV2 struct { + CreatedAt time.Time `json:"created_at"` + + // EndAt End of the override + EndAt time.Time `json:"end_at"` + + // Id Unique internal ID of the schedule override + Id string `json:"id"` + + // LayerId The layer on the rotation on the schedule that this override applies to + LayerId string `json:"layer_id"` + + // RotationId The rotation on the schedule that this override applies to + RotationId string `json:"rotation_id"` + + // ScheduleId The schedule that this override applies to + ScheduleId string `json:"schedule_id"` + + // StartAt Start of the override + StartAt time.Time `json:"start_at"` + UpdatedAt time.Time `json:"updated_at"` + User UserV2 `json:"user"` +} + // ScheduleRotationCreatePayloadV2 defines model for ScheduleRotationCreatePayloadV2. type ScheduleRotationCreatePayloadV2 struct { EffectiveFrom *time.Time `json:"effective_from,omitempty"` @@ -3002,18 +3482,20 @@ type ScheduleRotationCreatePayloadV2 struct { Layers *[]ScheduleLayerCreatePayloadV2 `json:"layers,omitempty"` // Name Name of the rotation - Name string `json:"name"` - Users *[]UserReferencePayloadV1 `json:"users,omitempty"` - WorkingInterval *[]WeekdayIntervalV2 `json:"working_interval,omitempty"` + Name string `json:"name"` + Users *[]UserReferencePayloadV2 `json:"users,omitempty"` + WorkingInterval *[]ScheduleRotationWorkingIntervalCreatePayloadV2 `json:"working_interval,omitempty"` } // ScheduleRotationHandoverV2 defines model for ScheduleRotationHandoverV2. type ScheduleRotationHandoverV2 struct { - Interval *int64 `json:"interval,omitempty"` + Interval *int64 `json:"interval,omitempty"` + + // IntervalType How often a handover occurs IntervalType *ScheduleRotationHandoverV2IntervalType `json:"interval_type,omitempty"` } -// ScheduleRotationHandoverV2IntervalType defines model for ScheduleRotationHandoverV2.IntervalType. +// ScheduleRotationHandoverV2IntervalType How often a handover occurs type ScheduleRotationHandoverV2IntervalType string // ScheduleRotationUpdatePayloadV2 defines model for ScheduleRotationUpdatePayloadV2. @@ -3023,12 +3505,12 @@ type ScheduleRotationUpdatePayloadV2 struct { Handovers *[]ScheduleRotationHandoverV2 `json:"handovers,omitempty"` // Id Unique identifier of the rotation - Id *string `json:"id,omitempty"` - Layers *[]ScheduleLayerV2 `json:"layers,omitempty"` + Id *string `json:"id,omitempty"` + Layers *[]ScheduleLayerUpdatePayloadV2 `json:"layers,omitempty"` // Name Name of the rotation Name *string `json:"name,omitempty"` - Users *[]UserReferencePayloadV1 `json:"users,omitempty"` + Users *[]UserReferencePayloadV2 `json:"users,omitempty"` WorkingInterval *[]ScheduleRotationWorkingIntervalUpdatePayloadV2 `json:"working_interval,omitempty"` } @@ -3050,11 +3532,26 @@ type ScheduleRotationV2 struct { Layers []ScheduleLayerV2 `json:"layers"` // Name Human readable name synced from external provider - Name string `json:"name"` - Users *[]UserV1 `json:"users,omitempty"` - WorkingInterval *[]WeekdayIntervalV2 `json:"working_interval,omitempty"` + Name string `json:"name"` + Users *[]UserV2 `json:"users,omitempty"` + WorkingInterval *[]ScheduleRotationWorkingIntervalV2 `json:"working_interval,omitempty"` +} + +// ScheduleRotationWorkingIntervalCreatePayloadV2 defines model for ScheduleRotationWorkingIntervalCreatePayloadV2. +type ScheduleRotationWorkingIntervalCreatePayloadV2 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 Weekdays for use with a schedule + Weekday ScheduleRotationWorkingIntervalCreatePayloadV2Weekday `json:"weekday"` } +// ScheduleRotationWorkingIntervalCreatePayloadV2Weekday Weekdays for use with a schedule +type ScheduleRotationWorkingIntervalCreatePayloadV2Weekday string + // ScheduleRotationWorkingIntervalUpdatePayloadV2 defines model for ScheduleRotationWorkingIntervalUpdatePayloadV2. type ScheduleRotationWorkingIntervalUpdatePayloadV2 struct { // EndTime End time of the interval, in 24hr format @@ -3063,18 +3560,34 @@ type ScheduleRotationWorkingIntervalUpdatePayloadV2 struct { // StartTime Start time of the interval, in 24hr format StartTime *string `json:"start_time,omitempty"` - // Weekday Weekday this interval applies to + // Weekday Weekdays for use with a schedule Weekday *ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday `json:"weekday,omitempty"` } -// ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday Weekday this interval applies to +// ScheduleRotationWorkingIntervalUpdatePayloadV2Weekday Weekdays for use with a schedule 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 Weekdays for use with a schedule + Weekday ScheduleRotationWorkingIntervalV2Weekday `json:"weekday"` +} + +// ScheduleRotationWorkingIntervalV2Weekday Weekdays for use with a schedule +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"` + Annotations *map[string]string `json:"annotations,omitempty"` + Config *ScheduleConfigUpdatePayloadV2 `json:"config,omitempty"` + HolidaysPublicConfig *ScheduleHolidaysPublicConfigPayloadV2 `json:"holidays_public_config,omitempty"` // Name Name of the schedule Name *string `json:"name,omitempty"` @@ -3091,7 +3604,8 @@ type ScheduleV2 struct { 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"` + CurrentShifts *[]ScheduleEntryV2 `json:"current_shifts,omitempty"` + HolidaysPublicConfig *ScheduleHolidaysPublicConfigV2 `json:"holidays_public_config,omitempty"` // Id Unique internal ID of the schedule Id string `json:"id"` @@ -3104,6 +3618,27 @@ type ScheduleV2 struct { UpdatedAt time.Time `json:"updated_at"` } +// SeverityV1 defines model for SeverityV1. +type SeverityV1 struct { + // CreatedAt When the action was created + CreatedAt time.Time `json:"created_at"` + + // Description Description of the severity + Description string `json:"description"` + + // Id Unique identifier of the severity + Id string `json:"id"` + + // Name Human readable name of the severity + Name string `json:"name"` + + // Rank Rank to help sort severities (lower numbers are less severe) + Rank int64 `json:"rank"` + + // UpdatedAt When the action was last updated + UpdatedAt time.Time `json:"updated_at"` +} + // SeverityV2 defines model for SeverityV2. type SeverityV2 struct { // CreatedAt When the action was created @@ -3163,7 +3698,7 @@ type ShowResponseBody14 struct { // ShowResponseBody15 defines model for ShowResponseBody15. type ShowResponseBody15 struct { - Severity SeverityV2 `json:"severity"` + Severity SeverityV1 `json:"severity"` } // ShowResponseBody16 defines model for ShowResponseBody16. @@ -3232,7 +3767,7 @@ type StepConfig struct { Name string `json:"name"` // ParamBindings Bindings for the step parameters - ParamBindings []EngineParamBindingV3 `json:"param_bindings"` + ParamBindings []EngineParamBindingV2 `json:"param_bindings"` } // StepConfigPayload defines model for StepConfigPayload. @@ -3259,6 +3794,33 @@ type StepConfigSlim struct { Name string `json:"name"` } +// TextMark defines model for TextMark. +type TextMark struct { + // Attrs type-specific mark attributes + Attrs *map[string]interface{} `json:"attrs,omitempty"` + + // Type the type of the node, eg 'text' + Type string `json:"type"` +} + +// TextNode defines model for TextNode. +type TextNode struct { + // Attrs type-specific node attributes + Attrs *map[string]interface{} `json:"attrs,omitempty"` + + // Content children of this node + Content *[]TextNode `json:"content,omitempty"` + + // Marks marks that apply to this node, eg 'bold' + Marks *[]TextMark `json:"marks,omitempty"` + + // Text if this node doesn't have children, it has text content + Text *string `json:"text,omitempty"` + + // Type the type of the node + Type string `json:"type"` +} + // TriggerSlim defines model for TriggerSlim. type TriggerSlim struct { // Label Human readable identifier for this trigger @@ -3288,6 +3850,46 @@ type UpdateEntryRequestBody struct { // UpdateRequestBody defines model for UpdateRequestBody. type UpdateRequestBody struct { + // AlertSources Which alert sources should this alert route match? + AlertSources []AlertRouteAlertSourcePayloadV2 `json:"alert_sources"` + + // AutoDeclineEnabled Should triage incidents be declined when alerts are resolved? + AutoDeclineEnabled bool `json:"auto_decline_enabled"` + + // ConditionGroups What condition groups must be true for this alert route to fire? + ConditionGroups []ConditionGroupPayloadV2 `json:"condition_groups"` + + // DeferTimeSeconds How long should the escalation defer time be? + DeferTimeSeconds int64 `json:"defer_time_seconds"` + + // Enabled Whether this alert route is enabled or not + Enabled bool `json:"enabled"` + + // EscalationBindings Which escalation paths should this alert route escalate to? + EscalationBindings []AlertRouteEscalationBindingPayloadV2 `json:"escalation_bindings"` + + // Expressions The expressions used in this template + Expressions *[]ExpressionPayloadV2 `json:"expressions,omitempty"` + + // GroupingKeys Which attributes should this alert route use to group alerts? + GroupingKeys []GroupingKeyV2 `json:"grouping_keys"` + + // GroupingWindowSeconds How large should the grouping window be? + GroupingWindowSeconds int64 `json:"grouping_window_seconds"` + + // IncidentConditionGroups What condition groups must be true for this alert route to create an incident? + IncidentConditionGroups []ConditionGroupPayloadV2 `json:"incident_condition_groups"` + + // IncidentEnabled Whether this alert route will create incidents or not + IncidentEnabled bool `json:"incident_enabled"` + + // Name The name of this alert route config, for the user's reference + Name string `json:"name"` + Template *AlertRouteIncidentTemplatePayloadV2 `json:"template,omitempty"` +} + +// UpdateRequestBody2 defines model for UpdateRequestBody2. +type UpdateRequestBody2 struct { // SortKey Sort key used to order the custom field options correctly SortKey int64 `json:"sort_key"` @@ -3295,8 +3897,8 @@ type UpdateRequestBody struct { Value string `json:"value"` } -// UpdateRequestBody2 defines model for UpdateRequestBody2. -type UpdateRequestBody2 struct { +// UpdateRequestBody3 defines model for UpdateRequestBody3. +type UpdateRequestBody3 struct { // Description Description of the custom field Description string `json:"description"` @@ -3304,10 +3906,10 @@ type UpdateRequestBody2 struct { Name string `json:"name"` // Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. - Required *UpdateRequestBody2Required `json:"required,omitempty"` + Required *UpdateRequestBody3Required `json:"required,omitempty"` // RequiredV2 When this custom field must be set during the incident lifecycle. - RequiredV2 *UpdateRequestBody2RequiredV2 `json:"required_v2,omitempty"` + RequiredV2 *UpdateRequestBody3RequiredV2 `json:"required_v2,omitempty"` // ShowBeforeClosure 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. ShowBeforeClosure bool `json:"show_before_closure"` @@ -3322,14 +3924,14 @@ type UpdateRequestBody2 struct { ShowInAnnouncementPost *bool `json:"show_in_announcement_post,omitempty"` } -// UpdateRequestBody2Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. -type UpdateRequestBody2Required string +// UpdateRequestBody3Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. +type UpdateRequestBody3Required string -// UpdateRequestBody2RequiredV2 When this custom field must be set during the incident lifecycle. -type UpdateRequestBody2RequiredV2 string +// UpdateRequestBody3RequiredV2 When this custom field must be set during the incident lifecycle. +type UpdateRequestBody3RequiredV2 string -// UpdateRequestBody3 defines model for UpdateRequestBody3. -type UpdateRequestBody3 struct { +// UpdateRequestBody4 defines model for UpdateRequestBody4. +type UpdateRequestBody4 struct { // Description Description of the custom field Description string `json:"description"` @@ -3337,8 +3939,8 @@ type UpdateRequestBody3 struct { Name string `json:"name"` } -// UpdateRequestBody4 defines model for UpdateRequestBody4. -type UpdateRequestBody4 struct { +// UpdateRequestBody5 defines model for UpdateRequestBody5. +type UpdateRequestBody5 struct { // Description Describes the purpose of the role Description string `json:"description"` @@ -3355,8 +3957,8 @@ type UpdateRequestBody4 struct { Shortform string `json:"shortform"` } -// UpdateRequestBody5 defines model for UpdateRequestBody5. -type UpdateRequestBody5 struct { +// UpdateRequestBody6 defines model for UpdateRequestBody6. +type UpdateRequestBody6 struct { // Description Describes the purpose of the role Description string `json:"description"` @@ -3370,8 +3972,8 @@ type UpdateRequestBody5 struct { Shortform string `json:"shortform"` } -// UpdateRequestBody6 defines model for UpdateRequestBody6. -type UpdateRequestBody6 struct { +// UpdateRequestBody7 defines model for UpdateRequestBody7. +type UpdateRequestBody7 struct { // Description Rich text description of the incident status Description string `json:"description"` @@ -3379,8 +3981,8 @@ type UpdateRequestBody6 struct { Name string `json:"name"` } -// UpdateRequestBody7 defines model for UpdateRequestBody7. -type UpdateRequestBody7 struct { +// UpdateRequestBody8 defines model for UpdateRequestBody8. +type UpdateRequestBody8 struct { Schedule ScheduleUpdatePayloadV2 `json:"schedule"` } @@ -3426,8 +4028,8 @@ type UpdateTypeSchemaRequestBody struct { Version int64 `json:"version"` } -// UpdateWorkflowRequestBody defines model for UpdateWorkflowRequestBody. -type UpdateWorkflowRequestBody struct { +// UpdateWorkflowPayload defines model for UpdateWorkflowPayload. +type UpdateWorkflowPayload struct { // Annotations Annotations that track metadata about this resource Annotations *map[string]string `json:"annotations,omitempty"` @@ -3454,26 +4056,29 @@ type UpdateWorkflowRequestBody struct { 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"` + RunsOnIncidentModes []UpdateWorkflowPayloadRunsOnIncidentModes `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"` + RunsOnIncidents UpdateWorkflowPayloadRunsOnIncidents `json:"runs_on_incidents"` + + // Shortform Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo` + Shortform *string `json:"shortform,omitempty"` // State The state of the workflow (e.g. is it draft, or disabled) - State *UpdateWorkflowRequestBodyState `json:"state,omitempty"` + State *UpdateWorkflowPayloadState `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 +// UpdateWorkflowPayloadRunsOnIncidentModes defines model for UpdateWorkflowPayload.RunsOnIncidentModes. +type UpdateWorkflowPayloadRunsOnIncidentModes string -// UpdateWorkflowRequestBodyRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) -type UpdateWorkflowRequestBodyRunsOnIncidents string +// UpdateWorkflowPayloadRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) +type UpdateWorkflowPayloadRunsOnIncidents string -// UpdateWorkflowRequestBodyState The state of the workflow (e.g. is it draft, or disabled) -type UpdateWorkflowRequestBodyState string +// UpdateWorkflowPayloadState The state of the workflow (e.g. is it draft, or disabled) +type UpdateWorkflowPayloadState string // UserReferencePayloadV1 defines model for UserReferencePayloadV1. type UserReferencePayloadV1 struct { @@ -3487,6 +4092,18 @@ type UserReferencePayloadV1 struct { SlackUserId *string `json:"slack_user_id,omitempty"` } +// UserReferencePayloadV2 defines model for UserReferencePayloadV2. +type UserReferencePayloadV2 struct { + // Email The user's email address, matching the email on their Slack account + Email *string `json:"email,omitempty"` + + // Id The incident.io ID of a user + Id *string `json:"id,omitempty"` + + // SlackUserId The ID of the user's Slack account. + SlackUserId *string `json:"slack_user_id,omitempty"` +} + // UserV1 defines model for UserV1. type UserV1 struct { // Email Email address of the user. @@ -3508,6 +4125,27 @@ type UserV1 struct { // UserV1Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. type UserV1Role string +// UserV2 defines model for UserV2. +type UserV2 struct { + // Email Email address of the user. + Email *string `json:"email,omitempty"` + + // Id Unique identifier of the user + Id string `json:"id"` + + // Name Name of the user + Name string `json:"name"` + + // Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. + Role UserV2Role `json:"role"` + + // SlackUserId Slack ID of the user + SlackUserId *string `json:"slack_user_id,omitempty"` +} + +// UserV2Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. +type UserV2Role string + // UserWithRolesV2 defines model for UserWithRolesV2. type UserWithRolesV2 struct { BaseRole RBACRoleV2 `json:"base_role"` @@ -3552,9 +4190,7 @@ type WeekdayIntervalV2 struct { // StartTime Start time of the interval, in 24hr format StartTime string `json:"start_time"` - - // Weekday Weekday this interval applies to - Weekday string `json:"weekday"` + Weekday string `json:"weekday"` } // Workflow defines model for Workflow. @@ -3593,6 +4229,9 @@ type Workflow struct { // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) RunsOnIncidents WorkflowRunsOnIncidents `json:"runs_on_incidents"` + // Shortform Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo` + Shortform *string `json:"shortform,omitempty"` + // State The state of the workflow (e.g. is it draft, or disabled) State WorkflowState `json:"state"` @@ -3604,7 +4243,7 @@ type Workflow struct { Version int64 `json:"version"` } -// WorkflowRunsOnIncidentModes defines model for Workflow.RunsOnIncidentModes. +// WorkflowRunsOnIncidentModes Incident mode that workflows can run on type WorkflowRunsOnIncidentModes string // WorkflowRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) @@ -3658,6 +4297,9 @@ type WorkflowSlim struct { // RunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) RunsOnIncidents WorkflowSlimRunsOnIncidents `json:"runs_on_incidents"` + // Shortform Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo` + Shortform *string `json:"shortform,omitempty"` + // State The state of the workflow (e.g. is it draft, or disabled) State WorkflowSlimState `json:"state"` @@ -3669,7 +4311,7 @@ type WorkflowSlim struct { Version int64 `json:"version"` } -// WorkflowSlimRunsOnIncidentModes defines model for WorkflowSlim.RunsOnIncidentModes. +// WorkflowSlimRunsOnIncidentModes Incident mode that workflows can run on type WorkflowSlimRunsOnIncidentModes string // WorkflowSlimRunsOnIncidents Which incidents should the workflow be applied to? (newly_created or newly_created_and_active) @@ -3760,6 +4402,12 @@ type CatalogV2ListEntriesParams struct { // After An record's ID. This endpoint will return a list of records after this ID in relation to the API response order. After *string `form:"after,omitempty" json:"after,omitempty"` + + // IncludeReferences Whether to include attribute references to other catalog entries. Defaults to true, if not set. + IncludeReferences *bool `form:"include_references,omitempty" json:"include_references,omitempty"` + + // IncludeDerivedAttributes Whether to include the values of derived attributes. Defaults to false, if not set. + IncludeDerivedAttributes *bool `form:"include_derived_attributes,omitempty" json:"include_derived_attributes,omitempty"` } // FollowUpsV2ListParams defines parameters for FollowUpsV2List. @@ -3803,6 +4451,9 @@ type IncidentsV2ListParams struct { // 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"` + // UpdatedAt Filter on incident updated at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'. + UpdatedAt *map[string][]string `form:"updated_at,omitempty" json:"updated_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"` @@ -3859,13 +4510,13 @@ type UsersV2ListParams struct { type CustomFieldOptionsV1CreateJSONRequestBody = CreateRequestBody // CustomFieldOptionsV1UpdateJSONRequestBody defines body for CustomFieldOptionsV1Update for application/json ContentType. -type CustomFieldOptionsV1UpdateJSONRequestBody = UpdateRequestBody +type CustomFieldOptionsV1UpdateJSONRequestBody = UpdateRequestBody2 // CustomFieldsV1CreateJSONRequestBody defines body for CustomFieldsV1Create for application/json ContentType. type CustomFieldsV1CreateJSONRequestBody = CreateRequestBody2 // CustomFieldsV1UpdateJSONRequestBody defines body for CustomFieldsV1Update for application/json ContentType. -type CustomFieldsV1UpdateJSONRequestBody = UpdateRequestBody2 +type CustomFieldsV1UpdateJSONRequestBody = UpdateRequestBody3 // IncidentAttachmentsV1CreateJSONRequestBody defines body for IncidentAttachmentsV1Create for application/json ContentType. type IncidentAttachmentsV1CreateJSONRequestBody = CreateRequestBody4 @@ -3880,26 +4531,32 @@ type IncidentMembershipsV1RevokeJSONRequestBody = CreateRequestBody5 type IncidentRolesV1CreateJSONRequestBody = CreateRequestBody6 // IncidentRolesV1UpdateJSONRequestBody defines body for IncidentRolesV1Update for application/json ContentType. -type IncidentRolesV1UpdateJSONRequestBody = UpdateRequestBody4 +type IncidentRolesV1UpdateJSONRequestBody = UpdateRequestBody5 // IncidentStatusesV1CreateJSONRequestBody defines body for IncidentStatusesV1Create for application/json ContentType. type IncidentStatusesV1CreateJSONRequestBody = CreateRequestBody8 // IncidentStatusesV1UpdateJSONRequestBody defines body for IncidentStatusesV1Update for application/json ContentType. -type IncidentStatusesV1UpdateJSONRequestBody = UpdateRequestBody6 +type IncidentStatusesV1UpdateJSONRequestBody = UpdateRequestBody7 // IncidentsV1CreateJSONRequestBody defines body for IncidentsV1Create for application/json ContentType. -type IncidentsV1CreateJSONRequestBody = CreateRequestBody9 +type IncidentsV1CreateJSONRequestBody = IncidentCreatePayloadV1 // SeveritiesV1CreateJSONRequestBody defines body for SeveritiesV1Create for application/json ContentType. -type SeveritiesV1CreateJSONRequestBody = CreateRequestBody12 +type SeveritiesV1CreateJSONRequestBody = CreateRequestBody10 // SeveritiesV1UpdateJSONRequestBody defines body for SeveritiesV1Update for application/json ContentType. -type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody12 +type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody10 // AlertEventsV2CreateHTTPJSONRequestBody defines body for AlertEventsV2CreateHTTP for application/json ContentType. type AlertEventsV2CreateHTTPJSONRequestBody = CreateHTTPRequestBody +// AlertRoutesV2CreateJSONRequestBody defines body for AlertRoutesV2Create for application/json ContentType. +type AlertRoutesV2CreateJSONRequestBody = AlertRoutePayloadV2 + +// AlertRoutesV2UpdateJSONRequestBody defines body for AlertRoutesV2Update for application/json ContentType. +type AlertRoutesV2UpdateJSONRequestBody = UpdateRequestBody + // CatalogV2CreateEntryJSONRequestBody defines body for CatalogV2CreateEntry for application/json ContentType. type CatalogV2CreateEntryJSONRequestBody = CreateEntryRequestBody @@ -3919,40 +4576,40 @@ type CatalogV2UpdateTypeSchemaJSONRequestBody = UpdateTypeSchemaRequestBody type CustomFieldsV2CreateJSONRequestBody = CreateRequestBody3 // CustomFieldsV2UpdateJSONRequestBody defines body for CustomFieldsV2Update for application/json ContentType. -type CustomFieldsV2UpdateJSONRequestBody = UpdateRequestBody3 +type CustomFieldsV2UpdateJSONRequestBody = UpdateRequestBody4 // EscalationsV2CreatePathJSONRequestBody defines body for EscalationsV2CreatePath for application/json ContentType. -type EscalationsV2CreatePathJSONRequestBody = CreatePathRequestBody +type EscalationsV2CreatePathJSONRequestBody = EscalationPathPayloadV2 // EscalationsV2UpdatePathJSONRequestBody defines body for EscalationsV2UpdatePath for application/json ContentType. -type EscalationsV2UpdatePathJSONRequestBody = CreatePathRequestBody +type EscalationsV2UpdatePathJSONRequestBody = EscalationPathPayloadV2 // IncidentRolesV2CreateJSONRequestBody defines body for IncidentRolesV2Create for application/json ContentType. type IncidentRolesV2CreateJSONRequestBody = CreateRequestBody7 // IncidentRolesV2UpdateJSONRequestBody defines body for IncidentRolesV2Update for application/json ContentType. -type IncidentRolesV2UpdateJSONRequestBody = UpdateRequestBody5 +type IncidentRolesV2UpdateJSONRequestBody = UpdateRequestBody6 // IncidentsV2CreateJSONRequestBody defines body for IncidentsV2Create for application/json ContentType. -type IncidentsV2CreateJSONRequestBody = CreateRequestBody10 +type IncidentsV2CreateJSONRequestBody = IncidentCreatePayloadV2 // IncidentsV2EditJSONRequestBody defines body for IncidentsV2Edit for application/json ContentType. type IncidentsV2EditJSONRequestBody = EditRequestBody -// ManagedResourcesV2CreateManagedResourceJSONRequestBody defines body for ManagedResourcesV2CreateManagedResource for application/json ContentType. -type ManagedResourcesV2CreateManagedResourceJSONRequestBody = CreateManagedResourceRequestBody +// SchedulesV2CreateOverrideJSONRequestBody defines body for SchedulesV2CreateOverride for application/json ContentType. +type SchedulesV2CreateOverrideJSONRequestBody = ScheduleOverrideCreatePayloadV2 // SchedulesV2CreateJSONRequestBody defines body for SchedulesV2Create for application/json ContentType. -type SchedulesV2CreateJSONRequestBody = CreateRequestBody11 +type SchedulesV2CreateJSONRequestBody = CreateRequestBody9 // SchedulesV2UpdateJSONRequestBody defines body for SchedulesV2Update for application/json ContentType. -type SchedulesV2UpdateJSONRequestBody = UpdateRequestBody7 +type SchedulesV2UpdateJSONRequestBody = UpdateRequestBody8 // WorkflowsV2CreateWorkflowJSONRequestBody defines body for WorkflowsV2CreateWorkflow for application/json ContentType. -type WorkflowsV2CreateWorkflowJSONRequestBody = CreateWorkflowRequestBody +type WorkflowsV2CreateWorkflowJSONRequestBody = CreateWorkflowPayload // WorkflowsV2UpdateWorkflowJSONRequestBody defines body for WorkflowsV2UpdateWorkflow for application/json ContentType. -type WorkflowsV2UpdateWorkflowJSONRequestBody = UpdateWorkflowRequestBody +type WorkflowsV2UpdateWorkflowJSONRequestBody = UpdateWorkflowPayload // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -4186,6 +4843,22 @@ type ClientInterface interface { AlertEventsV2CreateHTTP(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // AlertRoutesV2Create request with any body + AlertRoutesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AlertRoutesV2Create(ctx context.Context, body AlertRoutesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AlertRoutesV2Destroy request + AlertRoutesV2Destroy(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AlertRoutesV2Show request + AlertRoutesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AlertRoutesV2Update request with any body + AlertRoutesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AlertRoutesV2Update(ctx context.Context, id string, body AlertRoutesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CatalogV2ListEntries request CatalogV2ListEntries(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -4317,14 +4990,14 @@ type ClientInterface interface { IncidentsV2Edit(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ManagedResourcesV2CreateManagedResource request with any body - ManagedResourcesV2CreateManagedResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ManagedResourcesV2CreateManagedResource(ctx context.Context, body ManagedResourcesV2CreateManagedResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // SchedulesV2ListScheduleEntries request SchedulesV2ListScheduleEntries(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // SchedulesV2CreateOverride request with any body + SchedulesV2CreateOverrideWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SchedulesV2CreateOverride(ctx context.Context, body SchedulesV2CreateOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // SchedulesV2List request SchedulesV2List(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -5030,8 +5703,80 @@ func (c *Client) ActionsV2List(ctx context.Context, params *ActionsV2ListParams, return c.Client.Do(req) } -func (c *Client) ActionsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewActionsV2ShowRequest(c.Server, id) +func (c *Client) ActionsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActionsV2ShowRequest(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) AlertEventsV2CreateHTTPWithBody(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertEventsV2CreateHTTPRequestWithBody(c.Server, alertSourceConfigId, params, 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) AlertEventsV2CreateHTTP(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertEventsV2CreateHTTPRequest(c.Server, alertSourceConfigId, params, 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) AlertRoutesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2CreateRequestWithBody(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) AlertRoutesV2Create(ctx context.Context, body AlertRoutesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2CreateRequest(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) AlertRoutesV2Destroy(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2DestroyRequest(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) AlertRoutesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2ShowRequest(c.Server, id) if err != nil { return nil, err } @@ -5042,8 +5787,8 @@ func (c *Client) ActionsV2Show(ctx context.Context, id string, reqEditors ...Req return c.Client.Do(req) } -func (c *Client) AlertEventsV2CreateHTTPWithBody(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAlertEventsV2CreateHTTPRequestWithBody(c.Server, alertSourceConfigId, params, contentType, body) +func (c *Client) AlertRoutesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2UpdateRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -5054,8 +5799,8 @@ func (c *Client) AlertEventsV2CreateHTTPWithBody(ctx context.Context, alertSourc return c.Client.Do(req) } -func (c *Client) AlertEventsV2CreateHTTP(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAlertEventsV2CreateHTTPRequest(c.Server, alertSourceConfigId, params, body) +func (c *Client) AlertRoutesV2Update(ctx context.Context, id string, body AlertRoutesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAlertRoutesV2UpdateRequest(c.Server, id, body) if err != nil { return nil, err } @@ -5642,8 +6387,8 @@ func (c *Client) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV return c.Client.Do(req) } -func (c *Client) ManagedResourcesV2CreateManagedResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewManagedResourcesV2CreateManagedResourceRequestWithBody(c.Server, contentType, body) +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 } @@ -5654,8 +6399,8 @@ func (c *Client) ManagedResourcesV2CreateManagedResourceWithBody(ctx context.Con return c.Client.Do(req) } -func (c *Client) ManagedResourcesV2CreateManagedResource(ctx context.Context, body ManagedResourcesV2CreateManagedResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewManagedResourcesV2CreateManagedResourceRequest(c.Server, body) +func (c *Client) SchedulesV2CreateOverrideWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2CreateOverrideRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -5666,8 +6411,8 @@ func (c *Client) ManagedResourcesV2CreateManagedResource(ctx context.Context, bo return c.Client.Do(req) } -func (c *Client) SchedulesV2ListScheduleEntries(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSchedulesV2ListScheduleEntriesRequest(c.Server, params) +func (c *Client) SchedulesV2CreateOverride(ctx context.Context, body SchedulesV2CreateOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSchedulesV2CreateOverrideRequest(c.Server, body) if err != nil { return nil, err } @@ -7633,6 +8378,161 @@ func NewAlertEventsV2CreateHTTPRequestWithBody(server string, alertSourceConfigI return req, nil } +// NewAlertRoutesV2CreateRequest calls the generic AlertRoutesV2Create builder with application/json body +func NewAlertRoutesV2CreateRequest(server string, body AlertRoutesV2CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAlertRoutesV2CreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewAlertRoutesV2CreateRequestWithBody generates requests for AlertRoutesV2Create with any type of body +func NewAlertRoutesV2CreateRequestWithBody(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/alert_routes") + 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 +} + +// NewAlertRoutesV2DestroyRequest generates requests for AlertRoutesV2Destroy +func NewAlertRoutesV2DestroyRequest(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/alert_routes/%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 +} + +// NewAlertRoutesV2ShowRequest generates requests for AlertRoutesV2Show +func NewAlertRoutesV2ShowRequest(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/alert_routes/%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 +} + +// NewAlertRoutesV2UpdateRequest calls the generic AlertRoutesV2Update builder with application/json body +func NewAlertRoutesV2UpdateRequest(server string, id string, body AlertRoutesV2UpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAlertRoutesV2UpdateRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewAlertRoutesV2UpdateRequestWithBody generates requests for AlertRoutesV2Update with any type of body +func NewAlertRoutesV2UpdateRequestWithBody(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/alert_routes/%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 +} + // NewCatalogV2ListEntriesRequest generates requests for CatalogV2ListEntries func NewCatalogV2ListEntriesRequest(server string, params *CatalogV2ListEntriesParams) (*http.Request, error) { var err error @@ -7698,6 +8598,38 @@ func NewCatalogV2ListEntriesRequest(server string, params *CatalogV2ListEntriesP } + if params.IncludeReferences != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_references", runtime.ParamLocationQuery, *params.IncludeReferences); 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.IncludeDerivedAttributes != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_derived_attributes", runtime.ParamLocationQuery, *params.IncludeDerivedAttributes); 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) @@ -8976,6 +9908,22 @@ func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*h } + if params.UpdatedAt != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "updated_at", runtime.ParamLocationQuery, *params.UpdatedAt); 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 { @@ -9187,46 +10135,6 @@ func NewIncidentsV2EditRequestWithBody(server string, id string, contentType str return req, nil } -// NewManagedResourcesV2CreateManagedResourceRequest calls the generic ManagedResourcesV2CreateManagedResource builder with application/json body -func NewManagedResourcesV2CreateManagedResourceRequest(server string, body ManagedResourcesV2CreateManagedResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewManagedResourcesV2CreateManagedResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewManagedResourcesV2CreateManagedResourceRequestWithBody generates requests for ManagedResourcesV2CreateManagedResource with any type of body -func NewManagedResourcesV2CreateManagedResourceRequestWithBody(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/managed_resources") - 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 -} - // NewSchedulesV2ListScheduleEntriesRequest generates requests for SchedulesV2ListScheduleEntries func NewSchedulesV2ListScheduleEntriesRequest(server string, params *SchedulesV2ListScheduleEntriesParams) (*http.Request, error) { var err error @@ -9278,27 +10186,67 @@ func NewSchedulesV2ListScheduleEntriesRequest(server string, params *SchedulesV2 if params.EntryWindowEnd != 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 - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + 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 + } 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 +} + +// NewSchedulesV2CreateOverrideRequest calls the generic SchedulesV2CreateOverride builder with application/json body +func NewSchedulesV2CreateOverrideRequest(server string, body SchedulesV2CreateOverrideJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSchedulesV2CreateOverrideRequestWithBody(server, "application/json", bodyReader) +} + +// NewSchedulesV2CreateOverrideRequestWithBody generates requests for SchedulesV2CreateOverride with any type of body +func NewSchedulesV2CreateOverrideRequestWithBody(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/schedule_overrides") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } @@ -10033,6 +10981,22 @@ type ClientWithResponsesInterface interface { AlertEventsV2CreateHTTPWithResponse(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertEventsV2CreateHTTPResponse, error) + // AlertRoutesV2Create request with any body + AlertRoutesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertRoutesV2CreateResponse, error) + + AlertRoutesV2CreateWithResponse(ctx context.Context, body AlertRoutesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertRoutesV2CreateResponse, error) + + // AlertRoutesV2Destroy request + AlertRoutesV2DestroyWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*AlertRoutesV2DestroyResponse, error) + + // AlertRoutesV2Show request + AlertRoutesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*AlertRoutesV2ShowResponse, error) + + // AlertRoutesV2Update request with any body + AlertRoutesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertRoutesV2UpdateResponse, error) + + AlertRoutesV2UpdateWithResponse(ctx context.Context, id string, body AlertRoutesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertRoutesV2UpdateResponse, error) + // CatalogV2ListEntries request CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) @@ -10164,14 +11128,14 @@ type ClientWithResponsesInterface interface { IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) - // ManagedResourcesV2CreateManagedResource request with any body - ManagedResourcesV2CreateManagedResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ManagedResourcesV2CreateManagedResourceResponse, error) - - ManagedResourcesV2CreateManagedResourceWithResponse(ctx context.Context, body ManagedResourcesV2CreateManagedResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*ManagedResourcesV2CreateManagedResourceResponse, error) - // SchedulesV2ListScheduleEntries request SchedulesV2ListScheduleEntriesWithResponse(ctx context.Context, params *SchedulesV2ListScheduleEntriesParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListScheduleEntriesResponse, error) + // SchedulesV2CreateOverride request with any body + SchedulesV2CreateOverrideWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2CreateOverrideResponse, error) + + SchedulesV2CreateOverrideWithResponse(ctx context.Context, body SchedulesV2CreateOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2CreateOverrideResponse, error) + // SchedulesV2List request SchedulesV2ListWithResponse(ctx context.Context, params *SchedulesV2ListParams, reqEditors ...RequestEditorFn) (*SchedulesV2ListResponse, error) @@ -10526,7 +11490,7 @@ func (r IncidentAttachmentsV1ListResponse) StatusCode() int { type IncidentAttachmentsV1CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateResponseBody + JSON201 *CreateResponseBody2 } // Status returns HTTPResponse.Status @@ -10569,7 +11533,7 @@ func (r IncidentAttachmentsV1DeleteResponse) StatusCode() int { type IncidentMembershipsV1CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateResponseBody2 + JSON201 *CreateResponseBody3 } // Status returns HTTPResponse.Status @@ -10940,7 +11904,7 @@ func (r IncidentsV1ShowResponse) StatusCode() int { type UtilitiesV1OpenAPIResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *openapi_types.File + JSON200 *interface{} } // Status returns HTTPResponse.Status @@ -10962,7 +11926,7 @@ func (r UtilitiesV1OpenAPIResponse) StatusCode() int { type UtilitiesV1OpenAPIV3Response struct { Body []byte HTTPResponse *http.Response - JSON200 *openapi_types.File + JSON200 *interface{} } // Status returns HTTPResponse.Status @@ -11156,6 +12120,93 @@ func (r AlertEventsV2CreateHTTPResponse) StatusCode() int { return 0 } +type AlertRoutesV2CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateResponseBody +} + +// Status returns HTTPResponse.Status +func (r AlertRoutesV2CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AlertRoutesV2CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AlertRoutesV2DestroyResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r AlertRoutesV2DestroyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AlertRoutesV2DestroyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AlertRoutesV2ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CreateResponseBody +} + +// Status returns HTTPResponse.Status +func (r AlertRoutesV2ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AlertRoutesV2ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AlertRoutesV2UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CreateResponseBody +} + +// Status returns HTTPResponse.Status +func (r AlertRoutesV2UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AlertRoutesV2UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CatalogV2ListEntriesResponse struct { Body []byte HTTPResponse *http.Response @@ -11921,14 +12972,14 @@ func (r IncidentsV2EditResponse) StatusCode() int { return 0 } -type ManagedResourcesV2CreateManagedResourceResponse struct { +type SchedulesV2ListScheduleEntriesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CreateManagedResourceResponseBody + JSON200 *ListScheduleEntriesResponseBody } // Status returns HTTPResponse.Status -func (r ManagedResourcesV2CreateManagedResourceResponse) Status() string { +func (r SchedulesV2ListScheduleEntriesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11936,21 +12987,21 @@ func (r ManagedResourcesV2CreateManagedResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ManagedResourcesV2CreateManagedResourceResponse) StatusCode() int { +func (r SchedulesV2ListScheduleEntriesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SchedulesV2ListScheduleEntriesResponse struct { +type SchedulesV2CreateOverrideResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListScheduleEntriesResponseBody + JSON201 *CreateOverrideResponseBody } // Status returns HTTPResponse.Status -func (r SchedulesV2ListScheduleEntriesResponse) Status() string { +func (r SchedulesV2CreateOverrideResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11958,7 +13009,7 @@ func (r SchedulesV2ListScheduleEntriesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SchedulesV2ListScheduleEntriesResponse) StatusCode() int { +func (r SchedulesV2CreateOverrideResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -12734,6 +13785,58 @@ func (c *ClientWithResponses) AlertEventsV2CreateHTTPWithResponse(ctx context.Co return ParseAlertEventsV2CreateHTTPResponse(rsp) } +// AlertRoutesV2CreateWithBodyWithResponse request with arbitrary body returning *AlertRoutesV2CreateResponse +func (c *ClientWithResponses) AlertRoutesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertRoutesV2CreateResponse, error) { + rsp, err := c.AlertRoutesV2CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2CreateResponse(rsp) +} + +func (c *ClientWithResponses) AlertRoutesV2CreateWithResponse(ctx context.Context, body AlertRoutesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertRoutesV2CreateResponse, error) { + rsp, err := c.AlertRoutesV2Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2CreateResponse(rsp) +} + +// AlertRoutesV2DestroyWithResponse request returning *AlertRoutesV2DestroyResponse +func (c *ClientWithResponses) AlertRoutesV2DestroyWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*AlertRoutesV2DestroyResponse, error) { + rsp, err := c.AlertRoutesV2Destroy(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2DestroyResponse(rsp) +} + +// AlertRoutesV2ShowWithResponse request returning *AlertRoutesV2ShowResponse +func (c *ClientWithResponses) AlertRoutesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*AlertRoutesV2ShowResponse, error) { + rsp, err := c.AlertRoutesV2Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2ShowResponse(rsp) +} + +// AlertRoutesV2UpdateWithBodyWithResponse request with arbitrary body returning *AlertRoutesV2UpdateResponse +func (c *ClientWithResponses) AlertRoutesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertRoutesV2UpdateResponse, error) { + rsp, err := c.AlertRoutesV2UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2UpdateResponse(rsp) +} + +func (c *ClientWithResponses) AlertRoutesV2UpdateWithResponse(ctx context.Context, id string, body AlertRoutesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertRoutesV2UpdateResponse, error) { + rsp, err := c.AlertRoutesV2Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAlertRoutesV2UpdateResponse(rsp) +} + // CatalogV2ListEntriesWithResponse request returning *CatalogV2ListEntriesResponse func (c *ClientWithResponses) CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) { rsp, err := c.CatalogV2ListEntries(ctx, params, reqEditors...) @@ -13153,30 +14256,30 @@ func (c *ClientWithResponses) IncidentsV2EditWithResponse(ctx context.Context, i return ParseIncidentsV2EditResponse(rsp) } -// ManagedResourcesV2CreateManagedResourceWithBodyWithResponse request with arbitrary body returning *ManagedResourcesV2CreateManagedResourceResponse -func (c *ClientWithResponses) ManagedResourcesV2CreateManagedResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ManagedResourcesV2CreateManagedResourceResponse, error) { - rsp, err := c.ManagedResourcesV2CreateManagedResourceWithBody(ctx, contentType, body, reqEditors...) +// 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 ParseManagedResourcesV2CreateManagedResourceResponse(rsp) + return ParseSchedulesV2ListScheduleEntriesResponse(rsp) } -func (c *ClientWithResponses) ManagedResourcesV2CreateManagedResourceWithResponse(ctx context.Context, body ManagedResourcesV2CreateManagedResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*ManagedResourcesV2CreateManagedResourceResponse, error) { - rsp, err := c.ManagedResourcesV2CreateManagedResource(ctx, body, reqEditors...) +// SchedulesV2CreateOverrideWithBodyWithResponse request with arbitrary body returning *SchedulesV2CreateOverrideResponse +func (c *ClientWithResponses) SchedulesV2CreateOverrideWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesV2CreateOverrideResponse, error) { + rsp, err := c.SchedulesV2CreateOverrideWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseManagedResourcesV2CreateManagedResourceResponse(rsp) + return ParseSchedulesV2CreateOverrideResponse(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...) +func (c *ClientWithResponses) SchedulesV2CreateOverrideWithResponse(ctx context.Context, body SchedulesV2CreateOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesV2CreateOverrideResponse, error) { + rsp, err := c.SchedulesV2CreateOverride(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseSchedulesV2ListScheduleEntriesResponse(rsp) + return ParseSchedulesV2CreateOverrideResponse(rsp) } // SchedulesV2ListWithResponse request returning *SchedulesV2ListResponse @@ -13678,7 +14781,7 @@ func ParseIncidentAttachmentsV1CreateResponse(rsp *http.Response) (*IncidentAtta switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateResponseBody + var dest CreateResponseBody2 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13720,7 +14823,7 @@ func ParseIncidentMembershipsV1CreateResponse(rsp *http.Response) (*IncidentMemb switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateResponseBody2 + var dest CreateResponseBody3 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14132,7 +15235,7 @@ func ParseUtilitiesV1OpenAPIResponse(rsp *http.Response) (*UtilitiesV1OpenAPIRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest openapi_types.File + var dest interface{} if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14158,7 +15261,7 @@ func ParseUtilitiesV1OpenAPIV3Response(rsp *http.Response) (*UtilitiesV1OpenAPIV switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest openapi_types.File + var dest interface{} if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14367,6 +15470,100 @@ func ParseAlertEventsV2CreateHTTPResponse(rsp *http.Response) (*AlertEventsV2Cre return response, nil } +// ParseAlertRoutesV2CreateResponse parses an HTTP response from a AlertRoutesV2CreateWithResponse call +func ParseAlertRoutesV2CreateResponse(rsp *http.Response) (*AlertRoutesV2CreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AlertRoutesV2CreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseAlertRoutesV2DestroyResponse parses an HTTP response from a AlertRoutesV2DestroyWithResponse call +func ParseAlertRoutesV2DestroyResponse(rsp *http.Response) (*AlertRoutesV2DestroyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AlertRoutesV2DestroyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseAlertRoutesV2ShowResponse parses an HTTP response from a AlertRoutesV2ShowWithResponse call +func ParseAlertRoutesV2ShowResponse(rsp *http.Response) (*AlertRoutesV2ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AlertRoutesV2ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CreateResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseAlertRoutesV2UpdateResponse parses an HTTP response from a AlertRoutesV2UpdateWithResponse call +func ParseAlertRoutesV2UpdateResponse(rsp *http.Response) (*AlertRoutesV2UpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AlertRoutesV2UpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CreateResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseCatalogV2ListEntriesResponse parses an HTTP response from a CatalogV2ListEntriesWithResponse call func ParseCatalogV2ListEntriesResponse(rsp *http.Response) (*CatalogV2ListEntriesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -15227,22 +16424,22 @@ func ParseIncidentsV2EditResponse(rsp *http.Response) (*IncidentsV2EditResponse, return response, nil } -// ParseManagedResourcesV2CreateManagedResourceResponse parses an HTTP response from a ManagedResourcesV2CreateManagedResourceWithResponse call -func ParseManagedResourcesV2CreateManagedResourceResponse(rsp *http.Response) (*ManagedResourcesV2CreateManagedResourceResponse, error) { +// 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 := &ManagedResourcesV2CreateManagedResourceResponse{ + response := &SchedulesV2ListScheduleEntriesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CreateManagedResourceResponseBody + var dest ListScheduleEntriesResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15253,26 +16450,26 @@ func ParseManagedResourcesV2CreateManagedResourceResponse(rsp *http.Response) (* return response, nil } -// ParseSchedulesV2ListScheduleEntriesResponse parses an HTTP response from a SchedulesV2ListScheduleEntriesWithResponse call -func ParseSchedulesV2ListScheduleEntriesResponse(rsp *http.Response) (*SchedulesV2ListScheduleEntriesResponse, error) { +// ParseSchedulesV2CreateOverrideResponse parses an HTTP response from a SchedulesV2CreateOverrideWithResponse call +func ParseSchedulesV2CreateOverrideResponse(rsp *http.Response) (*SchedulesV2CreateOverrideResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SchedulesV2ListScheduleEntriesResponse{ + response := &SchedulesV2CreateOverrideResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListScheduleEntriesResponseBody + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateOverrideResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest } diff --git a/client/openapi3.json b/client/openapi3.json index 6f890f5..93b9fa4 100644 --- a/client/openapi3.json +++ b/client/openapi3.json @@ -385,7 +385,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRequestBody" + "$ref": "#/components/schemas/UpdateRequestBody2" }, "example": { "sort_key": 10, @@ -653,7 +653,7 @@ "show_in_announcement_post": true }, "schema": { - "$ref": "#/components/schemas/UpdateRequestBody2" + "$ref": "#/components/schemas/UpdateRequestBody3" } } }, @@ -856,7 +856,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResponseBody" + "$ref": "#/components/schemas/CreateResponseBody2" }, "example": { "incident_attachment": { @@ -933,7 +933,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResponseBody2" + "$ref": "#/components/schemas/CreateResponseBody3" }, "example": { "incident_membership": { @@ -1179,7 +1179,7 @@ "shortform": "lead" }, "schema": { - "$ref": "#/components/schemas/UpdateRequestBody4" + "$ref": "#/components/schemas/UpdateRequestBody5" } } }, @@ -1397,7 +1397,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRequestBody6" + "$ref": "#/components/schemas/UpdateRequestBody7" }, "example": { "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", @@ -1762,7 +1762,7 @@ "visibility": "public" }, "schema": { - "$ref": "#/components/schemas/CreateRequestBody9" + "$ref": "#/components/schemas/IncidentCreatePayloadV1" } } }, @@ -2074,9 +2074,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "example": "{}", - "format": "binary" + "example": "{}" }, "example": "{}" } @@ -2099,9 +2097,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "example": "{}", - "format": "binary" + "example": "{}" }, "example": "{}" } @@ -2155,7 +2151,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody12" + "$ref": "#/components/schemas/CreateRequestBody10" }, "example": { "description": "Issues with **low impact**.", @@ -2287,7 +2283,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody12" + "$ref": "#/components/schemas/CreateRequestBody10" }, "example": { "description": "Issues with **low impact**.", @@ -2531,198 +2527,314 @@ } } }, - "/v2/catalog_entries": { - "get": { + "/v2/alert_routes": { + "post": { "tags": [ - "Catalog V2" - ], - "summary": "ListEntries Catalog V2", - "description": "List entries for a catalog type.", - "operationId": "Catalog V2#ListEntries", - "parameters": [ - { - "name": "catalog_type_id", - "in": "query", - "description": "ID of this catalog type", - "allowEmptyValue": true, - "required": true, - "schema": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": 250 - }, - "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" - } + "Alert Routes V2" ], - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListEntriesResponseBody" - }, - "example": { - "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", + "summary": "Create Alert Routes V2", + "description": "Create an alert route.\n\nWe recommend you create alert routes in the incident.io dashboard where we allow\npreviewing filter and grouping rules.\n", + "operationId": "Alert Routes V2#Create", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlertRoutePayloadV2" + }, + "example": { + "alert_sources": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } + ], + "auto_decline_enabled": false, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { "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" } + ], + "subject": "incident.severity" + } + ] + } + ], + "defer_time_seconds": 1, + "enabled": false, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "literal": "SEV123", + "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" + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ], - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" + } + ], + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "categories": [ - "issue-tracker" - ], - "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": [ + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "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" + } + } } ], - "type": "Custom[\"Service\"]" + "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\"]" } - ], - "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 + } + ], + "reference": "abc123", + "root_reference": "incident.status" } - } - } - } - } - } - }, - "post": { - "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", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEntryRequestBody" - }, - "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" ], - "attribute_values": { - "abc123": { + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "incident_condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "incident_enabled": false, + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "abc123" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { "array_value": [ { "literal": "SEV123", @@ -2734,11 +2846,7 @@ "reference": "incident.severity" } } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "name": "Primary On-call", - "rank": 3 + } } } } @@ -2749,62 +2857,312 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEntryResponseBody" + "$ref": "#/components/schemas/CreateResponseBody" }, "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { - "array_value": [ + "alert_route": { + "condition_groups": [ + { + "conditions": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" }, - "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" + "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" + } + } + ] + } + ], + "defer_time_seconds": 1, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } } } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } } } } @@ -2813,23 +3171,23 @@ } } }, - "/v2/catalog_entries/{id}": { + "/v2/alert_routes/{id}": { "delete": { "tags": [ - "Catalog V2" + "Alert Routes V2" ], - "summary": "DestroyEntry Catalog V2", - "description": "Archives a catalog entry.", - "operationId": "Catalog V2#DestroyEntry", + "summary": "Destroy Alert Routes V2", + "description": "Archives an alert route.\n\nWe recommend you create alert routes in the incident.io dashboard where we allow\npreviewing filter and grouping rules.\n", + "operationId": "Alert Routes V2#Destroy", "parameters": [ { "name": "id", "in": "path", - "description": "ID of this catalog entry", + "description": "Unique identifier for this alert route config", "required": true, "schema": { "type": "string", - "description": "ID of this catalog entry", + "description": "Unique identifier for this alert route config", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2843,20 +3201,20 @@ }, "get": { "tags": [ - "Catalog V2" + "Alert Routes V2" ], - "summary": "ShowEntry Catalog V2", - "description": "Show a single catalog entry.", - "operationId": "Catalog V2#ShowEntry", + "summary": "Show Alert Routes V2", + "description": "Show an alert route.\n\nWe recommend you create alert routes in the incident.io dashboard where we allow\npreviewing filter and grouping rules.\n", + "operationId": "Alert Routes V2#Show", "parameters": [ { "name": "id", "in": "path", - "description": "ID of this catalog entry", + "description": "Unique identifier for this alert route config", "required": true, "schema": { "type": "string", - "description": "ID of this catalog entry", + "description": "Unique identifier for this alert route config", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2868,609 +3226,335 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowEntryResponseBody" + "$ref": "#/components/schemas/CreateResponseBody" }, "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "archived_at": "2021-08-17T14:28:57.801578Z", - "attribute_values": { - "abc123": { - "array_value": [ + "alert_route": { + "condition_groups": [ + { + "conditions": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" }, - "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" + "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" + } } - ], - "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" - }, - "categories": [ - "issue-tracker" - ], - "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": [ + "defer_time_seconds": 1, + "escalation_bindings": [ + { + "binding": { + "array_value": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "type": "Custom[\"Service\"]" + "value": { + "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" - } - } - } - } - } - } - }, - "put": { - "tags": [ - "Catalog V2" - ], - "summary": "UpdateEntry Catalog V2", - "description": "Updates an existing catalog entry.", - "operationId": "Catalog V2#UpdateEntry", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of this catalog entry", - "required": true, - "schema": { - "type": "string", - "description": "ID of this catalog entry", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEntryRequestBody" - }, - "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" } ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "name": "Primary On-call", - "rank": 3 - } - } - } - }, - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowEntryResponseBody" - }, - "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" + "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" + } } ], - "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", - "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" - }, - "categories": [ - "issue-tracker" ], - "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" + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } ], - "schema": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ + "grouping_window_seconds": 1, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "type": "Custom[\"Service\"]" + "value": { + "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" - } - } - } - } - } - } - } - }, - "/v2/catalog_resources": { - "get": { - "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", - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResourcesResponseBody" - }, - "example": { - "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" - } - ] - } - } - } - } - } - } - }, - "/v2/catalog_types": { - "get": { - "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", - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListTypesResponseBody" - }, - "example": { - "catalog_types": [ - { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" }, - "categories": [ - "issue-tracker" - ], - "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": [ + "incident_mode": { + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ - { - "attribute_id": "abc123", - "attribute_name": "abc123" - } - ], - "type": "Custom[\"Service\"]" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } ], - "version": 1 + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } }, - "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" - } - ] - } - } - } - } - } - }, - "post": { - "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", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTypeRequestBody" - }, - "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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\"]" - } - } - } - }, - "responses": { - "201": { - "description": "Created response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTypeResponseBody" - }, - "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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\"]" + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "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" + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } } } } } } } - } - }, - "/v2/catalog_types/{id}": { - "delete": { + }, + "put": { "tags": [ - "Catalog V2" + "Alert Routes V2" ], - "summary": "DestroyType Catalog V2", - "description": "Archives a catalog type and associated entries.", - "operationId": "Catalog V2#DestroyType", + "summary": "Update Alert Routes V2", + "description": "Updates an alert route.\n\nWe recommend you create alert routes in the incident.io dashboard where we allow\npreviewing filter and grouping rules.\n", + "operationId": "Alert Routes V2#Update", "parameters": [ { "name": "id", "in": "path", - "description": "ID of this catalog type", + "description": "Unique identifier for this alert route config", "required": true, "schema": { "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - ], - "responses": { - "204": { - "description": "No Content response." - } - } - }, - "get": { - "tags": [ - "Catalog V2" - ], - "summary": "ShowType Catalog V2", - "description": "Show a single catalog type.", - "operationId": "Catalog V2#ShowType", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of this catalog type", - "required": true, - "schema": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - ], - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTypeResponseBody" - }, - "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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" - } - } - } - } - } - } - }, - "put": { - "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", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of this catalog type", - "required": true, - "schema": { - "type": "string", - "description": "ID of this catalog type", + "description": "Unique identifier for this alert route config", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -3481,133 +3565,313 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTypeRequestBody" + "$ref": "#/components/schemas/UpdateRequestBody" }, "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" + "alert_sources": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } ], - "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" - } - } - } - }, - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTypeResponseBody" - }, - "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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": [ + "auto_decline_enabled": false, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "defer_time_seconds": 1, + "enabled": false, + "escalation_bindings": [ + { + "binding": { + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "label": "Team Slack channel", + "operations": [ + { + "branches": { + "branches": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "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" + } + } } ], - "type": "Custom[\"Service\"]" + "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\"]" } - ], - "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" + } + ], + "reference": "abc123", + "root_reference": "incident.status" } - } - } - } - } - } - } - }, - "/v2/catalog_types/{id}/actions/update_schema": { - "post": { - "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", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of this catalog type", - "required": true, - "schema": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTypeSchemaRequestBody" - }, - "example": { - "attributes": [ + ], + "grouping_keys": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "incident_condition_groups": [ + { + "conditions": [ { - "attribute_id": "abc123" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } - ], - "type": "Custom[\"Service\"]" + ] } ], - "version": 1 + "incident_enabled": false, + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "abc123" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } } } } @@ -3618,23 +3882,461 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTypeResponseBody" + "$ref": "#/components/schemas/CreateResponseBody" }, "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" + "alert_route": { + "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" + } + } + ] + } ], - "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", + "defer_time_seconds": 1, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + } + } + } + } + } + } + } + }, + "/v2/catalog_entries": { + "get": { + "tags": [ + "Catalog V2" + ], + "summary": "ListEntries Catalog V2", + "description": "List entries for a catalog type.", + "operationId": "Catalog V2#ListEntries", + "parameters": [ + { + "name": "catalog_type_id", + "in": "query", + "description": "ID of this catalog type", + "allowEmptyValue": true, + "required": true, + "schema": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "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": 250 + }, + "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" + }, + { + "name": "include_references", + "in": "query", + "description": "Whether to include attribute references to other catalog entries. Defaults to true, if not set.", + "allowEmptyValue": true, + "schema": { + "type": "boolean", + "description": "Whether to include attribute references to other catalog entries. Defaults to true, if not set.", + "example": true + }, + "example": true + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListEntriesResponseBody" + }, + "example": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", "is_editable": false, "last_synced_at": "2021-08-17T13:28:57.801578Z", "name": "Kubernetes Cluster", @@ -3666,66 +4368,54 @@ "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 } } } } } } - } - }, - "/v2/custom_fields": { - "get": { - "tags": [ - "Custom Fields V2" - ], - "summary": "List Custom Fields V2", - "description": "List all custom fields for an organisation.", - "operationId": "Custom Fields V2#List", - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponseBody5" - }, - "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" - } - ] - } - } - } - } - } }, "post": { "tags": [ - "Custom Fields V2" + "Catalog V2" ], - "summary": "Create Custom Fields V2", - "description": "Create a new custom field", - "operationId": "Custom Fields V2#Create", + "summary": "CreateEntry Catalog V2", + "description": "Create an entry within the catalog. We support a maximum of 50,000 entries per type.\n\nIf you call this API with a payload where the external_id and catalog_type_id match an existing entry, the existing entry will be updated.", + "operationId": "Catalog V2#CreateEntry", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody3" + "$ref": "#/components/schemas/CreateEntryRequestBody" }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "name": "Affected Team" + "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 } } } @@ -3736,16 +4426,61 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/CreateEntryResponseBody" }, "example": { - "custom_field": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" + } + } + }, "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", + "name": "Primary On-call", + "rank": 3, "updated_at": "2021-08-17T13:28:57.801578Z" } } @@ -3755,23 +4490,23 @@ } } }, - "/v2/custom_fields/{id}": { + "/v2/catalog_entries/{id}": { "delete": { "tags": [ - "Custom Fields V2" + "Catalog V2" ], - "summary": "Delete Custom Fields V2", - "description": "Delete a custom field", - "operationId": "Custom Fields V2#Delete", + "summary": "DestroyEntry Catalog V2", + "description": "Archives a catalog entry.", + "operationId": "Catalog V2#DestroyEntry", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -3785,20 +4520,20 @@ }, "get": { "tags": [ - "Custom Fields V2" + "Catalog V2" ], - "summary": "Show Custom Fields V2", - "description": "Get a single custom field.", - "operationId": "Custom Fields V2#Show", + "summary": "ShowEntry Catalog V2", + "description": "Show a single catalog entry.", + "operationId": "Catalog V2#ShowEntry", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -3810,16 +4545,107 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/ShowEntryResponseBody" }, "example": { - "custom_field": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" + } + } + }, "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", + "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" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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" } } @@ -3830,20 +4656,20 @@ }, "put": { "tags": [ - "Custom Fields V2" + "Catalog V2" ], - "summary": "Update Custom Fields V2", - "description": "Update the details of a custom field", - "operationId": "Custom Fields V2#Update", + "summary": "UpdateEntry Catalog V2", + "description": "Updates an existing catalog entry.", + "operationId": "Catalog V2#UpdateEntry", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the custom field", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -3854,11 +4680,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRequestBody3" + "$ref": "#/components/schemas/UpdateEntryRequestBody" }, "example": { - "description": "Which team is impacted by this issue", - "name": "Affected Team" + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "attribute_values": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "name": "Primary On-call", + "rank": 3 } } } @@ -3869,195 +4714,142 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/ShowEntryResponseBody" }, "example": { - "custom_field": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" + } + } + }, "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", + "name": "Primary On-call", + "rank": 3, "updated_at": "2021-08-17T13:28:57.801578Z" - } - } - } - } - } - } - } - }, - "/v2/escalation_paths": { - "post": { - "tags": [ - "Escalations V2" - ], - "summary": "CreatePath Escalations V2", - "description": "Create an escalation path.\n\nAn escalation path is a series of steps that describe how a page should be escalated,\nrepresented as graph, supporting conditional branches based on alert priority and working\nintervals.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", - "operationId": "Escalations V2#CreatePath", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePathRequestBody" - }, - "example": { - "name": "Urgent Support", - "path": [ - { + }, + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ + "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": [ { - "operation": "one_of", - "param_bindings": [ + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + "attribute_id": "abc123", + "attribute_name": "abc123" } ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" + "type": "Custom[\"Service\"]" } ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "version": 1 }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] + "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" } - ] + } } } } - }, + } + } + }, + "/v2/catalog_resources": { + "get": { + "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", "responses": { - "201": { - "description": "Created response.", + "200": { + "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePathResponseBody" + "$ref": "#/components/schemas/ListResourcesResponseBody" }, "example": { - "escalation_path": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] - } - ] - } + "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" + } + ] } } } @@ -4065,328 +4857,163 @@ } } }, - "/v2/escalation_paths/{id}": { - "delete": { - "tags": [ - "Escalations V2" - ], - "summary": "DestroyPath Escalations V2", - "description": "Archives an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", - "operationId": "Escalations V2#DestroyPath", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier for this escalation path.", - "required": true, - "schema": { - "type": "string", - "description": "Unique identifier for this escalation path.", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } - ], - "responses": { - "204": { - "description": "No Content response." - } - } - }, + "/v2/catalog_types": { "get": { "tags": [ - "Escalations V2" - ], - "summary": "ShowPath Escalations V2", - "description": "Show an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", - "operationId": "Escalations V2#ShowPath", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier for this escalation path.", - "required": true, - "schema": { - "type": "string", - "description": "Unique identifier for this escalation path.", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } + "Catalog V2" ], + "summary": "ListTypes Catalog V2", + "description": "List all catalog types for an organisation, including those synced from external resources.", + "operationId": "Catalog V2#ListTypes", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePathResponseBody" + "$ref": "#/components/schemas/ListTypesResponseBody" }, "example": { - "escalation_path": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ + "catalog_types": [ + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" + "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" + } + ] } } } } } }, - "put": { + "post": { "tags": [ - "Escalations V2" - ], - "summary": "UpdatePath Escalations V2", - "description": "Updates an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", - "operationId": "Escalations V2#UpdatePath", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier for this escalation path.", - "required": true, - "schema": { - "type": "string", - "description": "Unique identifier for this escalation path.", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - } + "Catalog V2" ], + "summary": "CreateType Catalog V2", + "description": "Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.", + "operationId": "Catalog V2#CreateType", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePathRequestBody" + "$ref": "#/components/schemas/CreateTypeRequestBody" }, "example": { - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] - } - ] + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "alert", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]" } } } }, "responses": { - "200": { - "description": "OK response.", + "201": { + "description": "Created response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePathResponseBody" + "$ref": "#/components/schemas/CreateTypeResponseBody" }, "example": { - "escalation_path": { + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ + "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": [ { - "id": "lawrencejones", - "type": "user", - "urgency": "high" + "attribute_id": "abc123", + "attribute_name": "abc123" } ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "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" } } } @@ -4395,45 +5022,53 @@ } } }, - "/v2/follow_ups": { - "get": { + "/v2/catalog_types/{id}": { + "delete": { "tags": [ - "Follow-ups V2" + "Catalog V2" ], - "summary": "List Follow-ups V2", - "description": "List all follow-ups for an organisation.", - "operationId": "Follow-ups V2#List", + "summary": "DestroyType Catalog V2", + "description": "Archives a catalog type and associated entries.", + "operationId": "Catalog V2#DestroyType", "parameters": [ { - "name": "incident_id", - "in": "query", - "description": "Find follow-ups related to this incident", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "ID of this catalog type", + "required": true, "schema": { "type": "string", - "description": "Find follow-ups related to this incident", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, + } + ], + "responses": { + "204": { + "description": "No Content response." + } + } + }, + "get": { + "tags": [ + "Catalog V2" + ], + "summary": "ShowType Catalog V2", + "description": "Show a single catalog type.", + "operationId": "Catalog V2#ShowType", + "parameters": [ { - "name": "incident_mode", - "in": "query", - "description": "Filter to follow-ups from incidents of the given mode. If not set, only follow-ups from `standard` and `retrospective` incidents are returned", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "ID of this catalog type", + "required": true, "schema": { "type": "string", - "description": "Filter to follow-ups from incidents of the given mode. If not set, only follow-ups from `standard` and `retrospective` incidents are returned", - "example": "standard", - "enum": [ - "standard", - "retrospective", - "test", - "tutorial", - "stream" - ] + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "standard" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], "responses": { @@ -4442,103 +5077,159 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody6" + "$ref": "#/components/schemas/CreateTypeResponseBody" }, "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" - } - ] + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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" + } } } } } } - } - }, - "/v2/follow_ups/{id}": { - "get": { + }, + "put": { "tags": [ - "Follow-ups V2" + "Catalog V2" ], - "summary": "Show Follow-ups V2", - "description": "Get a single incident follow-up.", - "operationId": "Follow-ups V2#Show", + "summary": "UpdateType Catalog V2", + "description": "Updates an existing catalog type. The schema must be updated using the UpdateTypeSchema endpoint.", + "operationId": "Catalog V2#UpdateType", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the follow-up", + "description": "ID of this catalog type", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the follow-up", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTypeRequestBody" + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "alert", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog" + } + } + } + }, "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody6" + "$ref": "#/components/schemas/CreateTypeResponseBody" }, "example": { - "follow_up": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "categories": [ + "issue-tracker" + ], + "color": "yellow", "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" - }, + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "alert", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "priority": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 + "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 }, - "status": "outstanding", - "title": "Cat is stuck in the tree", + "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" } } @@ -4548,32 +5239,143 @@ } } }, - "/v2/incident_roles": { + "/v2/catalog_types/{id}/actions/update_schema": { + "post": { + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of this catalog type", + "required": true, + "schema": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTypeSchemaRequestBody" + }, + "example": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + } + } + } + }, + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTypeResponseBody" + }, + "example": { + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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" + } + } + } + } + } + } + } + }, + "/v2/custom_fields": { "get": { "tags": [ - "Incident Roles V2" + "Custom Fields V2" ], - "summary": "List Incident Roles V2", - "description": "List all incident roles for an organisation.", - "operationId": "Incident Roles V2#List", + "summary": "List Custom Fields V2", + "description": "List all custom fields for an organisation.", + "operationId": "Custom Fields V2#List", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody9" + "$ref": "#/components/schemas/ListResponseBody5" }, "example": { - "incident_roles": [ + "custom_fields": [ { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", + "name": "Affected Team", "updated_at": "2021-08-17T13:28:57.801578Z" } ] @@ -4585,23 +5387,22 @@ }, "post": { "tags": [ - "Incident Roles V2" + "Custom Fields V2" ], - "summary": "Create Incident Roles V2", - "description": "Create a new incident role", - "operationId": "Incident Roles V2#Create", + "summary": "Create Custom Fields V2", + "description": "Create a new custom field", + "operationId": "Custom Fields V2#Create", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody7" + "$ref": "#/components/schemas/CreateRequestBody3" }, "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" + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "name": "Affected Team" } } } @@ -4612,17 +5413,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody8" + "$ref": "#/components/schemas/ShowResponseBody5" }, "example": { - "incident_role": { + "custom_field": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", + "name": "Affected Team", "updated_at": "2021-08-17T13:28:57.801578Z" } } @@ -4632,23 +5432,23 @@ } } }, - "/v2/incident_roles/{id}": { + "/v2/custom_fields/{id}": { "delete": { "tags": [ - "Incident Roles V2" + "Custom Fields V2" ], - "summary": "Delete Incident Roles V2", - "description": "Removes an existing role", - "operationId": "Incident Roles V2#Delete", + "summary": "Delete Custom Fields V2", + "description": "Delete a custom field", + "operationId": "Custom Fields V2#Delete", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -4662,20 +5462,20 @@ }, "get": { "tags": [ - "Incident Roles V2" + "Custom Fields V2" ], - "summary": "Show Incident Roles V2", - "description": "Get a single incident role.", - "operationId": "Incident Roles V2#Show", + "summary": "Show Custom Fields V2", + "description": "Get a single custom field.", + "operationId": "Custom Fields V2#Show", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -4687,17 +5487,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody8" + "$ref": "#/components/schemas/ShowResponseBody5" }, "example": { - "incident_role": { + "custom_field": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", + "name": "Affected Team", "updated_at": "2021-08-17T13:28:57.801578Z" } } @@ -4708,20 +5507,20 @@ }, "put": { "tags": [ - "Incident Roles V2" + "Custom Fields V2" ], - "summary": "Update Incident Roles V2", - "description": "Update an existing incident role", - "operationId": "Incident Roles V2#Update", + "summary": "Update Custom Fields V2", + "description": "Update the details of a custom field", + "operationId": "Custom Fields V2#Update", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the role", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -4732,13 +5531,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRequestBody5" + "$ref": "#/components/schemas/UpdateRequestBody4" }, "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" + "description": "Which team is impacted by this issue", + "name": "Affected Team" } } } @@ -4749,17 +5546,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody8" + "$ref": "#/components/schemas/ShowResponseBody5" }, "example": { - "incident_role": { + "custom_field": { + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "role_type": "lead", - "shortform": "lead", + "name": "Affected Team", "updated_at": "2021-08-17T13:28:57.801578Z" } } @@ -4769,30 +5565,212 @@ } } }, - "/v2/incident_timestamps": { - "get": { + "/v2/escalation_paths": { + "post": { "tags": [ - "Incident Timestamps V2" + "Escalations V2" ], - "summary": "List Incident Timestamps V2", - "description": "List all incident timestamps for an organisation.", - "operationId": "Incident Timestamps V2#List", + "summary": "CreatePath Escalations V2", + "description": "Create an escalation path.\n\nAn escalation path is a series of steps that describe how a page should be escalated,\nrepresented as graph, supporting conditional branches based on alert priority and working\nintervals.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", + "operationId": "Escalations V2#CreatePath", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EscalationPathPayloadV2" + }, + "example": { + "name": "Urgent Support", + "path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] + } + } + } + }, "responses": { - "200": { - "description": "OK response.", + "201": { + "description": "Created response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody11" + "$ref": "#/components/schemas/CreatePathResponseBody" }, "example": { - "incident_timestamps": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - ] + "escalation_path": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Urgent Support", + "path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] + } } } } @@ -4800,149 +5778,382 @@ } } }, - "/v2/incident_timestamps/{id}": { - "get": { + "/v2/escalation_paths/{id}": { + "delete": { "tags": [ - "Incident Timestamps V2" + "Escalations V2" ], - "summary": "Show Incident Timestamps V2", - "description": "Get a single incident timestamp.", - "operationId": "Incident Timestamps V2#Show", + "summary": "DestroyPath Escalations V2", + "description": "Archives an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", + "operationId": "Escalations V2#DestroyPath", "parameters": [ { "name": "id", "in": "path", - "description": "Unique ID of this incident timestamp", + "description": "Unique identifier for this escalation path.", "required": true, "schema": { "type": "string", - "description": "Unique ID of this incident timestamp", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "description": "Unique identifier for this escalation path.", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody10" - }, - "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - } - } - } + "204": { + "description": "No Content response." } } - } - }, - "/v2/incident_updates": { + }, "get": { "tags": [ - "Incident Updates V2" + "Escalations V2" ], - "summary": "List Incident Updates V2", - "description": "List all incident updates for an organisation, or for a specific incident.", - "operationId": "Incident Updates V2#List", + "summary": "ShowPath Escalations V2", + "description": "Show an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", + "operationId": "Escalations V2#ShowPath", "parameters": [ { - "name": "incident_id", - "in": "query", - "description": "Incident whose updates you want to list", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "Unique identifier for this escalation path.", + "required": true, "schema": { "type": "string", - "description": "Incident whose updates you want to list", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - }, - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - }, - { - "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 + "description": "Unique identifier for this escalation path.", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": 25 - }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePathResponseBody" + }, + "example": { + "escalation_path": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Urgent Support", + "path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Escalations V2" + ], + "summary": "UpdatePath Escalations V2", + "description": "Updates an escalation path.\n\nWe recommend you create escalation paths in the incident.io dashboard where our path\nbuilder makes it easy to use conditions and visualise the path.\n", + "operationId": "Escalations V2#UpdatePath", + "parameters": [ { - "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, + "name": "id", + "in": "path", + "description": "Unique identifier for this escalation path.", + "required": 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": "Unique identifier for this escalation path.", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EscalationPathPayloadV2" + }, + "example": { + "name": "Urgent Support", + "path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] + } + } + } + }, "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody13" + "$ref": "#/components/schemas/CreatePathResponseBody" }, "example": { - "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**.", + "escalation_path": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Urgent Support", + "path": [ + { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" } - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] } } } @@ -4951,474 +6162,188 @@ } } }, - "/v2/incidents": { + "/v2/follow_ups": { "get": { "tags": [ - "Incidents V2" + "Follow-ups 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 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", + "summary": "List Follow-ups V2", + "description": "List all follow-ups for an organisation.", + "operationId": "Follow-ups V2#List", "parameters": [ { - "name": "page_size", + "name": "incident_id", "in": "query", - "description": "number of records to return", + "description": "Find follow-ups related to this incident", "allowEmptyValue": true, "schema": { - "type": "integer", - "description": "number of records to return", - "default": 25, - "example": 25, - "format": "int64" + "type": "string", + "description": "Find follow-ups related to this incident", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": 25 + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, { - "name": "after", + "name": "incident_mode", "in": "query", - "description": "An incident's ID. This endpoint will return a list of incidents after this ID in relation to the API response order.", + "description": "Filter to follow-ups from incidents of the given mode. If not set, only follow-ups from `standard` and `retrospective` incidents are returned", "allowEmptyValue": true, "schema": { "type": "string", - "description": "An incident's ID. This endpoint will return a list of incidents after this ID in relation to the API response order.", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "Filter to follow-ups from incidents of the given mode. If not set, only follow-ups from `standard` and `retrospective` incidents are returned", + "example": "standard", + "enum": [ + "standard", + "retrospective", + "test", + "tutorial", + "stream" + ] }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - { - "name": "status", - "in": "query", - "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "some_value" + "example": "standard" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseBody6" }, - "example": [ - "some_value" - ] + "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" + } + ] + } } - }, - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] } - }, + } + } + } + }, + "/v2/follow_ups/{id}": { + "get": { + "tags": [ + "Follow-ups V2" + ], + "summary": "Show Follow-ups V2", + "description": "Get a single incident follow-up.", + "operationId": "Follow-ups V2#Show", + "parameters": [ { - "name": "status_category", - "in": "query", - "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.", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "Unique identifier for the follow-up", + "required": true, "schema": { - "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" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "some_value" - }, - "example": [ - "some_value" - ] - } - }, - "example": { - "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" - ] - } - }, - { - "name": "severity", - "in": "query", - "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "some_value" - }, - "example": [ - "some_value" - ] - } - }, - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - } - }, - { - "name": "incident_type", - "in": "query", - "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "some_value" - }, - "example": [ - "some_value" - ] - } + "type": "string", + "description": "Unique identifier for the follow-up", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - } - }, - { - "name": "incident_role", - "in": "query", - "description": "Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'.", - "example": { - "01GBSQF3FHF7FWZQNWGHAVQ804": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804", - "01ET65M7ZARSFZ6TFDFVQDN9AA" - ] - } - }, - "additionalProperties": { - "type": "object", - "example": { - "abc123": [ - "value" - ] + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody6" }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "value" - }, - "example": [ - "value" - ] - } - } - }, - "example": { - "01GBSQF3FHF7FWZQNWGHAVQ804": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804", - "01ET65M7ZARSFZ6TFDFVQDN9AA" - ] - } - } - }, - { - "name": "custom_field", - "in": "query", - "description": "Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type.", - "example": { - "01GBSQF3FHF7FWZQNWGHAVQ804": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804", - "01ET65M7ZARSFZ6TFDFVQDN9AA" - ] - } - }, - "additionalProperties": { - "type": "object", "example": { - "abc123": [ - "value" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "value" - }, - "example": [ - "value" - ] + "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 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } } - }, - "example": { - "01GBSQF3FHF7FWZQNWGHAVQ804": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804", - "01ET65M7ZARSFZ6TFDFVQDN9AA" - ] - } - } - }, - { - "name": "mode", - "in": "query", - "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.", - "allowEmptyValue": true, - "schema": { - "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" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "some_value" - }, - "example": [ - "some_value" - ] - } - }, - "example": { - "one_of": [ - "retrospective" - ] } } + } + } + }, + "/v2/incident_roles": { + "get": { + "tags": [ + "Incident Roles V2" ], + "summary": "List Incident Roles V2", + "description": "List all incident roles for an organisation.", + "operationId": "Incident Roles V2#List", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody15" + "$ref": "#/components/schemas/ListResponseBody9" }, "example": { - "incidents": [ + "incident_roles": [ { - "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": "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" } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 - } + ] } } } @@ -5427,226 +6352,45 @@ }, "post": { "tags": [ - "Incidents V2" + "Incident Roles 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", + "summary": "Create Incident Roles V2", + "description": "Create a new incident role", + "operationId": "Incident Roles V2#Create", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody10" + "$ref": "#/components/schemas/CreateRequestBody7" }, "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" + "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" } } } }, "responses": { - "200": { - "description": "OK response.", + "201": { + "description": "Created response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody13" + "$ref": "#/components/schemas/ShowResponseBody8" }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", + "incident_role": { "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": "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" } } } @@ -5655,26 +6399,53 @@ } } }, - "/v2/incidents/{id}": { + "/v2/incident_roles/{id}": { + "delete": { + "tags": [ + "Incident Roles V2" + ], + "summary": "Delete Incident Roles V2", + "description": "Removes an existing role", + "operationId": "Incident Roles V2#Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier for the role", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "204": { + "description": "No Content response." + } + } + }, "get": { "tags": [ - "Incidents V2" + "Incident Roles 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", + "summary": "Show Incident Roles V2", + "description": "Get a single incident role.", + "operationId": "Incident Roles V2#Show", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier for the incident", + "description": "Unique identifier for the role", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], "responses": { @@ -5683,184 +6454,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody13" + "$ref": "#/components/schemas/ShowResponseBody8" }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", + "incident_role": { "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": "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" } } } } } } - } - }, - "/v2/incidents/{id}/actions/edit": { - "post": { + }, + "put": { "tags": [ - "Incidents V2" + "Incident Roles 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", + "summary": "Update Incident Roles V2", + "description": "Update an existing incident role", + "operationId": "Incident Roles V2#Update", "parameters": [ { "name": "id", "in": "path", - "description": "The unique identifier of the incident that you want to edit", + "description": "Unique identifier for the role", "required": true, "schema": { "type": "string", - "description": "The unique identifier of the incident that you want to edit", - "example": "01G18REBY9AYH6CMWCJ2CVCYCH" + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "01G18REBY9AYH6CMWCJ2CVCYCH" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } ], "requestBody": { @@ -5868,49 +6499,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EditRequestBody" + "$ref": "#/components/schemas/UpdateRequestBody6" }, "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." - }, - "notify_incident_channel": true + "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" } } } @@ -5921,156 +6516,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody13" + "$ref": "#/components/schemas/ShowResponseBody8" }, "example": { - "incident": { - "call_url": "https://zoom.us/foo", + "incident_role": { "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": "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" } } } @@ -6079,48 +6536,72 @@ } } }, - "/v2/managed_resources": { - "post": { + "/v2/incident_timestamps": { + "get": { "tags": [ - "Managed Resources V2" + "Incident Timestamps V2" ], - "summary": "CreateManagedResource Managed Resources V2", - "description": "Called by external providers such as Terraform, this can 'claim' an incident.io resource as being managed externally.", - "operationId": "Managed Resources V2#CreateManagedResource", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateManagedResourceRequestBody" - }, - "example": { - "annotations": { - "incident.io/terraform/version": "3.0.0" + "summary": "List Incident Timestamps V2", + "description": "List all incident timestamps for an organisation.", + "operationId": "Incident Timestamps V2#List", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseBody11" }, - "resource_id": "abc123", - "resource_type": "schedule" + "example": { + "incident_timestamps": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] + } } } } - }, + } + } + }, + "/v2/incident_timestamps/{id}": { + "get": { + "tags": [ + "Incident Timestamps V2" + ], + "summary": "Show Incident Timestamps V2", + "description": "Get a single incident timestamp.", + "operationId": "Incident Timestamps V2#Show", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique ID of this incident timestamp", + "required": true, + "schema": { + "type": "string", + "description": "Unique ID of this incident timestamp", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + }, + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + } + ], "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateManagedResourceResponseBody" + "$ref": "#/components/schemas/ShowResponseBody10" }, "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" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 } } } @@ -6129,53 +6610,53 @@ } } }, - "/v2/schedule_entries": { + "/v2/incident_updates": { "get": { "tags": [ - "Schedules V2" + "Incident Updates V2" ], - "summary": "ListScheduleEntries Schedules V2", - "description": "Get a list of schedule entries.", - "operationId": "Schedules V2#ListScheduleEntries", + "summary": "List Incident Updates V2", + "description": "List all incident updates for an organisation, or for a specific incident.", + "operationId": "Incident Updates V2#List", "parameters": [ { - "name": "schedule_id", + "name": "incident_id", "in": "query", - "description": "The ID of the schedule to get entries for.", + "description": "Incident whose updates you want to list", "allowEmptyValue": true, - "required": true, "schema": { "type": "string", - "description": "The ID of the schedule to get entries for.", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "Incident whose updates you want to list", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, { - "name": "entry_window_start", + "name": "page_size", "in": "query", - "description": "The start of the window to get entries for.", + "description": "Integer number of records to return", "allowEmptyValue": true, "schema": { - "type": "string", - "description": "The start of the window to get entries for.", - "example": "2021-01-01T00:00:00Z", - "format": "date-time" + "type": "integer", + "description": "Integer number of records to return", + "default": 25, + "example": 25, + "format": "int64", + "maximum": 500 }, - "example": "2021-01-01T00:00:00Z" + "example": 25 }, { - "name": "entry_window_end", + "name": "after", "in": "query", - "description": "The end of the window to get entries for.", + "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": "The end of the window to get entries for.", - "example": "2021-01-01T00:00:00Z", - "format": "date-time" + "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": "2021-01-01T00:00:00Z" + "example": "01FDAG4SAP5TYPT98WGR2N7W91" } ], "responses": { @@ -6184,56 +6665,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListScheduleEntriesResponseBody" + "$ref": "#/components/schemas/ListResponseBody13" }, "example": { - "pagination_meta": { - "after": "abc123", - "after_url": "abc123" - }, - "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": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - ], - "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", + "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": "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", + "name": "My test API key" + }, "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -6242,7 +6705,11 @@ "slack_user_id": "U02AYNF2XJM" } } - ] + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 } } } @@ -6251,14 +6718,14 @@ } } }, - "/v2/schedules": { + "/v2/incidents": { "get": { "tags": [ - "Schedules V2" + "Incidents V2" ], - "summary": "List Schedules V2", - "description": "List configured schedules.", - "operationId": "Schedules V2#List", + "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 created_at or updated_at\n\nFind all incidents that follow specified date parameters for created_at and updated_at fields.\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-02T00:00:00Z:\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": [ { "name": "page_size", @@ -6277,511 +6744,332 @@ { "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.", + "description": "An incident's ID. This endpoint will return a list of incidents after this ID in relation to the API response order.", "allowEmptyValue": true, "schema": { "type": "string", - "description": "A schedule's ID. This endpoint will return a list of schedules after this ID in relation to the API response order.", + "description": "An incident's ID. This endpoint will return a list of incidents 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/ListResponseBody16" + }, + { + "name": "status", + "in": "query", + "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", + "allowEmptyValue": true, + "schema": { + "type": "object", + "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" }, - "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": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Primary On-Call Schedule", - "timezone": "Europe/London", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - } + "example": [ + "some_value" + ] } + }, + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] } - } - } - }, - "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" - }, + }, + { + "name": "status_category", + "in": "query", + "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.", + "allowEmptyValue": true, + "schema": { + "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": { - "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" - } + "one_of": [ + "active" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] } + }, + "example": { + "one_of": [ + "active" + ] } - } - }, - "responses": { - "201": { - "description": "Created response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + }, + { + "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": { - "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" - } - } + "example": [ + "some_value" + ] } + }, + "example": { + "created_at[gte]": [ + "2024-05-01" + ] } - } - } - } - }, - "/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, + "name": "updated_at", + "in": "query", + "description": "Filter on incident updated at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'.", + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Unique internal ID of the schedule", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "type": "object", + "description": "Filter on incident updated at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'.", + "example": { + "updated_at[gte]": [ + "2024-05-01" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } }, - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - } - ], - "responses": { - "202": { - "description": "Accepted response." - } - } - }, - "get": { - "tags": [ - "Schedules V2" - ], - "summary": "Show Schedules V2", - "description": "Get a single schedule.", - "operationId": "Schedules V2#Show", - "parameters": [ + "example": { + "updated_at[gte]": [ + "2024-05-01" + ] + } + }, { - "name": "id", - "in": "path", - "description": "Unique internal ID of the schedule", - "required": true, + "name": "severity", + "in": "query", + "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Unique internal ID of the schedule", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "type": "object", + "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } }, - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - } - ], - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + } + }, + { + "name": "incident_type", + "in": "query", + "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", + "allowEmptyValue": true, + "schema": { + "type": "object", + "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" }, + "example": [ + "some_value" + ] + } + }, + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + } + }, + { + "name": "incident_role", + "in": "query", + "description": "Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'.", + "allowEmptyValue": true, + "schema": { + "type": "object", + "description": "Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'.", + "example": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } + }, + "additionalProperties": { + "type": "object", "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" - } + "abc123": [ + "value" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "value" + }, + "example": [ + "value" + ] } } + }, + "example": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } } - } - } - }, - "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, + "name": "custom_field", + "in": "query", + "description": "Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type.", + "allowEmptyValue": 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" - }, + "type": "object", + "description": "Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type.", "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" - } - ] - } - ] + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } + }, + "additionalProperties": { + "type": "object", + "example": { + "abc123": [ + "value" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "value" }, - "name": "My Schedule", - "timezone": "America/Los_Angeles" + "example": [ + "value" + ] } } + }, + "example": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } + } + }, + { + "name": "mode", + "in": "query", + "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.", + "allowEmptyValue": true, + "schema": { + "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" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } + }, + "example": { + "one_of": [ + "retrospective" + ] } } - }, + ], "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody14" + "$ref": "#/components/schemas/ListResponseBody15" }, "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", + "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", @@ -6789,117 +7077,376 @@ "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" - }, - { - "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" - }, - { - "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" + }, + "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" + }, + "has_debrief": false, + "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 + } + } + } + } } + } + }, + "post": { + "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", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncidentCreatePayloadV2" + }, + "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" + } + } + } + }, "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody18" + "$ref": "#/components/schemas/ShowResponseBody13" }, "example": { - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - }, - "users": [ - { - "base_role": { - "description": "Elevated permissions for the customer success team.", + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "name": "My test API key" }, - "custom_roles": [ - { - "description": "Elevated permissions for the customer success team.", + "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": "Customer Success", - "slug": "customer-success" + "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" + }, + "has_debrief": false, + "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" } - ], - "email": "lisa@incident.io", + } + ], + "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", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - ] + "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 + } } } } @@ -6907,26 +7454,26 @@ } } }, - "/v2/users/{id}": { + "/v2/incidents/{id}": { "get": { "tags": [ - "Users V2" + "Incidents V2" ], - "summary": "Show Users V2", - "description": "Get a single user.", - "operationId": "Users V2#Show", + "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", "parameters": [ { "name": "id", "in": "path", - "description": "Unique identifier of the user", + "description": "Unique identifier for the incident", "required": true, "schema": { "type": "string", - "description": "Unique identifier of the user", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FDAG4SAP5TYPT98WGR2N7W91" } ], "responses": { @@ -6935,29 +7482,157 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody16" + "$ref": "#/components/schemas/ShowResponseBody13" }, "example": { - "user": { - "base_role": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "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_roles": [ + "custom_field_entries": [ { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "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" + } + ] } ], - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "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" + }, + "has_debrief": false, + "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 } } } @@ -6966,669 +7641,238 @@ } } }, - "/v2/workflows": { - "get": { + "/v2/incidents/{id}/actions/edit": { + "post": { "tags": [ - "Workflows V2" + "Incidents 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 - } - ] - } - } - } + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The unique identifier of the incident that you want to edit", + "required": true, + "schema": { + "type": "string", + "description": "The unique identifier of the incident that you want to edit", + "example": "01G18REBY9AYH6CMWCJ2CVCYCH" + }, + "example": "01G18REBY9AYH6CMWCJ2CVCYCH" } - } - }, - "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" + "$ref": "#/components/schemas/EditRequestBody" }, "example": { - "annotations": { - "incident.io/terraform/version": "3.0.0" + "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", + "slack_channel_name_override": "inc-123-database-down", + "summary": "Our database is really really sad, and we don't know why yet." }, - "condition_groups": [ - { - "conditions": [ + "notify_incident_channel": true + } + } + } + }, + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody13" + }, + "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": [ { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" + "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" } - } - ], - "subject": "incident.severity" - } - ] - } - ], - "continue_on_step_error": true, - "delay": { - "conditions_apply_over_delay": false, - "for_seconds": 60 - }, - "expressions": [ - { - "else_branch": { - "result": { - "array_value": [ + ] + }, + "values": [ { - "literal": "SEV123", - "reference": "incident.severity" + "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" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + ] + } + ], + "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" }, - "label": "Team Slack channel", - "operations": [ + "has_debrief": false, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { - "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\"]" + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + "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" } } ], - "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": [ + "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": [ { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, "value": { - "literal": "SEV123", - "reference": "incident.severity" + "value": "2021-08-17T13:28:57.801578Z" } } - ] - } - ], - "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 + "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" }, - "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" + "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" }, - "version": 3 + "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 } } } @@ -7637,53 +7881,53 @@ } } }, - "/v2/workflows/{id}": { - "delete": { + "/v2/schedule_entries": { + "get": { "tags": [ - "Workflows V2" + "Schedules V2" ], - "summary": "DestroyWorkflow Workflows V2", - "description": "Archives a workflow", - "operationId": "Workflows V2#DestroyWorkflow", + "summary": "ListScheduleEntries Schedules V2", + "description": "Get a list of schedule entries. The endpoint will return all entries that overlap with the given window, if one is provided.", + "operationId": "Schedules V2#ListScheduleEntries", "parameters": [ { - "name": "id", - "in": "path", - "description": "Unique identifier for the workflow", + "name": "schedule_id", + "in": "query", + "description": "The ID of the schedule to get entries for.", + "allowEmptyValue": true, "required": true, "schema": { "type": "string", - "description": "Unique identifier for the workflow", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The ID of the schedule to get entries for.", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "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": [ + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, { - "name": "id", - "in": "path", - "description": "Unique identifier for the workflow", - "required": true, + "name": "entry_window_start", + "in": "query", + "description": "The start of the window to get entries for.", + "allowEmptyValue": true, "schema": { "type": "string", - "description": "Unique identifier for the workflow", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The start of the window to get entries for.", + "example": "2021-01-01T00:00:00Z", + "format": "date-time" }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "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": { @@ -7692,453 +7936,631 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowWorkflowResponseBody" + "$ref": "#/components/schemas/ListScheduleEntriesResponseBody" }, "example": { - "management_meta": { - "annotations": { - "incident.io/terraform/version": "3.0.0" - }, - "managed_by": "dashboard", - "source_url": "https://github.com/my-company/infrastructure" + "pagination_meta": { + "after": "abc123", + "after_url": "abc123" }, - "workflow": { - "condition_groups": [ + "schedule_entries": { + "final": [ { - "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" + "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" + } } ], - "folder": "My folder 01", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "include_private_incidents": true, - "name": "My workflow", - "once_for": [ + "overrides": [ { - "array": false, - "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", - "label": "Incident -> Affected Team", - "type": "IncidentSeverity" + "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" + } } ], - "runs_from": "2021-08-17T13:28:57.801578Z", - "runs_on_incident_modes": [ - "standard", - "retrospective" - ], - "runs_on_incidents": "newly_created", - "state": "active", - "steps": [ + "scheduled": [ { - "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" - } - } - ] + "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" + } } - ], - "trigger": { - "label": "Incident Updated", - "name": "incident.updated" - }, - "version": 3 + ] } } } } } } - }, - "put": { + } + }, + "/v2/schedule_overrides": { + "post": { "tags": [ - "Workflows V2" + "Schedules V2" ], - "summary": "UpdateWorkflow Workflows V2", - "description": "Updates a workflow", - "operationId": "Workflows V2#UpdateWorkflow", + "summary": "CreateOverride Schedules V2", + "description": "Create a new schedule override.", + "operationId": "Schedules V2#CreateOverride", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleOverrideCreatePayloadV2" + }, + "example": { + "end_at": "2021-08-17T14:00:00.000000Z", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "schedule_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:00:00.000000Z", + "user": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + } + } + } + }, + "responses": { + "201": { + "description": "Created response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOverrideResponseBody" + }, + "example": { + "override": { + "created_at": "2021-08-17T13:28:57.801578Z", + "end_at": "2021-08-17T13:28:57.801578Z", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "schedule_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "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" + } + } + } + } + } + } + } + } + }, + "/v2/schedules": { + "get": { + "tags": [ + "Schedules V2" + ], + "summary": "List Schedules V2", + "description": "List configured schedules.", + "operationId": "Schedules V2#List", "parameters": [ { - "name": "id", - "in": "path", - "description": "ID of the workflow to update", - "required": true, + "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": "ID of the workflow to update", - "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" }, - "examples": { - "default": { - "summary": "default", - "value": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseBody16" + }, + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "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/UpdateWorkflowRequestBody" + "$ref": "#/components/schemas/CreateRequestBody9" }, "example": { - "annotations": { - "incident.io/terraform/version": "3.0.0" - }, - "condition_groups": [ - { - "conditions": [ + "schedule": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ { - "operation": "one_of", - "param_bindings": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + "interval": 1, + "interval_type": "daily" } ], - "subject": "incident.severity" - } - ] - } - ], - "continue_on_step_error": true, - "delay": { - "conditions_apply_over_delay": false, - "for_seconds": 60 - }, - "expressions": [ - { - "else_branch": { - "result": { - "array_value": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "literal": "SEV123", - "reference": "incident.severity" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + "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" + } + ] } - }, - "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" - } - } + ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "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" + }, + "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" } ], - "returns": { - "array": true, - "type": "IncidentStatus" - } - }, - "filter": { - "condition_groups": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] + "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" } ] - }, - "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" - }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + } + ] + }, + "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" } } ], - "reference": "abc123", - "root_reference": "incident.status" + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "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": [ + } + } + } + } + } + } + }, + "/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" + }, + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + } + ], + "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": [ { - "array_value": [ + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + } + } + } + } + }, + "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/UpdateRequestBody8" + }, + "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": [ { - "literal": "SEV123", - "reference": "incident.severity" + "interval": 1, + "interval_type": "daily" } ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + "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" + } + ] } ] - } - ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } } } } @@ -8149,1521 +8571,11924 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowWorkflowResponseBody" + "$ref": "#/components/schemas/ShowResponseBody14" }, "example": { - "management_meta": { + "schedule": { "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" + "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" + } } ], - "continue_on_step_error": true, - "delay": { - "conditions_apply_over_delay": false, - "for_seconds": 60 + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] }, - "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": [ - { + "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" + }, + { + "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" + }, + { + "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" } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" } - ], - "subject": { - "label": "Incident Severity", - "reference": "incident.severity" } + ] + } + ], + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } - ] - } - ], - "result": { - "array_value": [ - { + ], + "value": { "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" } } + ], + "returns": { + "array": true, + "type": "IncidentStatus" } - ], - "returns": { - "array": true, - "type": "IncidentStatus" - } - }, - "filter": { - "condition_groups": [ - { - "conditions": [ - { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, - "param_bindings": [ - { - "array_value": [ - { + }, + "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" } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" } + ], + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" } - ], - "subject": { - "label": "Incident Severity", - "reference": "incident.severity" } - } - ] - } - ] - }, - "navigate": { - "reference": "1235", - "reference_label": "Teams" - }, - "operation_type": "navigate", - "parse": { + ] + } + ] + }, + "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" - }, - "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": [ + ], + "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", + "shortform": "abc123", + "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/CreateWorkflowPayload" + }, + "example": { + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ + { + "conditions": [ { - "for_each": "abc123", - "id": "abc123", - "label": "PagerDuty Escalate", - "name": "pagerduty.escalate", + "operation": "one_of", "param_bindings": [ { "array_value": [ { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } } - ] + ], + "subject": "incident.severity" } - ], - "trigger": { - "label": "Incident Updated", - "name": "incident.updated" - }, + ] + } + ], + "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", + "shortform": "abc123", + "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", + "shortform": "abc123", + "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" + } + } + }, + "/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", + "shortform": "abc123", + "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/UpdateWorkflowPayload" + }, + "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", + "shortform": "abc123", + "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", + "shortform": "abc123", + "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": { + "APIKeyV1": { + "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" + ] + }, + "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/UserV2" + }, + "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" + ] + }, + "ActorV1": { + "type": "object", + "properties": { + "api_key": { + "$ref": "#/components/schemas/APIKeyV1" + }, + "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" + } + } + }, + "ActorV2": { + "type": "object", + "properties": { + "api_key": { + "$ref": "#/components/schemas/APIKeyV2" + }, + "user": { + "$ref": "#/components/schemas/UserV2" + } + }, + "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" + ] + }, + "AlertAttributeBinding": { + "type": "object", + "properties": { + "array_value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertAttributeValue" + }, + "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", + "sort_key": "000020" + } + ] + }, + "value": { + "$ref": "#/components/schemas/AlertAttributeValue" + } + }, + "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", + "sort_key": "000020" + } + ], + "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", + "sort_key": "000020" + } + } + }, + "AlertAttributeValue": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryReference" + }, + "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" + }, + "sort_key": { + "type": "string", + "description": "Gives an indication of how to sort the options when displayed to the user", + "example": "000020" + } + }, + "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", + "sort_key": "000020" + }, + "required": [ + "label", + "sort_key" + ] + }, + "AlertDefinitionsV2": { + "type": "object", + "properties": { + "alert_source_config": { + "$ref": "#/components/schemas/AlertSourceConfigSlim" + }, + "alert_source_config_id": { + "type": "string", + "description": "Which alert source config produced this alert", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "attribute_values": { + "type": "object", + "description": "Attribute values parsed into the alert", + "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", + "sort_key": "000020" + } + ], + "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", + "sort_key": "000020" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/AlertAttributeBinding" + } + }, + "created_at": { + "type": "string", + "description": "When this entry was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "dashboard_url": { + "type": "string", + "description": "If applicable, a link to the dashboard for this alert", + "example": "https://my-dashboard.com/alerts/123" + }, + "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": { + "$ref": "#/components/schemas/TextDocument" + }, + "evaluation_failures": { + "type": "object", + "description": "Attributes that we failed to evaluate and why", + "example": { + "abc123": "abc123" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "id": { + "type": "string", + "description": "The ID of this alert", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "image_urls": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "URLs of images associated with this alert", + "example": [ + "abc123" + ] + }, + "payload": { + "type": "string", + "description": "JSON payload that this alert was created from", + "example": "abc123" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + }, + "priority_id": { + "type": "string", + "description": "The priority of this alert", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "resolved_at": { + "type": "string", + "description": "When this alert was resolved", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "silence_url": { + "type": "string", + "description": "If applicable, a link to silence this alert", + "example": "https://my-dashboard.com/alerts/123/silence" + }, + "source_type": { + "type": "string", + "description": "Type of alert source", + "example": "alertmanager", + "enum": [ + "alertmanager", + "app_optics", + "azure_monitor", + "bugsnag", + "checkly", + "chronosphere", + "cloudwatch", + "cloudflare", + "cronitor", + "crowdstrike_falcon", + "datadog", + "dynatrace", + "elasticsearch", + "email", + "expel", + "github_issue", + "google_cloud", + "grafana", + "http", + "honeycomb", + "incoming_calls", + "jira", + "monte_carlo", + "nagios", + "new_relic", + "opsgenie", + "prtg", + "pager_duty", + "panther", + "pingdom", + "runscope", + "sns", + "sentry", + "splunk", + "status_cake", + "status_page_views", + "sumo_logic", + "uptime", + "zendesk" + ] + }, + "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": "Statuses of an 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" + }, + "updated_at": { + "type": "string", + "description": "When this alert was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "alert_source_config": { + "archived_at": "2021-08-17T13:28:57.801578Z", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "name": "Production Web Dashboard Alerts", + "source_type": "alertmanager" + }, + "alert_source_config_id": "01GW2G3V0S59R238FAHPDS1R66", + "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", + "sort_key": "000020" + } + ], + "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", + "sort_key": "000020" + } + } + }, + "created_at": "2021-08-17T13:28:57.801578Z", + "dashboard_url": "https://my-dashboard.com/alerts/123", + "deduplication_key": "4293868629", + "description": { + "markdown": "There's a snake in my boot", + "text_node": { + "attrs": { + "level": 3 + }, + "content": [ + {} + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" + } + }, + "evaluation_failures": { + "abc123": "abc123" + }, + "id": "01GW2G3V0S59R238FAHPDS1R66", + "image_urls": [ + "abc123" + ], + "payload": "abc123", + "priority": { + "archived_at": "2021-08-17T13:28:57.801578Z", + "description": { + "attrs": { + "level": 3 + }, + "content": [ + {} + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" + }, + "id": "01GW2G3V0S59R238FAHPDS1R66", + "is_default": true, + "name": "P1", + "rank": 1, + "slugs": [ + "p1", + "priority-1" + ] + }, + "priority_id": "01GW2G3V0S59R238FAHPDS1R66", + "resolved_at": "2021-08-17T14:28:57.801578Z", + "silence_url": "https://my-dashboard.com/alerts/123/silence", + "source_type": "alertmanager", + "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", + "status": "firing", + "title": "*errors.withMessage: PG::Error failed to connect", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "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" + ] + }, + "AlertRouteAlertSource": { + "type": "object", + "properties": { + "alert_source_id": { + "type": "string", + "description": "The alert source ID that will match for the route", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroup" + }, + "description": "What conditions should alerts from this source meet to be included in this alert route?", + "example": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + } + }, + "example": { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "required": [ + "alert_source_id", + "condition_groups" + ] + }, + "AlertRouteAlertSourcePayloadV2": { + "type": "object", + "properties": { + "alert_source_id": { + "type": "string", + "description": "The alert source ID that will match for the route", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "What conditions should alerts from this source meet to be included in this alert route?", + "example": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } + }, + "example": { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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": [ + "alert_source_id", + "condition_groups" + ] + }, + "AlertRouteDefinitionsV2": { + "type": "object", + "properties": { + "alert_sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteAlertSource" + }, + "description": "Which alert sources should this alert route match?", + "example": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + } + ] + }, + "auto_decline_enabled": { + "type": "boolean", + "description": "Should triage incidents be declined when alerts are resolved?", + "example": false + }, + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "What condition groups must be true for this alert route to fire?", + "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" + } + } + ] + } + ] + }, + "defer_time_seconds": { + "type": "integer", + "description": "How long should the escalation defer time be?", + "example": 1, + "format": "int64" + }, + "enabled": { + "type": "boolean", + "description": "Whether this alert route is enabled or not", + "example": false + }, + "escalation_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteEscalationBindingV2" + }, + "description": "Which escalation paths should this alert route escalate to?", + "example": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ] + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionV2" + }, + "description": "The expressions used in this template", + "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" + } + ] + }, + "grouping_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupingKeyV2" + }, + "description": "Which attributes should this alert route use to group alerts?", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ] + }, + "grouping_window_seconds": { + "type": "integer", + "description": "How large should the grouping window be?", + "example": 1, + "format": "int64" + }, + "id": { + "type": "string", + "description": "Unique identifier for this alert route config", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "What condition groups must be true for this alert route to create an incident?", + "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" + } + } + ] + } + ] + }, + "incident_enabled": { + "type": "boolean", + "description": "Whether this alert route will create incidents or not", + "example": false + }, + "last_fired_at": { + "type": "string", + "example": "abc123" + }, + "name": { + "type": "string", + "description": "The name of this alert route config, for the user's reference", + "example": "Production incidents" + }, + "template": { + "$ref": "#/components/schemas/AlertRouteIncidentTemplateV2" + } + }, + "example": { + "alert_sources": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + ] + } + ], + "auto_decline_enabled": false, + "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" + } + } + ] + } + ], + "defer_time_seconds": 1, + "enabled": false, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_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" + } + } + ] + } + ], + "incident_enabled": false, + "last_fired_at": "abc123", + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + } + }, + "AlertRouteEscalationBindingPayloadV2": { + "type": "object", + "properties": { + "binding": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "example": { + "binding": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "required": [ + "binding" + ] + }, + "AlertRouteEscalationBindingV2": { + "type": "object", + "properties": { + "binding": { + "$ref": "#/components/schemas/EngineParamBindingV2" + } + }, + "example": { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "required": [ + "binding" + ] + }, + "AlertRouteIncidentTemplatePayloadV2": { + "type": "object", + "properties": { + "custom_field_priorities": { + "type": "object", + "description": "lookup of the priority options for each custom field in the template", + "example": { + "abc123": "abc123" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "custom_fields": { + "type": "object", + "description": "Custom field keys mapped to values", + "example": { + "custom_field_10014": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "incident_mode": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "incident_type": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "name": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "priority_severity": { + "type": "string", + "description": "option defining whether to cause subsequent alerts to increase the severity", + "example": "severity-first-wins", + "enum": [ + "severity-first-wins", + "severity-max" + ] + }, + "severity": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "summary": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + }, + "workspace": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "example": { + "custom_field_priorities": { + "abc123": "abc123" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "required": [ + "custom_field_priorities", + "priority_severity" + ] + }, + "AlertRouteIncidentTemplateV2": { + "type": "object", + "properties": { + "custom_field_priorities": { + "type": "object", + "description": "lookup of the priority options for each custom field in the template", + "example": { + "abc123": "first-wins" + }, + "additionalProperties": { + "type": "string", + "example": "first-wins", + "enum": [ + "first-wins", + "last-wins", + "append" + ] + } + }, + "custom_fields": { + "type": "object", + "description": "Custom field keys mapped to values", + "example": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingV2" + } + }, + "incident_mode": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "incident_type": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "name": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "priority_severity": { + "type": "string", + "description": "binding to use to resolve the workspace to create an incident in", + "example": "severity-first-wins", + "enum": [ + "severity-first-wins", + "severity-max" + ] + }, + "severity": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "summary": { + "$ref": "#/components/schemas/EngineParamBindingV2" + }, + "workspace": { + "$ref": "#/components/schemas/EngineParamBindingV2" + } + }, + "example": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "required": [ + "custom_field_priorities", + "priority_severity" + ] + }, + "AlertRoutePayloadV2": { + "type": "object", + "properties": { + "alert_sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteAlertSourcePayloadV2" + }, + "description": "Which alert sources should this alert route match?", + "example": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } + ] + }, + "auto_decline_enabled": { + "type": "boolean", + "description": "Should triage incidents be declined when alerts are resolved?", + "example": false + }, + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "What condition groups must be true for this alert route to fire?", + "example": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "defer_time_seconds": { + "type": "integer", + "description": "How long should the escalation defer time be?", + "example": 1, + "format": "int64" + }, + "enabled": { + "type": "boolean", + "description": "Whether this alert route is enabled or not", + "example": false + }, + "escalation_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteEscalationBindingPayloadV2" + }, + "description": "Which escalation paths should this alert route escalate to?", + "example": [ + { + "binding": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ] + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionPayloadV2" + }, + "description": "The expressions used in this template", + "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" + } + ] + }, + "grouping_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupingKeyV2" + }, + "description": "Which attributes should this alert route use to group alerts?", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ] + }, + "grouping_window_seconds": { + "type": "integer", + "description": "How large should the grouping window be?", + "example": 1, + "format": "int64" + }, + "incident_condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "What condition groups must be true for this alert route to create an incident?", + "example": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + }, + "incident_enabled": { + "type": "boolean", + "description": "Whether this alert route will create incidents or not", + "example": false + }, + "name": { + "type": "string", + "description": "The name of this alert route config, for the user's reference", + "example": "Production incidents" + }, + "template": { + "$ref": "#/components/schemas/AlertRouteIncidentTemplatePayloadV2" + } + }, + "example": { + "alert_sources": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } + ], + "auto_decline_enabled": false, + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "defer_time_seconds": 1, + "enabled": false, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "incident_condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "incident_enabled": false, + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "abc123" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + } + }, + "AlertRouteV2": { + "type": "object", + "properties": { + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "What condition groups must be true for this alert route to fire?", + "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" + } + } + ] + } + ] + }, + "defer_time_seconds": { + "type": "integer", + "description": "How long should the escalation defer time be?", + "example": 1, + "format": "int64" + }, + "escalation_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteEscalationBindingV2" + }, + "description": "Which escalation paths should this alert route escalate to?", + "example": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ] + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionV2" + }, + "description": "The expressions used in this template", + "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" + } + ] + }, + "grouping_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupingKeyV2" + }, + "description": "Which attributes should this alert route use to group alerts?", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ] + }, + "grouping_window_seconds": { + "type": "integer", + "description": "How large should the grouping window be?", + "example": 1, + "format": "int64" + }, + "id": { + "type": "string", + "description": "Unique identifier for this alert route config", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "The name of this alert route config, for the user's reference", + "example": "Production incidents" + }, + "template": { + "$ref": "#/components/schemas/AlertRouteIncidentTemplateV2" + } + }, + "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" + } + } + ] + } + ], + "defer_time_seconds": 1, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + }, + "required": [ + "id", + "name", + "condition_groups", + "grouping_keys", + "grouping_window_seconds", + "defer_time_seconds", + "escalation_bindings", + "auto_decline_enabled", + "enabled", + "incident_enabled", + "is_private", + "incident_condition_groups", + "alert_sources", + "auto_cancel_escalations" + ] + }, + "AlertSourceConfigSlim": { + "type": "object", + "properties": { + "archived_at": { + "type": "string", + "description": "When this type was archived", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The ID of this alert source", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "name": { + "type": "string", + "description": "Unique name of the alert source", + "example": "Production Web Dashboard Alerts" + }, + "source_type": { + "type": "string", + "description": "Type of alert source", + "example": "alertmanager", + "enum": [ + "alertmanager", + "app_optics", + "azure_monitor", + "bugsnag", + "checkly", + "chronosphere", + "cloudwatch", + "cloudflare", + "cronitor", + "crowdstrike_falcon", + "datadog", + "dynatrace", + "elasticsearch", + "email", + "expel", + "github_issue", + "google_cloud", + "grafana", + "http", + "honeycomb", + "incoming_calls", + "jira", + "monte_carlo", + "nagios", + "new_relic", + "opsgenie", + "prtg", + "pager_duty", + "panther", + "pingdom", + "runscope", + "sns", + "sentry", + "splunk", + "status_cake", + "status_page_views", + "sumo_logic", + "uptime", + "zendesk" + ] + } + }, + "example": { + "archived_at": "2021-08-17T13:28:57.801578Z", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "name": "Production Web Dashboard Alerts", + "source_type": "alertmanager" + }, + "required": [ + "id", + "name", + "source_type" + ] + }, + "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" + }, + "has_debrief": false, + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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" + }, + "has_debrief": false, + "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 + }, + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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" + }, + "has_debrief": false, + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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" + ] + }, + "AuditLogAPIKeyMetadataV2": { + "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" + } + }, + "example": { + "api_key_roles": "abc123" + } + }, + "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" + ] + }, + "AuditLogEntryBaseV2": { + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "custom_field.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 target of the entry", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "John Doe", + "type": "user" + } + ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" + } + }, + "example": { + "action": "custom_field.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": "John Doe", + "type": "user" + } + ], + "version": 1 + }, + "required": [ + "action", + "occurred_at", + "version", + "actor", + "targets", + "context" + ] + }, + "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" + ] + }, + "AuditLogExternalResourceMetadataV2": { + "type": "object", + "properties": { + "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" + } + }, + "example": { + "external_resource_external_id": "q1234", + "external_resource_type": "pager_duty_incident" + } + }, + "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", + "holiday_user_feed", + "incident", + "incident_call_setting", + "incident_duration_metric", + "incident_role", + "incident_status", + "incident_timestamp", + "incident_type", + "integration", + "internal_status_page", + "nudge", + "policy", + "post_incident_task", + "postmortem_template", + "postmortem_template_section", + "private_incident_membership", + "rbac_role", + "scim_group", + "schedule", + "severity", + "status_page", + "status_page_sub_page", + "status_page_template", + "user", + "workflow" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "John Doe", + "type": "user" + }, + "required": [ + "id", + "type" + ] + }, + "AuditLogUserActorMetadataV2": { + "type": "object", + "properties": { + "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": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + } + }, + "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" + } + }, + "CatalogEntryDefinitionsV2": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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" + } + }, + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" + } + } + }, + "CatalogEntryEngineParamBindingValueV2": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryReferenceV2" + }, + "helptext": { + "type": "string", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "example": "abc123" + }, + "image_url": { + "type": "string", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "example": "abc123" + }, + "is_image_slack_icon": { + "type": "boolean", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "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": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "example": "incident.severity" + }, + "sort_key": { + "type": "string", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "example": "abc123" + }, + "unavailable": { + "type": "boolean", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "example": false + }, + "value": { + "type": "string", + "description": "This field is deprecated. It will not be present in any responses, and will be removed in a future version", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" + }, + "required": [ + "label", + "sort_key" + ] + }, + "CatalogEntryReference": { + "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" + ] + }, + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "", + "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": "", + "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": "", + "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": "", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + }, + "required": [ + "id", + "mode", + "name", + "type", + "array" + ] + }, + "CatalogTypeDefinitionsV2": { + "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" + } + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "example": "customer", + "enum": [ + "customer", + "issue-tracker", + "product-feature", + "service", + "on-call", + "team", + "user" + ] + }, + "description": "What categories is this type considered part of", + "example": [ + "customer" + ] + }, + "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" + }, + "engine_resource_type": { + "type": "string", + "description": "The way this resource type is referenced in the engine", + "example": "CatalogType[\"PagerDutyService\"]" + }, + "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": "alert", + "enum": [ + "alert", + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "escalation-path", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "status-page", + "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" + }, + "mode": { + "type": "string", + "description": "What mode is this catalog type?", + "example": "manual", + "enum": [ + "manual", + "external", + "internal" + ] + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" + }, + "native_resource_path": { + "type": "string", + "description": "If present, the path to view this resource natively in the web UI", + "example": "/on-call/escalation-paths" + }, + "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_integration": { + "type": "string", + "description": "If populated, the integration required for this type", + "example": "asana", + "enum": [ + "asana", + "statuspage", + "click_up", + "confluence", + "cortex", + "datadog", + "github", + "gitlab", + "google_docs", + "google_meet", + "google_calendar", + "google_workspace", + "jira", + "jira_server", + "linear", + "microsoft_teams", + "notion", + "opsgenie", + "opslevel", + "pagerduty", + "salesforce", + "sentry", + "service_now", + "shortcut", + "scim", + "slack", + "splunk_on_call", + "incident_io_status_pages", + "incident_io_on_call", + "vanta", + "webhooks", + "zendesk", + "zoom" + ] + }, + "schema": { + "$ref": "#/components/schemas/CatalogTypeSchemaV2" + }, + "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" + }, + "use_name_as_identifier": { + "type": "boolean", + "description": "If populated, the name of the entry will be added to the list of identifiers for this type", + "example": true + } + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "customer" + ], + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "engine_resource_type": "CatalogType[\"PagerDutyService\"]", + "estimated_count": 7, + "icon": "alert", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "mode": "manual", + "name": "Kubernetes Cluster", + "native_resource_path": "/on-call/escalation-paths", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integration": "asana", + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "", + "name": "tier", + "path": [ + { + "attribute_id": "abc123", + "attribute_name": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z", + "use_name_as_identifier": true + } + }, + "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": "", + "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": "", + "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" + } + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "example": "customer", + "enum": [ + "customer", + "issue-tracker", + "product-feature", + "service", + "on-call", + "team", + "user" + ] + }, + "description": "What categories is this type considered part of", + "example": [ + "customer" + ] + }, + "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": "alert", + "enum": [ + "alert", + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "escalation-path", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "status-page", + "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": "What type of resource this catalog type should be understodd as", + "example": "abc123" + }, + "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" + }, + "categories": [ + "customer" + ], + "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": "alert", + "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": "", + "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", + "categories", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "engine_resource_type", + "mode", + "use_name_as_identifier" + ] + }, + "Condition": { + "type": "object", + "properties": { + "operation": { + "$ref": "#/components/schemas/ConditionOperation" + }, + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBinding" + }, + "description": "Bindings for the operation 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" + } + ], + "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" + } + } + ] + }, + "params": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParam" + }, + "description": "Type information for the operation parameters", + "example": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ] + }, + "subject": { + "$ref": "#/components/schemas/ConditionSubject" + } + }, + "example": { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + }, + "required": [ + "subject", + "operation", + "params", + "param_bindings" + ] + }, + "ConditionGroup": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "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": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + } + }, + "example": { + "conditions": [ + { + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ + { + "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" + } + } + ], + "params": [ + { + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ], + "subject": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + } + } + ] + }, + "required": [ + "conditions" + ] + }, + "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" + ] + }, + "ConditionOperation": { + "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", + "sort_key" + ] + }, + "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" + ] + }, + "ConditionSubject": { + "type": "object", + "properties": { + "color": { + "type": "string", + "description": "String telling the UI what color to use for this field, if applicable", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] + }, + "icon": { + "type": "string", + "description": "String telling the UI what icon to use for this field", + "example": "action", + "enum": [ + "action", + "alert", + "announcement", + "bolt", + "toggle-left", + "book", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "chart", + "checkmark", + "clipboard", + "clock", + "close", + "cog", + "components", + "custom_field", + "database", + "delete", + "doc", + "email", + "escalate", + "escalation-path", + "exclamation", + "export", + "external-link", + "files", + "flag", + "folder", + "follow_ups", + "git-branch-new", + "globe", + "incident", + "incident_type", + "key", + "lock", + "ms-teams", + "merge", + "message", + "money", + "mug", + "number-input", + "on-call", + "priority", + "private", + "text-align-left", + "search", + "server", + "severity", + "slack", + "slack-greyscale", + "slack_channel", + "slack_team", + "star", + "status", + "status-page", + "store", + "tag", + "test", + "text", + "timestamp", + "triage", + "user", + "users", + "warning" + ] + }, + "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": { + "color": "yellow", + "icon": "action", + "label": "Incident Severity", + "reference": "incident.severity" + }, + "required": [ + "label", + "icon", + "reference" + ] + }, + "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", + "params" + ] + }, + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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. Supports markdown.", + "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" + ] + }, + "CreateOverrideResponseBody": { + "type": "object", + "properties": { + "override": { + "$ref": "#/components/schemas/ScheduleOverrideV2" + } + }, + "example": { + "override": { + "created_at": "2021-08-17T13:28:57.801578Z", + "end_at": "2021-08-17T13:28:57.801578Z", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "schedule_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "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": [ + "override" + ] + }, + "CreatePathResponseBody": { + "type": "object", + "properties": { + "escalation_path": { + "$ref": "#/components/schemas/EscalationPathV2" + } + }, + "example": { + "escalation_path": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Urgent Support", + "path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "user", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] + } + ] + } + }, + "required": [ + "escalation_path" + ] + }, + "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": { + "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", + "example": "01ET65M7ZADYFCKD4K1AE2QNMC" + }, + "user_id": { + "type": "string", + "example": "01FCQSP07Z74QMMYPDDGQB9FTG" + } + }, + "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 + }, + "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" + } + }, + "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", + "role_type", + "created_at", + "updated_at" + ] + }, + "CreateRequestBody7": { + "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 + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead" + } + }, + "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" + }, + "required": [ + "name", + "shortform", + "description", + "instructions", + "condition_groups", + "id", + "role_type", + "created_at", + "updated_at" + ] + }, + "CreateRequestBody8": { + "type": "object", + "properties": { + "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" + ] + }, + "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": { + "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": { + "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" + } + ] + } + ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + }, + "required": [ + "schedule" + ] + }, + "CreateResponseBody": { + "type": "object", + "properties": { + "alert_route": { + "$ref": "#/components/schemas/AlertRouteV2" + } + }, + "example": { + "alert_route": { + "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" + } + } + ] + } + ], + "defer_time_seconds": 1, + "escalation_bindings": [ + { + "binding": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "first-wins" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "incident_mode": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + } }, "required": [ - "id", - "name", - "roles", - "created_by" + "alert_route" ] }, - "ActionV1": { + "CreateResponseBody2": { "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" + "incident_attachment": { + "$ref": "#/components/schemas/IncidentAttachmentV1" } }, "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" + "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" + } } }, - "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" + "incident_attachment" ] }, - "ActorV2": { + "CreateResponseBody3": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/APIKeyV2" - }, - "user": { - "$ref": "#/components/schemas/UserV1" + "incident_membership": { + "$ref": "#/components/schemas/IncidentMembership" } }, "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" + "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" + } } }, - "example": { - "after": "abc123", - "after_url": "abc123" - }, "required": [ - "after", - "after_url" + "incident_membership" ] }, - "AlertResult": { + "CreateTypeRequestBody": { "type": "object", "properties": { - "deduplication_key": { - "type": "string", - "description": "The deduplication key that the event has been processed with", - "example": "unique-key", - "enum": [ - "unique-key" + "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" + } + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "example": "issue-tracker", + "enum": [ + "customer", + "issue-tracker", + "product-feature", + "service", + "on-call", + "team", + "user" + ] + }, + "description": "What categories is this type considered part of", + "example": [ + "issue-tracker" ] }, - "message": { + "color": { "type": "string", - "description": "Human readable message giving detail about the event", - "example": "Event accepted for processing", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", "enum": [ - "Event accepted for processing" + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" ] }, - "status": { + "description": { "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": { + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." + }, + "icon": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_created_v2", + "description": "Sets the display icon of this type in the dashboard", + "example": "alert", "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" + "alert", + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "escalation-path", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "status-page", + "store", + "star", + "tag", + "user", + "users" ] }, - "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" + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" }, - "private_incident.incident_updated_v2": { - "id": "abc123" + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true }, - "private_incident.membership_granted_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" + "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" }, - "private_incident.membership_revoked_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" + "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" }, - "public_incident.action_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "categories": [ + "issue-tracker" + ], + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "alert", + "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" }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "categories": [ + "issue-tracker" + ], + "color": "yellow", "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": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "alert", "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" + "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 }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", + "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" - }, - "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" + } + }, + "required": [ + "catalog_type" + ] + }, + "CreateWorkflowPayload": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" }, - "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.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" + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "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" + "description": "List of conditions to apply to the workflow", + "example": [ + { + "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" }, - "custom_field_entries": [ + "description": "The expressions used in 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" + "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 - } - ], - "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" - } + ], + "reference": "abc123", + "root_reference": "incident.status" } - ], - "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" + ] + }, + "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" }, - "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" + "description": "Once For strategy to apply to this workflow", + "example": [ + "incident.url" + ] + }, + "runs_on_incident_modes": { + "type": "array", + "items": { + "type": "string", + "description": "Incident mode that workflows can run on", + "example": "standard", + "enum": [ + "standard", + "test", + "retrospective" + ] }, - "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 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" + ] }, - "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": [ + "shortform": { + "type": "string", + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" + }, + "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": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "literal": "SEV123", + "reference": "incident.severity" } - ] - }, - "values": [ + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] + } + ] + }, + "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": [ { - "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" + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ] + ], + "subject": "incident.severity" } - ], - "duration_metrics": [ - { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + ] + } + ], + "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" + } } - ], - "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": [ + "label": "Team Slack channel", + "operations": [ { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "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" + } }, - "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" + "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\"]" } } ], - "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": [ + "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", + "shortform": "abc123", + "state": "active", + "steps": [ + { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], "value": { - "value": "2021-08-17T13:28:57.801578Z" + "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": "incident.updated" + }, + "required": [ + "name", + "trigger", + "once_for", + "condition_groups", + "steps", + "expressions", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents" + ] + }, + "CustomFieldEntryPayloadV1": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this entry is linked against", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValuePayloadV1" }, - "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" + "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": { + "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": [ + "custom_field_id", + "values" + ] + }, + "CustomFieldEntryPayloadV2": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this entry is linked against", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValuePayloadV2" }, - "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" + "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": { + "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": [ + "custom_field_id", + "values" + ] + }, + "CustomFieldEntryV1": { + "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" + } + ] + } + }, + "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" + } + ] }, - "public_incident.incident_updated_v2": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" + "name": "Primary On-call" }, - "user": { - "email": "lisa@incident.io", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + }, + "required": [ + "custom_field", + "values" + ] + }, + "CustomFieldEntryV2": { + "type": "object", + "properties": { + "custom_field": { + "$ref": "#/components/schemas/CustomFieldTypeInfoV2" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValueV2" }, - "custom_field_entries": [ + "description": "List of custom field values set on this entry", + "example": [ { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "name": "Primary On-call" }, - "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" - } - ] + "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": [ + ] + } + }, + "example": { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + ] + }, + "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" + } + ] + }, + "required": [ + "custom_field", + "values" + ] + }, + "CustomFieldOptionDefinitionsV1": { + "type": "object", + "properties": { + "archived_at": { + "type": "string", + "description": "When this option was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field option", + "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": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + }, + "CustomFieldOptionDefinitionsV2": { + "type": "object", + "properties": { + "archived_at": { + "type": "string", + "description": "When this option was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field option", + "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": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + }, + "CustomFieldOptionPayloadV1": { + "type": "object", + "example": {}, + "required": [ + "custom_field_id", + "value" + ] + }, + "CustomFieldOptionPayloadV2": { + "type": "object", + "example": {}, + "required": [ + "custom_field_id", + "value" + ] + }, + "CustomFieldOptionV1": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field option", + "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", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "required": [ + "id", + "custom_field_id", + "value", + "sort_key" + ] + }, + "CustomFieldOptionV2": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field option", + "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", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "required": [ + "id", + "custom_field_id", + "value", + "sort_key" + ] + }, + "CustomFieldTypeInfoV1": { + "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" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "description": "What options are available for this custom field, if this field has options", + "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" - } + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ], - "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" + ] + } + }, + "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" + } + ] + }, + "required": [ + "id", + "organisation_id", + "name", + "description", + "dynamic_options", + "rank", + "field_type", + "cannot_be_unset", + "options", + "is_usable", + "condition_groups", + "field_mode", + "created_at", + "updated_at" + ] + }, + "CustomFieldTypeInfoV2": { + "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" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV2" + }, + "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": { + "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": [ + "id", + "organisation_id", + "name", + "description", + "dynamic_options", + "rank", + "field_type", + "cannot_be_unset", + "options", + "is_usable", + "condition_groups", + "field_mode", + "created_at", + "updated_at" + ] + }, + "CustomFieldV1": { + "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" + ] + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" }, - "incident_timestamp_values": [ + "description": "What options are available for this custom field, if this field has options", + "example": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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": "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**.", + ] + }, + "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 + }, + "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", - "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 + "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": "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" + ] + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 + }, + "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", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, "required": [ - "event_type" + "id", + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" ] }, - "AuditLogActorMetadataV2": { + "CustomFieldValueDefinitionsV1": { "type": "object", "properties": { - "api_key_roles": { + "created_at": { "type": "string", - "description": "The roles that the API key has, separated by commas (if it's an API key actor)", - "example": "abc123" + "description": "When the value was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "external_resource_external_id": { + "custom_field_id": { "type": "string", - "description": "The ID of the external resource in the 3rd party system (if it's an external resource actor)", - "example": "q1234" + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field value", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "ID of the incident this value is defined on", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "updated_at": { + "type": "string", + "description": "When the value was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "value_catalog_entry_id": { + "type": "string", + "description": "ID 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_option_value": { + "type": "string", + "description": "The value of a new option that should be created, if the field supports dynamic options. If this conflicts with an existing option label, you must use its ID instead.", + "example": "New option" + }, + "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": { + "created_at": "2021-08-17T13:28:57.801578Z", + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "updated_at": "2021-08-17T13:28:57.801578Z", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_option_value": "New option", + "value_text": "This is my text field, I hope you like it" + } + }, + "CustomFieldValueDefinitionsV2": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "When the value was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "id": { + "type": "string", + "description": "Unique identifier for the custom field value", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "ID of the incident this value is defined on", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "updated_at": { + "type": "string", + "description": "When the value was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "value_catalog_entry_id": { + "type": "string", + "description": "ID 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_option_value": { + "type": "string", + "description": "The value of a new option that should be created, if the field supports dynamic options. If this conflicts with an existing option label, you must use its ID instead.", + "example": "New option" + }, + "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": { + "created_at": "2021-08-17T13:28:57.801578Z", + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "updated_at": "2021-08-17T13:28:57.801578Z", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_option_value": "New option", + "value_text": "This is my text field, I hope you like it" + } + }, + "CustomFieldValuePayloadV1": { + "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" + }, + "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": "" + } + }, + "CustomFieldValuePayloadV2": { + "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" + }, + "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" + } + }, + "CustomFieldValueV2": { + "type": "object", + "properties": { + "value_catalog_entry": { + "$ref": "#/components/schemas/EmbeddedCatalogEntryV2" }, - "external_resource_type": { + "value_link": { "type": "string", - "description": "The type of the external resource (if it's an external resource actor)", - "example": "pager_duty_incident" + "description": "If the custom field type is 'link', this will contain the value assigned.", + "example": "https://google.com/" }, - "user_base_role_slug": { + "value_numeric": { "type": "string", - "description": "The base role slug of the user (if it's a user actor)", - "example": "admin" + "description": "If the custom field type is 'numeric', this will contain the value assigned.", + "example": "123.456" }, - "user_custom_role_slugs": { + "value_option": { + "$ref": "#/components/schemas/CustomFieldOptionV2" + }, + "value_text": { "type": "string", - "description": "The custom role slugs of the user, separated by commas (if it's a user actor)", - "example": "engineering,security" + "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": { - "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" + "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" } }, - "AuditLogActorV2": { + "EditRequestBody": { "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" + "incident": { + "$ref": "#/components/schemas/IncidentEditPayloadV2" }, - "type": { - "type": "string", - "description": "The type of actor", - "example": "user", - "enum": [ - "user", - "system", - "api_key", - "workflow", - "external_resource" - ] + "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": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" + "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", + "slack_channel_name_override": "inc-123-database-down", + "summary": "Our database is really really sad, and we don't know why yet." }, - "name": "John Doe", - "type": "user" + "notify_incident_channel": true }, "required": [ - "id", - "type" + "incident", + "notify_incident_channel" ] }, - "AuditLogEntryContextV2": { + "EmbeddedCatalogEntryV1": { "type": "object", "properties": { - "location": { + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": [ + "lawrence@incident.io", + "lawrence" + ] + }, + "external_id": { "type": "string", - "description": "The location of the actor that performed this action", - "example": "1.2.3.4" + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" }, - "user_agent": { + "id": { "type": "string", - "description": "The user agent of the actor that performed this action", - "example": "Chrome/91.0.4472.114" + "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" } }, "example": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" }, "required": [ - "location" + "id", + "name", + "catalog_type_id" ] }, - "AuditLogPrivateIncidentAccessAttemptedMetadataV2": { + "EmbeddedCatalogEntryV2": { "type": "object", "properties": { - "outcome": { - "type": "string", - "description": "Whether or not the user was able to access the private incident", - "example": "granted", - "enum": [ - "granted", - "denied" + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": [ + "lawrence@incident.io", + "lawrence" ] - } - }, - "example": { - "outcome": "granted" - } - }, - "AuditLogTargetV2": { - "type": "object", - "properties": { + }, + "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": "The ID of the target", + "description": "ID of this catalog entry", "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" - ] + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" } }, "example": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "John Doe", - "type": "user" + "name": "Primary On-call" }, "required": [ "id", - "type" + "name", + "catalog_type_id" ] }, - "AuditLogUserRoleMembershipChangedMetadataV2": { + "EmbeddedIncidentRoleV2": { "type": "object", "properties": { - "after_base_role_slug": { + "created_at": { "type": "string", - "description": "The base role slug of the user after their role memberships changed", - "example": "owner" + "description": "When the role was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "after_custom_role_slugs": { + "description": { "type": "string", - "description": "The custom role slugs of the user after their role memberships changed, separated by commas", - "example": "engineering,data" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "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 role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "before_custom_role_slugs": { + "instructions": { "type": "string", - "description": "The custom role slugs of the user before their role memberships changed, separated by commas", - "example": "engineering,security" + "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": "This field is deprecated.", + "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" + }, + "updated_at": { + "type": "string", + "description": "When the role was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" + "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": [ - "before_base_role_slug", - "before_custom_role_slugs", - "after_base_role_slug", - "after_custom_role_slugs" + "name", + "shortform", + "description", + "instructions", + "condition_groups", + "id", + "role_type", + "created_at", + "updated_at" ] }, - "AuditLogUserSCIMGroupMappingChangedMetadataV2": { + "EngineParam": { "type": "object", "properties": { - "after_base_role_slug": { + "array": { + "type": "boolean", + "description": "Whether this parameter is an array", + "example": true + }, + "default_value": { + "$ref": "#/components/schemas/EngineParamBinding" + }, + "description": { "type": "string", - "description": "The base role slug of this SCIM group after the mapping was changed (if any)", - "example": "owner" + "description": "A string describing the param", + "example": "What slack channel should we send the message to?" }, - "after_custom_role_slugs": { + "infer_reference": { + "type": "boolean", + "description": "Whether this parameter should be inferred as a reference from the scope", + "example": true + }, + "label": { "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": "Human readable label for this parameter", + "example": "To date" }, - "before_base_role_slug": { + "name": { "type": "string", - "description": "The base role slug assigned to this SCIM group before the mapping was changed (if any)", - "example": "admin" + "description": "The unique identifier for the parameter", + "example": "severity" }, - "before_custom_role_slugs": { + "optional": { + "type": "boolean", + "description": "Whether this parameter is optional", + "example": true + }, + "type": { "type": "string", - "description": "The custom role slugs of this SCIM group before the mapping was changed (if any), separated by commas", - "example": "engineering,security" + "description": "The type of the parameter", + "example": "IncidentSeverity" } }, "example": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - } + "array": true, + "default_value": { + "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" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + }, + "required": [ + "name", + "label", + "type", + "array", + "optional", + "infer_reference", + "description" + ] }, - "CatalogEntryEngineParamBindingV2": { + "EngineParamBinding": { "type": "object", "properties": { "array_value": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogEntryEngineParamBindingValueV2" + "$ref": "#/components/schemas/EngineParamBindingValue" }, "description": "If array_value is set, this helps render the values", "example": [ @@ -9687,53 +20512,122 @@ ] }, "value": { - "$ref": "#/components/schemas/CatalogEntryEngineParamBindingValueV2" + "$ref": "#/components/schemas/EngineParamBindingValue" + } + }, + "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" + } + } + }, + "EngineParamBindingPayloadV2": { + "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" + } + ] + }, + "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": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ] + }, + "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" + "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" } } }, - "CatalogEntryEngineParamBindingValueV2": { + "EngineParamBindingValue": { "type": "object", "properties": { "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryReferenceV2" + "$ref": "#/components/schemas/CatalogEntryReference" }, "helptext": { "type": "string", @@ -9803,758 +20697,1186 @@ "sort_key" ] }, - "CatalogEntryReferenceV2": { + "EngineParamBindingValuePayloadV2": { "type": "object", "properties": { - "archived_at": { + "literal": { "type": "string", - "description": "When this entry was archived", - "example": "2021-08-17T14:28:57.801578Z", - "format": "date-time" + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" }, - "catalog_entry_id": { + "reference": { "type": "string", - "description": "ID of this catalog entry", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "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" }, - "catalog_entry_name": { + "literal": { "type": "string", - "description": "The name of this entry", - "example": "Primary escalation" + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" }, - "catalog_type_id": { + "reference": { "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" } }, "example": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" }, "required": [ - "catalog_type_id", - "catalog_entry_id", - "catalog_entry_name" + "label" ] }, - "CatalogEntryV2": { + "EngineParamV2": { "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" - } + "array": { + "type": "boolean", + "description": "Whether this parameter is an array", + "example": true }, - "catalog_type_id": { - "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "default_value": { + "$ref": "#/components/schemas/EngineParamBindingV2" }, - "created_at": { + "description": { "type": "string", - "description": "When this entry was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "A string describing the param", + "example": "What slack channel should we send the message to?" }, - "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" + "infer_reference": { + "type": "boolean", + "description": "Whether this parameter should be inferred as a reference from the scope", + "example": true }, - "id": { + "label": { "type": "string", - "description": "ID of this catalog entry", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Human readable label for this parameter", + "example": "To date" }, "name": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + "description": "The unique identifier for the parameter", + "example": "severity" }, - "rank": { - "type": "integer", - "description": "When catalog type is ranked, this is used to help order things", - "example": 3, - "format": "int32" + "optional": { + "type": "boolean", + "description": "Whether this parameter is optional", + "example": true }, - "updated_at": { + "type": { "type": "string", - "description": "When this entry was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "The type of the parameter", + "example": "IncidentSeverity" } }, "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, + "array": true, + "default_value": { + "array_value": [ + { "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity", - "sort_key": "000020", - "unavailable": false, - "value": "abc123" + "reference": "incident.severity" } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "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" + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" }, "required": [ - "id", - "catalog_type_id", "name", - "aliases", - "rank", - "attribute_values", - "created_at", - "updated_at" + "label", + "type", + "array", + "optional", + "infer_reference", + "description" ] }, - "CatalogResourceV2": { + "EngineReferenceV2": { "type": "object", "properties": { - "category": { - "type": "string", - "description": "Which category of resource", - "example": "custom", - "enum": [ - "primitive", - "custom", - "external" - ] + "array": { + "type": "boolean", + "description": "If true, the reference can refer to 0 to many items", + "example": false }, - "description": { + "key": { "type": "string", - "description": "Human readable description for this resource", - "example": "Boolean true or false value" + "description": "The key of the field this is a reference to", + "example": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]" }, "label": { "type": "string", - "description": "Label for this catalog resource type", - "example": "GitHub Repository" + "description": "Human readable label for the field (with context)", + "example": "Incident -> Affected Team" }, "type": { "type": "string", - "description": "Catalog type name for this resource", - "example": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]" + "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" + ] + }, + "ErrorResponse": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorSingle" + }, + "description": "List of errors that caused this request to fail", + "example": [ + { + "code": "trial_expired", + "message": "Default incident call link must be a valid URL", + "source": { + "field": "default_call_url", + "pointer": "/settings/default_call_url" + } + } + ] }, - "value_docstring": { + "request_id": { "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" + "description": "Unique identifier of the request", + "example": "FF1D889F-0741-6290-783B-66E606310D86", + "format": "uuid" + }, + "status": { + "type": "integer", + "description": "HTTP status of the response", + "example": 429, + "format": "int64" + }, + "type": { + "type": "string", + "description": "Machine-readable identifier for the general category of error", + "example": "invalid_request_error", + "enum": [ + "invalid_request_error", + "authentication_error", + "resource_forbidden", + "not_found", + "not_acceptable", + "conflict", + "precondition_failed", + "payload_too_large", + "validation_error", + "too_many_requests", + "api_error", + "rate_limit_reached" + ] } }, "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" + "errors": [ + { + "code": "trial_expired", + "message": "Default incident call link must be a valid URL", + "source": { + "field": "default_call_url", + "pointer": "/settings/default_call_url" + } + } + ], + "request_id": "FF1D889F-0741-6290-783B-66E606310D86", + "status": 429, + "type": "invalid_request_error" }, "required": [ "type", - "label", - "description", - "value_docstring", - "category", - "config", - "is_user_link" + "status", + "request_id", + "errors" ] }, - "CatalogTypeAttributePathItemPayloadV2": { + "ErrorSingle": { "type": "object", "properties": { - "attribute_id": { + "code": { "type": "string", - "description": "the ID of the attribute to use", - "example": "abc123" + "description": "Machine-readable identifier for this specific error", + "example": "trial_expired" + }, + "message": { + "type": "string", + "description": "Human readable description of the error", + "example": "Default incident call link must be a valid URL" + }, + "source": { + "$ref": "#/components/schemas/ErrorSource" } }, "example": { - "attribute_id": "abc123" + "code": "trial_expired", + "message": "Default incident call link must be a valid URL", + "source": { + "field": "default_call_url", + "pointer": "/settings/default_call_url" + } }, "required": [ - "attribute_id" + "code", + "message" ] }, - "CatalogTypeAttributePathItemV2": { + "ErrorSource": { "type": "object", "properties": { - "attribute_id": { + "field": { "type": "string", - "description": "the ID of the attribute to use", - "example": "abc123" + "description": "Field name that is the source of the error", + "example": "default_call_url" }, - "attribute_name": { + "pointer": { "type": "string", - "description": "the name of the attribute to use", - "example": "abc123" + "description": "JSON pointer to the request field that is the source of the error", + "example": "/settings/default_call_url" + } + }, + "example": { + "field": "default_call_url", + "pointer": "/settings/default_call_url" + }, + "required": [ + "field", + "pointer" + ] + }, + "EscalationPathNodeIfElsePayloadV2": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionPayloadV2" + }, + "description": "The condition that defines which branch to take", + "example": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + }, + "else_path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalationPathNodePayloadV2" + }, + "description": "The nodes that form the levels if our condition is not met", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ] + }, + "then_path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalationPathNodePayloadV2" + }, + "description": "The nodes that form the levels if our condition is met", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ] } }, "example": { - "attribute_id": "abc123", - "attribute_name": "abc123" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "then_path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ] }, "required": [ - "attribute_id", - "attribute_name" + "then_path", + "else_path" ] }, - "CatalogTypeAttributePayloadV2": { + "EscalationPathNodeIfElseV2": { "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" + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionV2" + }, + "description": "The condition that defines which branch to take", + "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" + } + } ] }, - "name": { - "type": "string", - "description": "Unique name of this attribute", - "example": "tier" - }, - "path": { + "else_path": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeAttributePathItemPayloadV2" + "$ref": "#/components/schemas/EscalationPathNodeV2" }, - "description": "The path to use (if this is an path)", + "description": "The nodes that form the levels if our condition is not met", "example": [ { - "attribute_id": "abc123" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" } ] }, - "type": { - "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "then_path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EscalationPathNodeV2" + }, + "description": "The nodes that form the levels if our condition is met", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ] } }, "example": { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ + "conditions": [ { - "attribute_id": "abc123" + "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" + } + } + ], + "else_path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "then_path": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" } - ], - "type": "Custom[\"Service\"]" + ] }, "required": [ - "name", - "type", - "array" + "conditions", + "then_path", + "else_path" ] }, - "CatalogTypeAttributeV2": { + "EscalationPathNodeLevelV2": { "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" + "round_robin_config": { + "$ref": "#/components/schemas/EscalationPathRoundRobinConfigV2" }, - "path": { + "targets": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeAttributePathItemV2" + "$ref": "#/components/schemas/EscalationPathTargetV2" }, - "description": "The path to use (if this is a path attribute)", + "description": "The targets for this level", "example": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" } ] }, - "type": { + "time_to_ack_interval_condition": { "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "description": "If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive", + "example": "active", + "enum": [ + "active", + "inactive" + ] + }, + "time_to_ack_seconds": { + "type": "integer", + "description": "How long should we wait for this level to acknowledge before escalating?", + "example": 1800, + "format": "int64" + }, + "time_to_ack_weekday_interval_config_id": { + "type": "string", + "description": "If the time to ack is relative to a time window, this identifies which window it is relative to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } }, "example": { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ { - "attribute_id": "abc123", - "attribute_name": "abc123" + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" } ], - "type": "Custom[\"Service\"]" + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" }, "required": [ - "id", - "mode", - "name", - "type", - "array" + "targets" ] }, - "CatalogTypeSchemaV2": { + "EscalationPathNodeNotifyChannelV2": { "type": "object", "properties": { - "attributes": { + "targets": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogTypeAttributeV2" + "$ref": "#/components/schemas/EscalationPathTargetV2" }, - "description": "Attributes of this catalog type", + "description": "The targets for this level", "example": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ - { - "attribute_id": "abc123", - "attribute_name": "abc123" - } - ], - "type": "Custom[\"Service\"]" + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" } ] }, - "version": { + "time_to_ack_interval_condition": { + "type": "string", + "description": "If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive", + "example": "active", + "enum": [ + "active", + "inactive" + ] + }, + "time_to_ack_seconds": { "type": "integer", - "description": "The version number of this schema", - "example": 1, + "description": "How long should we wait for this level to acknowledge before escalating?", + "example": 1800, "format": "int64" + }, + "time_to_ack_weekday_interval_config_id": { + "type": "string", + "description": "If the time to ack is relative to a time window, this identifies which window it is relative to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } }, "example": { - "attributes": [ + "targets": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ - { - "attribute_id": "abc123", - "attribute_name": "abc123" - } - ], - "type": "Custom[\"Service\"]" + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" } ], - "version": 1 + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" }, "required": [ - "attributes", - "version" + "targets" ] }, - "CatalogTypeV2": { + "EscalationPathNodePayloadV2": { "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" - } - }, - "categories": { - "type": "array", - "items": { - "type": "string", - "example": "issue-tracker", - "enum": [ - "customer", - "issue-tracker", - "product-feature", - "service", - "on-call", - "team", - "user" - ] - }, - "description": "What categories is this type considered part of", - "example": [ - "issue-tracker" - ] - }, - "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", + "description": "Unique internal ID of the escalation path node", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "is_editable": { - "type": "boolean", - "description": "Catalog types that are synced with external resources can't be edited", - "example": false + "if_else": { + "$ref": "#/components/schemas/EscalationPathNodeIfElsePayloadV2" }, - "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" + "level": { + "$ref": "#/components/schemas/EscalationPathNodeLevelV2" }, - "name": { - "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" + "notify_channel": { + "$ref": "#/components/schemas/EscalationPathNodeNotifyChannelV2" }, - "ranked": { - "type": "boolean", - "description": "If this type should be ranked", - "example": true + "repeat": { + "$ref": "#/components/schemas/EscalationPathNodeRepeatV2" }, - "registry_type": { + "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" + "description": "The type of this node: level or branch", + "example": "if_else", + "enum": [ + "if_else", + "repeat", + "level", + "notify_channel" ] - }, - "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" - }, - "categories": [ - "issue-tracker" - ], - "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", - "categories", - "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": [ + "if_else": { + "conditions": [ { "operation": "one_of", "param_bindings": [ @@ -10573,45 +21895,115 @@ ], "subject": "incident.severity" } + ], + "else_path": [ + {} + ], + "then_path": [ + {} ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + }, + "required": [ + "id", + "type" + ] + }, + "EscalationPathNodeRepeatV2": { + "type": "object", + "properties": { + "repeat_times": { + "type": "integer", + "description": "How many times to repeat these steps", + "example": 3, + "format": "int64" + }, + "to_node": { + "type": "string", + "description": "Which node ID we begin repeating from", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" } }, "example": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" }, "required": [ - "conditions" + "to_node", + "repeat_times" ] }, - "ConditionGroupV2": { + "EscalationPathNodeV2": { "type": "object", "properties": { - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionV3" - }, - "description": "All conditions in this list must be satisfied for the group to be satisfied", - "example": [ + "id": { + "type": "string", + "description": "Unique internal ID of the escalation path node", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "if_else": { + "$ref": "#/components/schemas/EscalationPathNodeIfElseV2" + }, + "level": { + "$ref": "#/components/schemas/EscalationPathNodeLevelV2" + }, + "notify_channel": { + "$ref": "#/components/schemas/EscalationPathNodeNotifyChannelV2" + }, + "repeat": { + "$ref": "#/components/schemas/EscalationPathNodeRepeatV2" + }, + "type": { + "type": "string", + "description": "The type of this node: level or branch", + "example": "if_else", + "enum": [ + "if_else", + "repeat", + "level", + "notify_channel" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ { "operation": { "label": "Lawrence Jones", @@ -10638,627 +22030,782 @@ "reference": "incident.severity" } } + ], + "else_path": [ + {} + ], + "then_path": [ + {} ] - } - }, - "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" + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" } - } - ] - }, - "required": [ - "conditions" - ] - }, - "ConditionOperationV2": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Human readable label to be displayed for user to select", - "example": "Lawrence Jones" + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "value": { - "type": "string", - "description": "Unique identifier for this option", - "example": "01FCQSP07Z74QMMYPDDGQB9FTG" - } - }, - "example": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, - "required": [ - "label", - "value", - "sort_key" - ] - }, - "ConditionOperationV3": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Human readable label to be displayed for user to select", - "example": "Lawrence Jones" + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "value": { - "type": "string", - "description": "Unique identifier for this option", - "example": "01FCQSP07Z74QMMYPDDGQB9FTG" - } - }, - "example": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" }, "required": [ - "label", - "value" + "id", + "type" ] }, - "ConditionPayloadV2": { + "EscalationPathPayloadV2": { "type": "object", "properties": { - "operation": { + "name": { "type": "string", - "description": "The name of the operation on the subject", - "example": "one_of" + "description": "The name of this escalation path, for the user's reference.", + "example": "Urgent Support" }, - "param_bindings": { + "path": { "type": "array", "items": { - "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + "$ref": "#/components/schemas/EscalationPathNodePayloadV2" }, - "description": "List of parameter bindings", + "description": "The nodes that form the levels and branches of this escalation path.", "example": [ { - "array_value": [ + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ] + }, + "working_hours": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekdayIntervalConfigV2" + }, + "description": "The working hours for this escalation path.", + "example": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ { - "literal": "SEV123", - "reference": "incident.severity" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" } - ], - "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": [ + "name": "Urgent Support", + "path": [ { - "array_value": [ + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ { - "literal": "SEV123", - "reference": "incident.severity" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + ] } - ], - "subject": "incident.severity" + ] }, "required": [ - "subject", - "operation", - "param_bindings" + "name", + "path" ] }, - "ConditionSubjectV2": { + "EscalationPathRoundRobinConfigV2": { "type": "object", "properties": { - "label": { - "type": "string", - "description": "Human readable identifier for the subject", - "example": "Incident Severity" + "enabled": { + "type": "boolean", + "description": "Whether round robin is enabled for this level", + "example": false }, - "reference": { - "type": "string", - "description": "Reference into the scope for the value of the subject", - "example": "incident.severity" + "rotate_after_seconds": { + "type": "integer", + "description": "How long should we wait before rotating to the next target in a round robin, if not set will stick with a single target per level.", + "example": 120, + "format": "int64" } }, "example": { - "label": "Incident Severity", - "reference": "incident.severity" + "enabled": false, + "rotate_after_seconds": 120 }, "required": [ - "label", - "reference", - "icon" + "enabled" ] }, - "ConditionSubjectV3": { + "EscalationPathTargetV2": { "type": "object", "properties": { - "label": { + "id": { "type": "string", - "description": "Human readable identifier for the subject", - "example": "Incident Severity" + "description": "Uniquely identifies an entity of this type", + "example": "lawrencejones" }, - "reference": { + "schedule_mode": { "type": "string", - "description": "Reference into the scope for the value of the subject", - "example": "incident.severity" + "description": "Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule", + "example": "currently_on_call", + "enum": [ + "currently_on_call", + "all_users_for_rota", + "all_users", + "" + ] + }, + "type": { + "type": "string", + "example": "schedule", + "enum": [ + "schedule", + "user", + "slack_channel" + ] + }, + "urgency": { + "type": "string", + "description": "The urgency of this escalation path target", + "example": "high", + "enum": [ + "high", + "low" + ] } }, "example": { - "label": "Incident Severity", - "reference": "incident.severity" + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" }, "required": [ - "label", - "reference" + "type", + "id", + "urgency" ] }, - "ConditionV2": { + "EscalationPathV2": { "type": "object", "properties": { - "operation": { - "$ref": "#/components/schemas/ConditionOperationV2" + "id": { + "type": "string", + "description": "Unique identifier for this escalation path.", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "param_bindings": { + "name": { + "type": "string", + "description": "The name of this escalation path, for the user's reference.", + "example": "Urgent Support" + }, + "path": { "type": "array", "items": { - "$ref": "#/components/schemas/EngineParamBindingV2" + "$ref": "#/components/schemas/EscalationPathNodeV2" }, - "description": "Bindings for the operation parameters", + "description": "The nodes that form the levels and branches of this escalation path.", "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" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" } - } - ], - "subject": { - "label": "Incident Severity", - "reference": "incident.severity" - } - }, - "required": [ - "subject", - "operation", - "param_bindings", - "params" - ] - }, - "ConditionV3": { - "type": "object", - "properties": { - "operation": { - "$ref": "#/components/schemas/ConditionOperationV3" + ] }, - "param_bindings": { + "working_hours": { "type": "array", "items": { - "$ref": "#/components/schemas/EngineParamBindingV3" + "$ref": "#/components/schemas/WeekdayIntervalConfigV2" }, - "description": "Bindings for the operation parameters", + "description": "The working hours for this escalation path.", "example": [ { - "array_value": [ + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } + ] } ] - }, - "subject": { - "$ref": "#/components/schemas/ConditionSubjectV3" } }, "example": { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, - "param_bindings": [ + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Urgent Support", + "path": [ { - "array_value": [ + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "if_else": { + "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" + } + } + ], + "else_path": [ + {} + ], + "then_path": [ + {} + ] + }, + "level": { + "round_robin_config": { + "enabled": false, + "rotate_after_seconds": 120 + }, + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "notify_channel": { + "targets": [ + { + "id": "lawrencejones", + "schedule_mode": "currently_on_call", + "type": "schedule", + "urgency": "high" + } + ], + "time_to_ack_interval_condition": "active", + "time_to_ack_seconds": 1800, + "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "repeat": { + "repeat_times": 3, + "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "type": "if_else" + } + ], + "working_hours": [ + { + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } + ] } - ], - "subject": { - "label": "Incident Severity", - "reference": "incident.severity" - } + ] }, "required": [ - "subject", - "operation", - "param_bindings" + "id", + "name", + "path", + "levels", + "repeat_times" ] }, - "CreateEntryRequestBody": { + "ExpressionBranchPayloadV2": { "type": "object", "properties": { - "aliases": { + "condition_groups": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "description": "Optional aliases that can be used to reference this entry", + "description": "When one of these condition groups are satisfied, this branch will be evaluated", "example": [ - "lawrence@incident.io", - "lawrence" - ] - }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ + { + "conditions": [ { - "literal": "SEV123", - "reference": "incident.severity" + "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" - } + ] } - }, - "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" + "result": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ + "condition_groups": [ + { + "conditions": [ { - "literal": "SEV123", - "reference": "incident.severity" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } - ], - "value": { + ] + } + ], + "result": { + "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" + "condition_groups", + "result" ] }, - "CreateEntryResponseBody": { + "ExpressionBranchV2": { "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": [ + "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": [ { - "catalog_entry": { - "archived_at": "2021-08-17T14:28:57.801578Z", - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" }, - "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" + "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" + } } - ], - "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. Supports markdown.", - "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" + "result": { + "$ref": "#/components/schemas/EngineParamBindingV2" } }, "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" + "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" + } } }, "required": [ - "managed_resource" + "condition_groups", + "result" ] }, - "CreatePathRequestBody": { + "ExpressionBranchesOptsPayloadV2": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of this escalation path, for the user's reference.", - "example": "Urgent Support" - }, - "path": { + "branches": { "type": "array", "items": { - "$ref": "#/components/schemas/EscalationPathNodePayloadV2" + "$ref": "#/components/schemas/ExpressionBranchPayloadV2" }, - "description": "The nodes that form the levels and branches of this escalation path.", + "description": "The branches to apply for this operation", "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { + "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": { + "$ref": "#/components/schemas/ReturnsMetaV2" + } + }, + "example": { + "branches": [ + { + "condition_groups": [ + { "conditions": [ { "operation": "one_of", @@ -11278,143 +22825,102 @@ ], "subject": "incident.severity" } - ], - "else_path": [ - {} - ], - "then_path": [ - {} ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" + } + ], + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ] - }, - "working_hours": { + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "required": [ + "branches", + "returns" + ] + }, + "ExpressionBranchesOptsV2": { + "type": "object", + "properties": { + "branches": { "type": "array", "items": { - "$ref": "#/components/schemas/WeekdayIntervalConfigV2" + "$ref": "#/components/schemas/ExpressionBranchV2" }, - "description": "The working hours for this escalation path.", + "description": "The branches to apply for this operation", "example": [ { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] - } - ] - } - }, - "example": { - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ + "condition_groups": [ { - "operation": "one_of", - "param_bindings": [ + "conditions": [ { - "array_value": [ + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + }, + "param_bindings": [ { - "literal": "SEV123", - "reference": "incident.severity" + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } } ], - "value": { - "literal": "SEV123", + "subject": { + "label": "Incident Severity", "reference": "incident.severity" } } - ], - "subject": "incident.severity" + ] } ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" } - ] - } - ] - }, - "required": [ - "name", - "path" - ] - }, - "CreatePathResponseBody": { - "type": "object", - "properties": { - "escalation_path": { - "$ref": "#/components/schemas/EscalationPathV2" + } + ] + }, + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" } }, "example": { - "escalation_path": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Urgent Support", - "path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { + "branches": [ + { + "condition_groups": [ + { "conditions": [ { "operation": { @@ -11442,2111 +22948,2236 @@ "reference": "incident.severity" } } - ], - "else_path": [ - {} - ], - "then_path": [ - {} ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "working_hours": [ - { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ + } + ], + "result": { + "array_value": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } - ] + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } } - ] - } - }, - "required": [ - "escalation_path" - ] - }, - "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" + } + ], + "returns": { + "array": true, + "type": "IncidentStatus" } }, - "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, "required": [ - "custom_field_id", - "value" + "branches", + "returns" ] }, - "CreateRequestBody10": { + "ExpressionDefinitions": { "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": "" - } - ] - } - ] + "else_branch": { + "$ref": "#/components/schemas/ExpressionElseBranchV2" }, "id": { "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "The ID of the expression", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "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/IncidentRoleAssignmentPayloadV2" + "$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" - } - ] - }, - "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" + "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, 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": { + "reference": { "type": "string", - "description": "Slack Team to create the incident in", - "example": "T02A1FSLE8J" + "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" + } } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "idempotency_key": "alert-uuid", - "incident_role_assignments": [ + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "label": "Team Slack channel", + "operations": [ { - "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" - } - ], - "incident_status_id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "incident_timestamp_values": [ - { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "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": "standard", - "name": "Our database is sad", - "retrospective_incident_options": { - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "slack_channel_id": "abc123" + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" }, - "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" - ] + "root_reference": "incident.status" + } }, - "CreateRequestBody11": { + "ExpressionElseBranchPayloadV2": { "type": "object", "properties": { - "schedule": { - "$ref": "#/components/schemas/ScheduleCreatePayloadV2" + "result": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" } }, "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" + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } }, "required": [ - "schedule" + "result" ] }, - "CreateRequestBody12": { + "ExpressionElseBranchV2": { "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" + "result": { + "$ref": "#/components/schemas/EngineParamBindingV2" } }, "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 + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } } }, - "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" + "result" ] }, - "CreateRequestBody3": { + "ExpressionFilterOptsPayloadV2": { "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" + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", + "example": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } ] - }, - "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" + "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": [ - "id", - "name", - "description", - "field_type", - "cannot_be_unset", - "created_at", - "updated_at" + "condition_groups" ] }, - "CreateRequestBody4": { + "ExpressionFilterOptsV2": { "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" + "condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupV2" + }, + "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", + "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" + } + } ] } - }, - "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" - } + "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" + } + } + ] + } + ] }, "required": [ - "incident_id", - "resource" + "condition_groups" ] }, - "CreateRequestBody5": { + "ExpressionNavigateOptsPayloadV2": { "type": "object", "properties": { - "incident_id": { - "type": "string", - "example": "01ET65M7ZADYFCKD4K1AE2QNMC" - }, - "user_id": { + "reference": { "type": "string", - "example": "01FCQSP07Z74QMMYPDDGQB9FTG" + "description": "The reference that you want to navigate to", + "example": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" } }, "example": { - "incident_id": "01ET65M7ZADYFCKD4K1AE2QNMC", - "user_id": "01FCQSP07Z74QMMYPDDGQB9FTG" + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" }, "required": [ - "user_id", - "incident_id" + "reference" ] }, - "CreateRequestBody6": { + "ExpressionNavigateOptsV2": { "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": { + "reference": { "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 + "description": "The reference within the scope to navigate to", + "example": "1235" }, - "shortform": { + "reference_label": { "type": "string", - "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", - "example": "lead", - "minLength": 1 + "description": "The name of the reference to navigate to", + "example": "Teams" } }, "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" + "reference": "1235", + "reference_label": "Teams" }, "required": [ - "name", - "shortform", - "description", - "instructions", - "required", - "condition_groups", - "id", - "role_type", - "created_at", - "updated_at" + "reference", + "reference_label" ] }, - "CreateRequestBody7": { + "ExpressionOperationPayloadV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 + "branches": { + "$ref": "#/components/schemas/ExpressionBranchesOptsPayloadV2" }, - "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" + "filter": { + "$ref": "#/components/schemas/ExpressionFilterOptsPayloadV2" }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "navigate": { + "$ref": "#/components/schemas/ExpressionNavigateOptsPayloadV2" }, - "shortform": { + "operation_type": { "type": "string", - "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", - "example": "lead", - "minLength": 1 + "description": "The type of the operation", + "example": "navigate", + "enum": [ + "navigate", + "filter", + "count", + "min", + "max", + "sum", + "random", + "first", + "parse", + "branches" + ] + }, + "parse": { + "$ref": "#/components/schemas/ExpressionParseOptsPayloadV2" } }, "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" + "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\"]" + } }, "required": [ - "name", - "shortform", - "description", - "instructions", - "condition_groups", - "id", - "role_type", - "created_at", - "updated_at" + "operation_type", + "returns" ] }, - "CreateRequestBody8": { + "ExpressionOperationV2": { "type": "object", "properties": { - "category": { + "branches": { + "$ref": "#/components/schemas/ExpressionBranchesOptsV2" + }, + "filter": { + "$ref": "#/components/schemas/ExpressionFilterOptsV2" + }, + "navigate": { + "$ref": "#/components/schemas/ExpressionNavigateOptsV2" + }, + "operation_type": { "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", + "description": "The type of the operation", + "example": "navigate", "enum": [ - "live", - "learning", - "closed" + "navigate", + "filter", + "count", + "min", + "max", + "sum", + "random", + "first", + "parse", + "branches" ] }, - "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." + "parse": { + "$ref": "#/components/schemas/ExpressionParseOptsV2" }, - "name": { - "type": "string", - "description": "Unique name of this status", - "example": "Closed" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" } }, "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": [ + "branches": { + "branches": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "condition_groups": [ { - "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": "" + "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" + } + } } - ] - }, - "idempotency_key": { - "type": "string", - "description": "Unique string used to de-duplicate incident create requests", - "example": "alert-uuid" + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } }, - "incident_role_assignments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" - }, - "description": "Assign incident roles to these people", - "example": [ + "filter": { + "condition_groups": [ { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "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" + } + } + ] } ] }, - "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": { - "type": "string", - "description": "Current status of the incident", - "example": "triage", - "enum": [ - "triage", - "investigating", - "fixing", - "monitoring", - "closed", - "declined" - ] + "navigate": { + "reference": "1235", + "reference_label": "Teams" }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "operation_type": "navigate", + "parse": { + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" }, - "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" - ] + "returns": { + "array": true, + "type": "IncidentStatus" } }, - "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": "" - } - ] - } - ], - "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" + "operation_type", + "returns" ] }, - "CreateResponseBody": { + "ExpressionParseOptsPayloadV2": { "type": "object", "properties": { - "incident_attachment": { - "$ref": "#/components/schemas/IncidentAttachmentV1" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" + }, + "source": { + "type": "string", + "description": "Source expression that is evaluated to a result", + "example": "metadata.annotations[\"github.com/repo\"]" } }, "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" - } - } + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" }, "required": [ - "incident_attachment" + "source", + "returns" ] }, - "CreateResponseBody2": { + "ExpressionParseOptsV2": { "type": "object", "properties": { - "incident_membership": { - "$ref": "#/components/schemas/IncidentMembership" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" + }, + "source": { + "type": "string", + "description": "Source expression that is evaluated to a result", + "example": "metadata.annotations[\"github.com/repo\"]" } }, "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" - } - } + "returns": { + "array": true, + "type": "IncidentStatus" + }, + "source": "metadata.annotations[\"github.com/repo\"]" }, "required": [ - "incident_membership" + "source", + "returns" ] }, - "CreateTypeRequestBody": { + "ExpressionPayloadV2": { "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" - } + "else_branch": { + "$ref": "#/components/schemas/ExpressionElseBranchPayloadV2" }, - "categories": { + "label": { + "type": "string", + "description": "The human readable label of the expression", + "example": "Team Slack channel" + }, + "operations": { "type": "array", "items": { - "type": "string", - "example": "issue-tracker", - "enum": [ - "customer", - "issue-tracker", - "product-feature", - "service", - "on-call", - "team", - "user" - ] + "$ref": "#/components/schemas/ExpressionOperationPayloadV2" }, - "description": "What categories is this type considered part of", "example": [ - "issue-tracker" - ] - }, - "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" + { + "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\"]" + } + } ] }, - "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": { + "reference": { "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/my-company/incident-io-catalog" + "description": "A short ID that can be used to reference the expression", + "example": "abc123" }, - "type_name": { + "root_reference": { "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" - }, - "categories": [ - "issue-tracker" - ], - "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" + "description": "The root reference for this expression (i.e. where the expression starts)", + "example": "incident.status" } }, "example": { - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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": [ + "else_branch": { + "result": { + "array_value": [ { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ - { - "attribute_id": "abc123", - "attribute_name": "abc123" - } - ], - "type": "Custom[\"Service\"]" + "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": { + "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" }, "required": [ - "catalog_type" + "label", + "reference", + "root_reference", + "operations" ] }, - "CreateWorkflowRequestBody": { + "ExpressionV2": { "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" - } + "else_branch": { + "$ref": "#/components/schemas/ExpressionElseBranchV2" }, - "condition_groups": { + "label": { + "type": "string", + "description": "The human readable label of the expression", + "example": "Team Slack channel" + }, + "operations": { "type": "array", "items": { - "$ref": "#/components/schemas/ConditionGroupPayloadV2" + "$ref": "#/components/schemas/ExpressionOperationV2" }, - "description": "List of conditions to apply to the workflow", "example": [ { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { + "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" } } - ], - "subject": "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" + } } ] }, - "continue_on_step_error": { - "type": "boolean", - "description": "Whether to continue executing the workflow if a step fails", - "example": true + "reference": { + "type": "string", + "description": "A short ID that can be used to reference the expression", + "example": "abc123" }, - "delay": { - "$ref": "#/components/schemas/WorkflowDelay" + "returns": { + "$ref": "#/components/schemas/ReturnsMetaV2" }, - "expressions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExpressionPayloadV2" - }, - "description": "The expressions used in the workflow", - "example": [ - { - "else_branch": { - "result": { - "array_value": [ + "root_reference": { + "type": "string", + "description": "The root reference for this expression (i.e. where the expression starts)", + "example": "incident.status" + } + }, + "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" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" } } - }, - "label": "Team Slack channel", - "operations": [ + ], + "returns": { + "array": true, + "type": "IncidentStatus" + } + }, + "filter": { + "condition_groups": [ { - "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": { + "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" } - ], - "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" + ] + }, + "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" + }, + "required": [ + "label", + "reference", + "returns", + "root_reference", + "operations", + "id" + ] + }, + "ExternalIssueReferenceV1": { + "type": "object", + "properties": { + "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": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + } + }, + "ExternalIssueReferenceV2": { + "type": "object", + "properties": { + "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": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "required": [ + "provider", + "provider_instance_id", + "issue_name", + "issue_permalink", + "issue_id" + ] + }, + "ExternalResourceDefinitionsV1": { + "type": "object", + "properties": { + "external_id": { + "type": "string", + "description": "ID of the resource in the external system", + "example": "123" + }, + "permalink": { + "type": "string", + "description": "URL of the resource", + "example": "https://my.pagerduty.com/incidents/ABC" + }, + "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" + ] + }, + "title": { + "type": "string", + "description": "Title of resource", + "example": "The database has gone down" + } + }, + "example": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } + }, + "ExternalResourceV1": { + "type": "object", + "properties": { + "external_id": { + "type": "string", + "description": "ID of the resource in the external system", + "example": "123" + }, + "permalink": { + "type": "string", + "description": "URL of the resource", + "example": "https://my.pagerduty.com/incidents/ABC" + }, + "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" ] }, - "folder": { + "title": { "type": "string", - "description": "Folder to display the workflow in", - "example": "My folder 01" + "description": "Title of resource", + "example": "The database has gone down" + } + }, + "example": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + }, + "required": [ + "id", + "permalink", + "external_id", + "title", + "resource_type", + "resource_type_label", + "created_at", + "updated_at" + ] + }, + "FollowUpPriorityV2": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the follow-up priority option", + "example": "A follow-up that requires immediate attention." }, - "include_private_incidents": { - "type": "boolean", - "description": "Whether to include private incidents", - "example": true + "id": { + "type": "string", + "description": "Unique identifier for the follow-up priority option", + "example": "01GNW4BAQ7XRMFF6FHKNXDFPRW" }, "name": { "type": "string", - "description": "The human-readable name of the workflow", - "example": "My workflow" + "description": "Name of the follow-up priority option", + "example": "Urgent" }, - "once_for": { - "type": "array", - "items": { - "type": "string", - "example": "incident.url" - }, - "description": "Once For strategy to apply to this workflow", - "example": [ - "incident.url" - ] + "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/UserV2" }, - "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" - ] + "completed_at": { + "type": "string", + "description": "When the follow-up was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "runs_on_incidents": { + "created_at": { "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" - ] + "description": "When the follow-up was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "state": { + "description": { "type": "string", - "description": "The state of the workflow (e.g. is it draft, or disabled)", - "example": "active", + "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" + }, + "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": [ - "active", - "disabled", - "draft", - "error" + "outstanding", + "completed", + "deleted", + "not_doing" ] }, - "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" - } - } - ] - } - ] + "title": { + "type": "string", + "description": "Title of the follow-up", + "example": "Cat is stuck in the tree" }, - "trigger": { + "updated_at": { "type": "string", - "description": "Trigger to set on the workflow", - "example": "incident.updated" + "description": "When the follow-up was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "annotations": { - "incident.io/terraform/version": "3.0.0" + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "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 + "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" }, - "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" + "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": [ - "name", - "trigger", - "once_for", - "condition_groups", - "steps", - "expressions", - "include_private_incidents", - "runs_on_incident_modes", - "continue_on_step_error", - "runs_on_incidents" + "id", + "incident_id", + "title", + "status", + "created_at", + "updated_at" ] }, - "CustomFieldEntryPayloadV1": { + "GroupingKeyV2": { "type": "object", "properties": { - "custom_field_id": { + "id": { "type": "string", - "description": "ID of the custom field this entry is linked against", + "description": "Unique identifier of the alert attribute the user wishes to group on", "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": "" - } - ] } }, "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": "01FCNDV6P870EA6S7TK1DSYDG0" }, "required": [ - "custom_field_id", - "values" + "id" ] }, - "CustomFieldEntryV1": { + "IdentityResponseBody": { "type": "object", "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldTypeInfoV1" + "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": { + "type": "string", + "description": "The dashboard URL for this organisation", + "example": "https://app.incident.io/my-org" }, - "values": { + "name": { + "type": "string", + "description": "The name assigned to the current API Key", + "example": "Alertmanager token" + }, + "roles": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldValueV1" + "type": "string", + "description": "API key roles", + "example": "viewer", + "enum": [ + "viewer", + "incident_creator", + "incident_editor", + "manage_settings", + "global_access", + "catalog_viewer", + "catalog_editor", + "incident_memberships_editor", + "schedules_editor", + "schedules_reader", + "schedule_overrides_editor", + "workflows_editor", + "private_workflows_editor", + "on_call_editor" + ] }, - "description": "List of custom field values set on this entry", + "description": "Which roles have been enabled for this key", "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" - } + "viewer" ] } }, "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" - } + "dashboard_url": "https://app.incident.io/my-org", + "name": "Alertmanager token", + "roles": [ + "viewer" ] }, "required": [ - "custom_field", - "values" + "name", + "roles", + "dashboard_url" ] }, - "CustomFieldOptionV1": { + "IncidentAttachmentV1": { "type": "object", "properties": { - "custom_field_id": { - "type": "string", - "description": "ID of the custom field this option belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, "id": { "type": "string", - "description": "Unique identifier for the custom field option", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "sort_key": { - "type": "integer", - "description": "Sort key used to order the custom field options correctly", - "default": 1000, - "example": 10, - "format": "int64" + "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": { + "IncidentCreatePayloadV1": { "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" + "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 custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "name": { + "idempotency_key": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" }, - "options": { + "incident_role_assignments": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" }, - "description": "What options are available for this custom field, if this field has options", + "description": "Assign incident roles to these people", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" } ] + }, + "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": { + "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." + }, + "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": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "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": "" + } + ] } - ] + ], + "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": [ - "id", - "organisation_id", - "name", - "description", - "dynamic_options", - "rank", - "field_type", - "cannot_be_unset", - "options", - "is_usable", - "condition_groups", - "field_mode", - "created_at", - "updated_at" + "idempotency_key", + "visibility" ] }, - "CustomFieldV1": { + "IncidentCreatePayloadV2": { "type": "object", "properties": { - "catalog_type_id": { - "type": "string", - "description": "For catalog fields, the ID of the associated catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryPayloadV2" + }, + "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": "" + } + ] + } + ] }, - "created_at": { + "id": { "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "description": { + "idempotency_key": { "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" }, - "field_type": { - "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" + "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" + } ] }, - "id": { - "type": "string", - "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "name": { + "incident_status_id": { "type": "string", - "description": "Human readable name for the custom field", - "example": "Affected Team", - "maxLength": 50 + "description": "Incident status to assign to the incident", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "options": { + "incident_timestamp_values": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" }, - "description": "What options are available for this custom field, if this field has options", + "description": "Assign the incident's timestamps to these values", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" } ] }, - "required": { + "incident_type_id": { "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": "Incident type to create this incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "required_v2": { + "mode": { "type": "string", - "description": "When this custom field must be set during the incident lifecycle.", - "example": "never", + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "standard", "enum": [ - "never", - "before_resolution", - "always" + "standard", + "retrospective", + "test", + "tutorial" ] }, - "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 + "name": { + "type": "string", + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "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 + "retrospective_incident_options": { + "$ref": "#/components/schemas/RetrospectiveIncidentOptionsV2" }, - "show_before_update": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident update modal.", - "example": true + "severity_id": { + "type": "string", + "description": "Severity to create incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "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 + "slack_channel_name_override": { + "type": "string", + "description": "Name of the Slack channel to create for this incident", + "example": "inc-123-database-down" }, - "updated_at": { + "slack_team_id": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "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": { - "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_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" + "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": [ - "id", - "name", - "description", - "field_type", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" + "idempotency_key", + "visibility" ] }, - "CustomFieldV2": { + "IncidentDurationMetricV2": { "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" - ] - }, "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 - }, - "updated_at": { - "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Unique name of this duration metric", + "example": "Lasted" } }, "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", + "name": "Lasted" }, "required": [ "id", "name", - "description", - "field_type", - "cannot_be_unset", + "rank", + "from_timestamp_id", + "to_timestamp_id", + "metric_type", + "calculation_mode", "created_at", - "updated_at" + "updated_at", + "validate" ] }, - "CustomFieldValuePayloadV1": { + "IncidentDurationMetricWithValueV2": { "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" + "duration_metric": { + "$ref": "#/components/schemas/IncidentDurationMetricV2" }, - "value_timestamp": { - "type": "string", - "description": "Deprecated: please use incident timestamp values instead", - "example": "" + "value_seconds": { + "type": "integer", + "description": "The calculated durations for this metric", + "example": 1, + "format": "int64" } }, "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" + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" }, - "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_seconds": 1 }, - "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" - } + "required": [ + "duration_metric" + ] }, - "EditRequestBody": { + "IncidentEditPayloadV2": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentEditPayloadV2" + "call_url": { + "type": "string", + "description": "The call URL attached to this incident", + "example": "https://zoom.us/foo" }, - "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_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryPayloadV2" + }, + "description": "Set the incident's custom fields to these values", + "example": [ { "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "values": [ @@ -13561,8 +25192,15 @@ } ] } - ], - "incident_role_assignments": [ + ] + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + }, + "description": "Assign incident roles to these people", + "example": [ { "assignee": { "email": "bob@example.com", @@ -13571,4380 +25209,5544 @@ }, "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." + ] }, - "notify_incident_channel": true - }, - "required": [ - "incident", - "notify_incident_channel" - ] - }, - "EmbeddedCatalogEntryV1": { - "type": "object", - "properties": { - "aliases": { + "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_timestamp_values": { "type": "array", "items": { - "type": "string", - "example": "abc123" + "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" }, - "description": "Optional aliases that can be used to reference this entry", + "description": "Assign the incident's timestamps to these values", "example": [ - "lawrence@incident.io", - "lawrence" + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } ] }, - "external_id": { + "name": { "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": "Explanation of the incident", + "example": "Our database is sad" }, - "id": { + "severity_id": { "type": "string", - "description": "ID of this catalog entry", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Severity to change incident to", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "name": { + "slack_channel_name_override": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" - } - }, - "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" - }, - "required": [ - "id", - "name", - "catalog_type_id" - ] - }, - "EngineParamBindingPayloadV2": { - "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" - } - ] + "description": "Override the name of the incident Slack channel", + "example": "inc-123-database-down" }, - "value": { - "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" + "summary": { + "type": "string", + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." } }, "example": { - "array_value": [ + "call_url": "https://zoom.us/foo", + "custom_field_entries": [ { - "literal": "SEV123", - "reference": "incident.severity" + "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": "" + } + ] } ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } + "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", + "slack_channel_name_override": "inc-123-database-down", + "summary": "Our database is really really sad, and we don't know why yet." } }, - "EngineParamBindingV2": { + "IncidentFilterFieldsV2": { "type": "object", "properties": { - "array_value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EngineParamBindingValueV2" + "created_at": { + "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" + ] }, - "description": "If array_value is set, this helps render the values", - "example": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } + }, + "custom_field": { + "type": "object", + "description": "Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type.", + "example": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] } - ] + }, + "additionalProperties": { + "type": "object", + "example": { + "abc123": [ + "value" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "value" + }, + "example": [ + "value" + ] + } + } }, - "value": { - "$ref": "#/components/schemas/EngineParamBindingValueV2" - } - }, - "example": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "incident_role": { + "type": "object", + "description": "Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'.", + "example": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } + }, + "additionalProperties": { + "type": "object", + "example": { + "abc123": [ + "value" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "value" + }, + "example": [ + "value" + ] + } + } + }, + "incident_type": { + "type": "object", + "description": "Filter on incident type. The accepted operators are 'one_of, or 'not_in'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } + }, + "mode": { + "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" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } + }, + "severity": { + "type": "object", + "description": "Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } + }, + "status": { + "type": "object", + "description": "Filter on incident status. The accepted operators are 'one_of', or 'not_in'.", + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "EngineParamBindingV3": { - "type": "object", - "properties": { - "array_value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EngineParamBindingValueV3" + }, + "status_category": { + "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" + ] }, - "description": "If array_value is set, this helps render the values", - "example": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ] + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } }, - "value": { - "$ref": "#/components/schemas/EngineParamBindingValueV3" + "updated_at": { + "type": "object", + "description": "Filter on incident updated at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'.", + "example": { + "updated_at[gte]": [ + "2024-05-01" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" + }, + "example": [ + "some_value" + ] + } } }, "example": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "created_at": { + "created_at[gte]": [ + "2024-05-01" + ] + }, + "custom_field": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + }, + "incident_role": { + "01GBSQF3FHF7FWZQNWGHAVQ804": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804", + "01ET65M7ZARSFZ6TFDFVQDN9AA" + ] + } + }, + "incident_type": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "mode": { + "one_of": [ + "retrospective" + ] + }, + "severity": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "status": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "status_category": { + "one_of": [ + "active" + ] + }, + "updated_at": { + "updated_at[gte]": [ + "2024-05-01" + ] } } }, - "EngineParamBindingValuePayloadV2": { + "IncidentMembership": { "type": "object", "properties": { - "literal": { + "created_at": { "type": "string", - "description": "If set, this is the literal value of the step parameter", - "example": "SEV123" + "description": "When the membership was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "reference": { + "id": { "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 identifier of this incident membership", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + }, + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + }, + "updated_at": { + "type": "string", + "description": "When the membership was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/UserV2" } }, "example": { - "literal": "SEV123", - "reference": "incident.severity" - } + "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" + } + }, + "required": [ + "id", + "user", + "incident_id", + "created_at", + "updated_at" + ] }, - "EngineParamBindingValueV2": { + "IncidentRoleAssignmentPayloadV1": { "type": "object", "properties": { - "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" + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV1" }, - "reference": { + "incident_role_id": { "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 ID of an incident role. Note that the 'reporter' role can only be assigned when creating an incident.", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" }, "required": [ - "label", - "sort_key" + "incident_role_id", + "assignee" ] }, - "EngineParamBindingValueV3": { + "IncidentRoleAssignmentPayloadV2": { "type": "object", "properties": { - "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" + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV2" }, - "reference": { + "incident_role_id": { "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 ID of an incident role", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" }, "required": [ - "label" + "incident_role_id" ] }, - "EngineReferenceV2": { + "IncidentRoleAssignmentV1": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "If true, the reference can refer to 0 to many items", - "example": false - }, - "key": { - "type": "string", - "description": "The key of the field this is a reference to", - "example": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]" - }, - "label": { - "type": "string", - "description": "Human readable label for the field (with context)", - "example": "Incident -> Affected Team" + "assignee": { + "$ref": "#/components/schemas/UserV1" }, - "type": { - "type": "string", - "description": "The type of this resource in the engine", - "example": "IncidentSeverity" + "role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "example": { - "array": false, - "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", - "label": "Incident -> Affected Team", - "type": "IncidentSeverity" + "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" + } }, "required": [ - "key", - "label", - "type", - "array", - "node_label", - "hide_filter" + "role" ] }, - "EscalationPathNodeIfElsePayloadV2": { + "IncidentRoleAssignmentV2": { "type": "object", "properties": { - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionPayloadV2" - }, - "description": "The condition that defines which branch to take", - "example": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] - }, - "else_path": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EscalationPathNodePayloadV2" - }, - "description": "The nodes that form the levels if our condition is not met", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ] + "assignee": { + "$ref": "#/components/schemas/UserV2" }, - "then_path": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EscalationPathNodePayloadV2" - }, - "description": "The nodes that form the levels if our condition is met", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ] + "role": { + "$ref": "#/components/schemas/EmbeddedIncidentRoleV2" } }, "example": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "then_path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ] + "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" + } }, "required": [ - "then_path", - "else_path" + "role" ] }, - "EscalationPathNodeIfElseV2": { + "IncidentRoleV1": { "type": "object", "properties": { - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionV2" - }, - "description": "The condition that defines which branch to take", - "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" - } - } - ] + "created_at": { + "type": "string", + "description": "When the role was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "else_path": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EscalationPathNodeV2" - }, - "description": "The nodes that form the levels if our condition is not met", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } + "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. 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 + }, + "role_type": { + "type": "string", + "description": "Type of incident role", + "example": "lead", + "enum": [ + "lead", + "reporter", + "custom" ] }, - "then_path": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EscalationPathNodeV2" - }, - "description": "The nodes that form the levels if our condition is met", - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead" + }, + "updated_at": { + "type": "string", + "description": "When the role 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": [ + "name", + "shortform", + "description", + "instructions", + "condition_groups", + "id", + "role_type", + "created_at", + "updated_at" + ] + }, + "IncidentRoleV2": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "When the role 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. 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" + }, + "updated_at": { + "type": "string", + "description": "When the role was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "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" - } - } - ], - "else_path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ], - "then_path": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] - }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "type": "if_else" - } - ] + "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": [ + "name", + "shortform", + "description", + "instructions", + "condition_groups", + "id", + "role_type", + "created_at", + "updated_at" + ] + }, + "IncidentStatusDefinitionsV1": { + "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" + ] + }, + "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" + }, + "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": [ - "conditions", - "then_path", - "else_path" + "id", + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "EscalationPathNodeLevelV2": { + "IncidentStatusV1": { "type": "object", "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EscalationPathTargetV2" - }, - "description": "The targets for this level", - "example": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ] - }, - "time_to_ack_interval_condition": { + "category": { "type": "string", - "description": "If the time to ack is relative to a time window, this defines whether we move when the window is active or inactive", - "example": "active", + "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": [ - "active", - "inactive" + "triage", + "declined", + "merged", + "canceled", + "live", + "learning", + "closed", + "paused" ] }, - "time_to_ack_seconds": { + "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": "How long should we wait for this level to acknowledge before escalating?", - "example": 1800, + "description": "Order of this incident status", + "example": 4, "format": "int64" }, - "time_to_ack_weekday_interval_config_id": { + "updated_at": { "type": "string", - "description": "If the time to ack is relative to a time window, this identifies which window it is relative to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "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": [ - "targets" + "id", + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "EscalationPathNodePayloadV2": { + "IncidentStatusV2": { "type": "object", "properties": { - "id": { + "category": { "type": "string", - "description": "Unique internal ID of the escalation path node", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "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" + ] }, - "if_else": { - "$ref": "#/components/schemas/EscalationPathNodeIfElsePayloadV2" + "created_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "level": { - "$ref": "#/components/schemas/EscalationPathNodeLevelV2" + "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." }, - "repeat": { - "$ref": "#/components/schemas/EscalationPathNodeRepeatV2" + "id": { + "type": "string", + "description": "Unique ID of this incident status", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "type": { + "name": { "type": "string", - "description": "The type of this node: level or branch", - "example": "if_else", - "enum": [ - "if_else", - "repeat", - "level", - "notify_channel" - ] + "description": "Unique name of this status", + "example": "Closed" + }, + "rank": { + "type": "integer", + "description": "Order of this incident status", + "example": 4, + "format": "int64" + }, + "updated_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} - ] + "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" }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "name": { + "type": "string", + "description": "Name of the lifecycle event", + "example": "last_activity" + } + }, + "example": { + "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" }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "name": { + "type": "string", + "description": "Unique name of this timestamp", + "example": "Impact started" }, - "type": "if_else" + "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": [ "id", - "type" + "name", + "description", + "rank", + "set_on_creation", + "set_on_acceptance", + "set_on_resolution", + "set_by_rules", + "timestamp_type", + "created_at", + "updated_at" ] }, - "EscalationPathNodeRepeatV2": { + "IncidentTimestampValuePayloadV2": { "type": "object", "properties": { - "repeat_times": { - "type": "integer", - "description": "How many times to repeat these steps", - "example": 3, - "format": "int64" + "incident_timestamp_id": { + "type": "string", + "description": "The id of the incident timestamp that this incident timestamp value is associated with.", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "to_node": { + "value": { "type": "string", - "description": "Which node ID we begin repeating from", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The current value of this timestamp, for this incident", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" }, "required": [ - "to_node", - "repeat_times" + "incident_timestamp_id", + "id", + "incident_id", + "created_at" ] }, - "EscalationPathNodeV2": { + "IncidentTimestampValueV2": { + "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" + } + }, + "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": { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "incident_timestamp" + ] + }, + "IncidentTypeV1": { "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" + ] + }, + "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 internal ID of the escalation path node", + "description": "Unique identifier for this Incident Type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "if_else": { - "$ref": "#/components/schemas/EscalationPathNodeIfElseV2" + "is_default": { + "type": "boolean", + "description": "The default Incident Type is used when no other type is explicitly specified", + "example": false }, - "level": { - "$ref": "#/components/schemas/EscalationPathNodeLevelV2" + "name": { + "type": "string", + "description": "The name of this Incident Type", + "example": "Production Outage" }, - "repeat": { - "$ref": "#/components/schemas/EscalationPathNodeRepeatV2" + "private_incidents_only": { + "type": "boolean", + "description": "Should all incidents created with this Incident Type be private?", + "example": false }, - "type": { + "updated_at": { "type": "string", - "description": "The type of this node: level or branch", - "example": "if_else", - "enum": [ - "if_else", - "repeat", - "level", - "notify_channel" - ] + "description": "When this resource was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "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" - } - } - ], - "else_path": [ - {} - ], - "then_path": [ - {} + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "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" + ] + }, + "IncidentTypeV2": { + "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" ] }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "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" }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "private_incidents_only": { + "type": "boolean", + "description": "Should all incidents created with this Incident Type be private?", + "example": false }, - "type": "if_else" + "updated_at": { + "type": "string", + "description": "When this resource was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "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" }, "required": [ "id", - "type" + "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" ] }, - "EscalationPathTargetV2": { + "IncidentUpdateV2": { "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": "Uniquely identifies an entity of this type", - "example": "lawrencejones" + "description": "Unique identifier for this incident update", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "type": { + "incident_id": { "type": "string", - "description": "Controls what type of entity this target identifies, such as EscalationPolicy or User", - "example": "user", - "enum": [ - "schedule", - "user", - "slack_channel" - ] + "description": "The incident this update relates to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "urgency": { + "merged_into_incident_id": { "type": "string", - "description": "The urgency of this escalation path target", - "example": "high", - "enum": [ - "high", - "low" - ] + "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/IncidentStatusV2" + }, + "new_severity": { + "$ref": "#/components/schemas/SeverityV2" + }, + "updater": { + "$ref": "#/components/schemas/ActorV2" } }, "example": { - "id": "lawrencejones", - "type": "user", - "urgency": "high" + "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": [ - "type", "id", - "urgency" + "incident_id", + "new_incident_status", + "updater", + "created_at", + "next_update_in_minutes" ] }, - "EscalationPathV2": { + "IncidentV1": { "type": "object", "properties": { - "id": { + "call_url": { "type": "string", - "description": "Unique identifier for this escalation path.", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "The call URL attached to this incident", + "example": "https://zoom.us/foo" }, - "name": { + "created_at": { "type": "string", - "description": "The name of this escalation path, for the user's reference.", - "example": "Urgent Support" + "description": "When the incident was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "path": { + "creator": { + "$ref": "#/components/schemas/ActorV1" + }, + "custom_field_entries": { "type": "array", "items": { - "$ref": "#/components/schemas/EscalationPathNodeV2" + "$ref": "#/components/schemas/CustomFieldEntryV1" }, - "description": "The nodes that form the levels and branches of this escalation path.", + "description": "Custom field entries for this incident", "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ { - "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_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ], - "else_path": [ - {} - ], - "then_path": [ - {} ] }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "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 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" }, - "type": "if_else" + "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" + } } ] }, - "working_hours": { + "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/SeverityV1" + }, + "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" + }, + "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": { "type": "array", "items": { - "$ref": "#/components/schemas/WeekdayIntervalConfigV2" + "$ref": "#/components/schemas/IncidentTimestampV1" }, - "description": "The working hours for this escalation path.", + "description": "Incident lifecycle events and when they last occurred", "example": [ { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" } ] + }, + "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": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Urgent Support", - "path": [ - { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "if_else": { - "conditions": [ + "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": [ { - "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_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ], - "else_path": [ - {} - ], - "then_path": [ - {} ] }, - "level": { - "targets": [ - { - "id": "lawrencejones", - "type": "user", - "urgency": "high" - } - ], - "time_to_ack_interval_condition": "active", - "time_to_ack_seconds": 1800, - "time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "repeat": { - "repeat_times": 3, - "to_node": "01FCNDV6P870EA6S7TK1DSYDG0" + "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" }, - "type": "if_else" + "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" + } } ], - "working_hours": [ + "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": [ { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] + "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", - "path", - "levels", - "repeat_times" + "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", + "postmortem_status", + "created_at", + "updated_at", + "reported_at" ] }, - "ExpressionBranchPayloadV2": { + "IncidentV2": { "type": "object", "properties": { - "condition_groups": { + "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/ConditionGroupPayloadV2" + "$ref": "#/components/schemas/CustomFieldEntryV2" }, - "description": "When one of these condition groups are satisfied, this branch will be evaluated", + "description": "Custom field entries for this incident", "example": [ { - "conditions": [ + "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": [ { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" + "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" } ] } ] }, - "result": { - "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + "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" + }, + "has_debrief": { + "type": "boolean", + "description": "If this incident has a debrief attached", + "example": false + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentV2" + }, + "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/IncidentStatusV2" + }, + "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/IncidentTypeV2" + }, + "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. 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": { - "condition_groups": [ + "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": [ { - "conditions": [ + "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": [ { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" + "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" } ] } ], - "result": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" + "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" + }, + "has_debrief": false, + "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_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 }, "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" - } - } - ] - } - ] + "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", + "postmortem_status", + "created_at", + "updated_at", + "reported_at" + ] + }, + "IncidentWithStatusChangeV2": { + "type": "object", + "properties": { + "incident": { + "$ref": "#/components/schemas/IncidentV2" }, - "result": { - "$ref": "#/components/schemas/EngineParamBindingV3" + "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_status": { + "$ref": "#/components/schemas/IncidentStatusV2" + }, + "previous_status": { + "$ref": "#/components/schemas/IncidentStatusV2" } }, "example": { - "condition_groups": [ - { - "conditions": [ - { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, - "param_bindings": [ + "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": [ { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } - ], - "subject": { - "label": "Incident Severity", - "reference": "incident.severity" + ] + }, + "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" + }, + "has_debrief": false, + "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" } - ] - } - ], - "result": { - "array_value": [ + } + ], + "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": [ { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } ], - "value": { - "label": "Lawrence Jones", - "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 + }, + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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": [ - "condition_groups", - "result" + "incident", + "previous_status", + "new_status" ] }, - "ExpressionBranchesOptsPayloadV2": { + "ListEntriesResponseBody": { "type": "object", "properties": { - "branches": { + "catalog_entries": { "type": "array", "items": { - "$ref": "#/components/schemas/ExpressionBranchPayloadV2" + "$ref": "#/components/schemas/CatalogEntryV2" }, - "description": "The branches to apply for this operation", "example": [ { - "condition_groups": [ - { - "conditions": [ + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" } - ] - } - ], - "result": { - "array_value": [ - { + ], + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity" + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" } - ], - "value": { - "literal": "SEV123", - "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": { - "$ref": "#/components/schemas/ReturnsMetaV2" + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" + }, + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "branches": [ + "catalog_entries": [ { - "condition_groups": [ - { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] - } + "aliases": [ + "lawrence@incident.io", + "lawrence" ], - "result": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - } - ], - "returns": { - "array": true, - "type": "IncidentStatus" - } - }, - "required": [ - "branches", - "returns" - ] - }, - "ExpressionBranchesOptsV2": { - "type": "object", - "properties": { - "branches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExpressionBranchV2" - }, - "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": { + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity" + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, "label": "Lawrence Jones", "literal": "SEV123", - "reference": "incident.severity" + "reference": "incident.severity", + "sort_key": "abc123", + "unavailable": false, + "value": "abc123" } } - } - ] - }, - "returns": { - "$ref": "#/components/schemas/ReturnsMetaV2" - } - }, - "example": { - "branches": [ - { - "condition_groups": [ + }, + "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" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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": [ { - "conditions": [ + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ { - "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" - } + "attribute_id": "abc123", + "attribute_name": "abc123" } - ] + ], + "type": "Custom[\"Service\"]" } ], - "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" + "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": [ - "branches", - "returns" + "catalog_type", + "catalog_entries", + "pagination_meta" ] }, - "ExpressionElseBranchPayloadV2": { + "ListResourcesResponseBody": { "type": "object", "properties": { - "result": { - "$ref": "#/components/schemas/EngineParamBindingPayloadV2" - } - }, - "example": { - "result": { - "array_value": [ + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogResourceV2" + }, + "example": [ { - "literal": "SEV123", - "reference": "incident.severity" + "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" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "required": [ - "result" - ] - }, - "ExpressionElseBranchV2": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/EngineParamBindingV3" + ] } }, "example": { - "result": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "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": [ - "result" + "resources" ] }, - "ExpressionFilterOptsPayloadV2": { + "ListResponseBody": { "type": "object", "properties": { - "condition_groups": { + "actions": { "type": "array", "items": { - "$ref": "#/components/schemas/ConditionGroupPayloadV2" + "$ref": "#/components/schemas/ActionV1" }, - "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", "example": [ { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] + "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": { - "condition_groups": [ + "actions": [ { - "conditions": [ - { - "operation": "one_of", - "param_bindings": [ - { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - ], - "subject": "incident.severity" - } - ] + "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": [ - "condition_groups" + "actions" ] }, - "ExpressionFilterOptsV2": { + "ListResponseBody10": { "type": "object", "properties": { - "condition_groups": { + "incident_statuses": { "type": "array", "items": { - "$ref": "#/components/schemas/ConditionGroupV2" + "$ref": "#/components/schemas/IncidentStatusV1" }, - "description": "The condition groups to apply in this filter. Only one group needs to be satisfied for the filter to pass.", "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" - } - } - ] + "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": { - "condition_groups": [ + "incident_statuses": [ { - "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" - } - } - ] + "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": [ - "condition_groups" + "incident_statuses" ] }, - "ExpressionNavigateOptsPayloadV2": { + "ListResponseBody11": { "type": "object", "properties": { - "reference": { - "type": "string", - "description": "The reference that you want to navigate to", - "example": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "incident_timestamps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampV2" + }, + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] } }, "example": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "incident_timestamps": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] }, "required": [ - "reference" + "incident_timestamps" ] }, - "ExpressionNavigateOptsV2": { + "ListResponseBody12": { "type": "object", "properties": { - "reference": { - "type": "string", - "description": "The reference within the scope to navigate to", - "example": "1235" - }, - "reference_label": { - "type": "string", - "description": "The name of the reference to navigate to", - "example": "Teams" + "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": { - "reference": "1235", - "reference_label": "Teams" + "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": [ - "reference", - "reference_label" + "incident_types" ] }, - "ExpressionOperationPayloadV2": { + "ListResponseBody13": { "type": "object", "properties": { - "branches": { - "$ref": "#/components/schemas/ExpressionBranchesOptsPayloadV2" - }, - "filter": { - "$ref": "#/components/schemas/ExpressionFilterOptsPayloadV2" - }, - "navigate": { - "$ref": "#/components/schemas/ExpressionNavigateOptsPayloadV2" - }, - "operation_type": { - "type": "string", - "description": "The type of the operation", - "example": "navigate", - "enum": [ - "navigate", - "filter", - "count", - "min", - "max", - "random", - "first", - "parse", - "branches" - ] - }, - "parse": { - "$ref": "#/components/schemas/ExpressionParseOptsV2" - } - }, - "example": { - "branches": { - "branches": [ + "incident_updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentUpdateV2" + }, + "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" - } - ] - } - ], - "result": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" + "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" } } } - ], - "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" - } - ] + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" + } + }, + "example": { + "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" + } } - ] - }, - "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" - }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 } }, "required": [ - "operation_type", - "returns" + "incident_updates" ] }, - "ExpressionOperationV2": { + "ListResponseBody14": { "type": "object", "properties": { - "branches": { - "$ref": "#/components/schemas/ExpressionBranchesOptsV2" - }, - "filter": { - "$ref": "#/components/schemas/ExpressionFilterOptsV2" - }, - "navigate": { - "$ref": "#/components/schemas/ExpressionNavigateOptsV2" - }, - "operation_type": { - "type": "string", - "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": { - "branches": { - "branches": [ + "incidents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentV1" + }, + "example": [ { - "condition_groups": [ + "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": [ { - "conditions": [ + "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": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" }, - "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" - } + "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" } ] } ], - "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": [ + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "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" + "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" } ] }, - "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" - } - }, - "required": [ - "operation_type", - "returns" - ] - }, - "ExpressionParseOptsV2": { - "type": "object", - "properties": { - "returns": { - "$ref": "#/components/schemas/ReturnsMetaV2" - }, - "source": { - "type": "string", - "description": "Source expression that is evaluated to a result", - "example": "metadata.annotations[\"github.com/repo\"]" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + "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": [ - "source", - "returns" + "incidents" ] }, - "ExpressionPayloadV2": { + "ListResponseBody15": { "type": "object", "properties": { - "else_branch": { - "$ref": "#/components/schemas/ExpressionElseBranchPayloadV2" - }, - "label": { - "type": "string", - "description": "The human readable label of the expression", - "example": "Team Slack channel" - }, - "operations": { + "incidents": { "type": "array", "items": { - "$ref": "#/components/schemas/ExpressionOperationPayloadV2" + "$ref": "#/components/schemas/IncidentV2" }, "example": [ { - "branches": { - "branches": [ - { - "condition_groups": [ + "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": [ { - "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" + "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" + }, + "has_debrief": false, + "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" } - ], - "returns": { - "array": true, - "type": "IncidentStatus" } + ], + "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" }, - "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" - } - ] + "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" }, - "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "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" }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" - } + "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 } ] }, - "reference": { - "type": "string", - "description": "A short ID that can be used to reference the expression", - "example": "abc123" - }, - "root_reference": { - "type": "string", - "description": "The root reference for this expression (i.e. where the expression starts)", - "example": "incident.status" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "else_branch": { - "result": { - "array_value": [ - { - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" - } - } - }, - "label": "Team Slack channel", - "operations": [ + "incidents": [ { - "branches": { - "branches": [ - { - "condition_groups": [ + "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": [ { - "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" + "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" + }, + "has_debrief": false, + "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" } - ], - "returns": { - "array": true, - "type": "IncidentStatus" } + ], + "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" }, - "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" - } - ] + "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" }, - "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "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" }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" - } + "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 } ], - "reference": "abc123", - "root_reference": "incident.status" + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + } }, "required": [ - "label", - "reference", - "root_reference", - "operations" + "incidents" ] }, - "ExpressionV2": { + "ListResponseBody16": { "type": "object", "properties": { - "else_branch": { - "$ref": "#/components/schemas/ExpressionElseBranchV2" - }, - "label": { - "type": "string", - "description": "The human readable label of the expression", - "example": "Team Slack channel" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" }, - "operations": { + "schedules": { "type": "array", "items": { - "$ref": "#/components/schemas/ExpressionOperationV2" + "$ref": "#/components/schemas/ScheduleV2" }, "example": [ { - "branches": { - "branches": [ + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ { - "condition_groups": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - } - ] + "interval": 1, + "interval_type": "daily" } ], - "result": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } - } - } - ], - "returns": { - "array": true, - "type": "IncidentStatus" - } - }, - "filter": { - "condition_groups": [ - { - "conditions": [ + ], + "name": "Primary On-Call Schedule", + "users": [ { - "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" - } + "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" } ] } ] }, - "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" - } + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" } ] - }, - "reference": { - "type": "string", - "description": "A short ID that can be used to reference the expression", - "example": "abc123" - }, - "returns": { - "$ref": "#/components/schemas/ReturnsMetaV2" - }, - "root_reference": { - "type": "string", - "description": "The root reference for this expression (i.e. where the expression starts)", - "example": "incident.status" } }, "example": { - "else_branch": { - "result": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - } + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 }, - "label": "Team Slack channel", - "operations": [ + "schedules": [ { - "branches": { - "branches": [ + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "config": { + "rotations": [ { - "condition_groups": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - } - ] + "interval": 1, + "interval_type": "daily" } ], - "result": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } - } - } - ], - "returns": { - "array": true, - "type": "IncidentStatus" - } - }, - "filter": { - "condition_groups": [ - { - "conditions": [ + ], + "name": "Primary On-Call Schedule", + "users": [ { - "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" - } + "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" } ] } ] }, - "navigate": { - "reference": "1235", - "reference_label": "Teams" - }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] }, - "returns": { - "array": true, - "type": "IncidentStatus" + "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/SeverityV1" + }, + "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" } + ] + } + }, + "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" } - ], - "reference": "abc123", - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "root_reference": "incident.status" + ] }, "required": [ - "label", - "reference", - "returns", - "root_reference", - "operations", - "id" + "severities" ] }, - "ExternalIssueReferenceV1": { + "ListResponseBody18": { "type": "object", "properties": { - "issue_name": { - "type": "string", - "description": "Human readable ID for the issue", - "example": "INC-123" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" }, - "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" + "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" + } + ] + } + }, + "example": { + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 }, - "provider": { - "type": "string", - "description": "ID of the issue tracker provider", - "example": "asana", - "enum": [ - "asana", - "click_up", - "linear", - "jira", - "jira_server", - "github", - "gitlab", - "shortcut" + "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" + } + ] + }, + "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": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - } + "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", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": [ + "actions" + ] }, - "ExternalIssueReferenceV2": { + "ListResponseBody3": { "type": "object", "properties": { - "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" + "custom_field_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] }, - "provider": { - "type": "string", - "description": "ID of the issue tracker provider", - "example": "asana", - "enum": [ - "asana", - "click_up", - "linear", - "jira", - "jira_server", - "github", - "gitlab", - "shortcut" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" + } + }, + "example": { + "custom_field_options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + } + }, + "required": [ + "custom_field_options", + "pagination_meta" + ] + }, + "ListResponseBody4": { + "type": "object", + "properties": { + "custom_fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldV1" + }, + "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" + } ] } }, "example": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "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": [ - "provider", - "provider_instance_id", - "issue_name", - "issue_permalink", - "issue_id" + "custom_fields" ] }, - "ExternalResourceV1": { + "ListResponseBody5": { "type": "object", "properties": { - "external_id": { - "type": "string", - "description": "ID of the resource in the external system", - "example": "123" - }, - "permalink": { - "type": "string", - "description": "URL of the resource", - "example": "https://my.pagerduty.com/incidents/ABC" - }, - "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" + "custom_fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldV2" + }, + "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" + } ] - }, - "title": { - "type": "string", - "description": "Title of resource", - "example": "The database has gone down" } }, "example": { - "external_id": "123", - "permalink": "https://my.pagerduty.com/incidents/ABC", - "resource_type": "pager_duty_incident", - "title": "The database has gone down" + "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": [ - "id", - "permalink", - "external_id", - "title", - "resource_type", - "resource_type_label", - "created_at", - "updated_at" + "custom_fields" ] }, - "FollowUpPriorityV2": { + "ListResponseBody6": { "type": "object", "properties": { - "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" + "follow_ups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FollowUpV2" + }, + "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 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] } }, "example": { - "description": "A follow-up that requires immediate attention.", - "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", - "name": "Urgent", - "rank": 10 + "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": [ - "id", - "name", - "rank" + "follow_ups" ] }, - "FollowUpV2": { + "ListResponseBody7": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" - }, - "completed_at": { - "type": "string", - "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" - }, - "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" + "incident_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentAttachmentV1" + }, + "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" + } + } ] - }, - "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": { - "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" + "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": [ - "id", - "incident_id", - "title", - "status", - "created_at", - "updated_at" + "incident_attachments" ] }, - "IdentityResponseBody": { + "ListResponseBody8": { "type": "object", "properties": { - "identity": { - "$ref": "#/components/schemas/IdentityV1" + "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", + "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" + } + ] } }, "example": { - "identity": { - "dashboard_url": "https://app.incident.io/my-org", - "name": "Alertmanager token", - "roles": [ - "incident_creator" - ] - } + "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": [ - "identity" + "incident_roles" ] }, - "IdentityV1": { + "ListResponseBody9": { "type": "object", "properties": { - "dashboard_url": { - "type": "string", - "description": "The dashboard URL for this organisation", - "example": "https://app.incident.io/my-org" - }, - "name": { - "type": "string", - "description": "The name assigned to the current API Key", - "example": "Alertmanager token" - }, - "roles": { + "incident_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", - "on_call_editor" - ] + "$ref": "#/components/schemas/IncidentRoleV2" }, - "description": "Which roles have been enabled for this key", "example": [ - "incident_creator" + { + "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": { - "dashboard_url": "https://app.incident.io/my-org", - "name": "Alertmanager token", - "roles": [ - "incident_creator" + "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": [ - "name", - "roles", - "dashboard_url" + "incident_roles" ] }, - "IncidentAttachmentV1": { + "ListScheduleEntriesResponseBody": { "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" + "pagination_meta": { + "$ref": "#/components/schemas/AfterPaginationMetaResultV2" }, - "resource": { - "$ref": "#/components/schemas/ExternalResourceV1" + "schedule_entries": { + "$ref": "#/components/schemas/ScheduleEntriesListPayloadV2" } }, "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" + "pagination_meta": { + "after": "abc123", + "after_url": "abc123" + }, + "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": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "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": [ - "id", - "organisation_id", - "incident_id", - "resource", - "creator", - "created_at" + "schedule_entries" ] }, - "IncidentDurationMetricV2": { + "ListTypesResponseBody": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique ID of this incident duration metric", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "name": { - "type": "string", - "description": "Unique name of this duration metric", - "example": "Lasted" + "catalog_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeV2" + }, + "example": [ + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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" + } + ] } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" + "catalog_types": [ + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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", - "rank", - "from_timestamp_id", - "to_timestamp_id", - "metric_type", - "calculation_mode", - "created_at", - "updated_at", - "validate" + "catalog_types" ] }, - "IncidentDurationMetricWithValueV2": { + "ListWorkflowsResponseBody": { "type": "object", "properties": { - "duration_metric": { - "$ref": "#/components/schemas/IncidentDurationMetricV2" - }, - "value_seconds": { - "type": "integer", - "description": "The calculated durations for this metric", - "example": 1, - "format": "int64" + "workflows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowSlim" + }, + "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" + } + } + ] + } + ], + "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", + "shortform": "abc123", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + ] } }, "example": { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "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", + "shortform": "abc123", + "state": "active", + "steps": [ + { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + } + ], + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } + ] }, "required": [ - "duration_metric" + "workflows" ] }, - "IncidentEditPayloadV2": { + "ManagedResourceV2": { "type": "object", "properties": { - "call_url": { - "type": "string", - "description": "The call URL attached to this incident", - "example": "https://zoom.us/foo" - }, - "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": "" - } - ] - } - ] - }, - "incident_role_assignments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" }, - "description": "Assign incident roles to these people", - "example": [ - { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - ] + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "incident_status_id": { + "managed_by": { "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_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" - } + "description": "How is this resource managed", + "example": "dashboard", + "enum": [ + "dashboard", + "terraform", + "external" ] }, - "name": { + "resource_id": { "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" + "description": "The ID of the related resource", + "example": "abc123" }, - "severity_id": { + "resource_type": { "type": "string", - "description": "Severity to change incident to", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "example": "workflow", + "enum": [ + "workflow", + "schedule" + ] }, - "summary": { + "source_url": { "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "description": "The url of the external repository where this resource is managed (if there is one)", + "example": "https://github.com/my-company/infrastructure" } }, "example": { - "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." - } - }, - "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" - }, - "updated_at": { - "type": "string", - "description": "When the membership was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "annotations": { + "incident.io/terraform/version": "3.0.0" }, - "user": { - "$ref": "#/components/schemas/UserV1" - } - }, - "example": { - "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" - } + "managed_by": "dashboard", + "resource_id": "abc123", + "resource_type": "workflow", + "source_url": "https://github.com/my-company/infrastructure" }, "required": [ - "id", - "user", - "incident_id", - "created_at", - "updated_at" + "resource_type", + "resource_id", + "managed_by", + "annotations" ] }, - "IncidentRoleAssignmentPayloadV1": { + "ManagementMetaDefinitionsV2": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "incident_role_id": { + "managed_by": { "type": "string", - "description": "Unique ID of an incident role. Note that the 'reporter' role can only be assigned when creating an incident.", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - } - }, - "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "required": [ - "incident_role_id", - "assignee" - ] - }, - "IncidentRoleAssignmentPayloadV2": { - "type": "object", - "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" + "description": "How is this resource managed", + "example": "dashboard", + "enum": [ + "dashboard", + "terraform", + "external" + ] }, - "incident_role_id": { + "source_url": { "type": "string", - "description": "Unique ID of an incident role", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "The url of the external repository where this resource is managed (if there is one)", + "example": "https://github.com/my-company/infrastructure" } }, "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "annotations": { + "incident.io/terraform/version": "3.0.0" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "required": [ - "incident_role_id" - ] + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" + } }, - "IncidentRoleAssignmentV1": { + "ManagementMetaV2": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "role": { - "$ref": "#/components/schemas/IncidentRoleV1" + "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": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "annotations": { + "incident.io/terraform/version": "3.0.0" }, - "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" - } + "managed_by": "dashboard", + "source_url": "https://github.com/my-company/infrastructure" }, "required": [ - "role" + "annotations", + "managed_by" ] }, - "IncidentRoleV1": { + "PaginationMetaResult": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the role 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": { + "after": { "type": "string", - "description": "Unique identifier for the role", + "description": "If provided, pass this as the 'after' param to load the next page", "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": "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" + "page_size": { + "type": "integer", + "description": "What was the maximum number of results requested", + "default": 25, + "example": 25, + "format": "int64" } }, "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" + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 }, "required": [ - "condition_groups", - "id", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" + "page_size" ] }, - "IncidentRoleV2": { + "PaginationMetaResultWithTotal": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the role 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": { + "after": { "type": "string", - "description": "Unique identifier for the role", + "description": "If provided, pass this as the 'after' param to load the next page", "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": "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 + "page_size": { + "type": "integer", + "description": "What was the maximum number of results requested", + "default": 25, + "example": 25, + "format": "int64" }, - "updated_at": { - "type": "string", - "description": "When the role was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "total_record_count": { + "type": "integer", + "description": "How many matching records were there in total, if known", + "example": 238, + "format": "int64" } }, "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" + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 }, "required": [ - "condition_groups", - "id", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" + "page_size" ] }, - "IncidentStatusV1": { + "PaginationParamDefinitions": { "type": "object", "properties": { - "category": { + "after": { "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" - ] + "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" }, - "created_at": { + "page_size": { + "type": "integer", + "description": "Integer number of records to return", + "default": 25, + "example": 25, + "format": "int64", + "maximum": 500 + } + }, + "example": { + "after": "01FDAG4SAP5TYPT98WGR2N7W91", + "page_size": 25 + } + }, + "Priority": { + "type": "object", + "properties": { + "archived_at": { "type": "string", + "description": "When this type was archived", "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." + "$ref": "#/components/schemas/TextNode" }, "id": { "type": "string", - "description": "Unique ID of this incident status", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "description": "The ID of this priority", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "is_default": { + "type": "boolean", + "description": "Whether this is the default priority", + "example": true }, "name": { "type": "string", - "description": "Unique name of this status", - "example": "Closed" + "description": "The human readable label for this priority", + "example": "P1" }, "rank": { "type": "integer", - "description": "Order of this incident status", - "example": 4, + "description": "The rank of the priority. Higher values are less urgent", + "example": 1, "format": "int64" }, - "updated_at": { - "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "slugs": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "All the slugs that this priority has", + "example": [ + "p1", + "priority-1" + ] } }, "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" + "archived_at": "2021-08-17T13:28:57.801578Z", + "description": { + "attrs": { + "level": 3 + }, + "content": [ + {} + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" + }, + "id": "01GW2G3V0S59R238FAHPDS1R66", + "is_default": true, + "name": "P1", + "rank": 1, + "slugs": [ + "p1", + "priority-1" + ] }, "required": [ "id", - "name", - "description", "rank", - "category", - "created_at", - "updated_at" + "name", + "slugs", + "is_default" ] }, - "IncidentTimestampV1": { + "PrivateIncidentAccessAttemptedV1ResponseBody": { "type": "object", "properties": { - "last_occurred_at": { + "action": { "type": "string", - "description": "When this last occurred, if it did", + "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" }, - "name": { - "type": "string", - "description": "Name of the lifecycle event", - "example": "last_activity" + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogTargetV2" + }, + "description": "The custom field that was created", + "example": [ + { + "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": { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "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": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" + } + ], + "version": 1 }, "required": [ - "name" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "IncidentTimestampV2": { + "PrivateIncidentActionCreatedV1ResponseBody": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique ID of this incident timestamp", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" - }, - "name": { + "event_type": { "type": "string", - "description": "Unique name of this timestamp", - "example": "Impact started" + "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" + ] }, - "rank": { - "type": "integer", - "description": "Order in which this timestamp should be shown", - "example": 1, - "format": "int64" + "private_incident.action_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "event_type": "private_incident.action_created_v1", + "private_incident.action_created_v1": { + "id": "abc123" + } }, "required": [ - "id", - "name", - "description", - "rank", - "set_on_creation", - "set_on_acceptance", - "set_on_resolution", - "set_by_rules", - "timestamp_type", - "created_at", - "updated_at" + "event_type", + "private_incident.action_created_v1" ] }, - "IncidentTimestampValuePayloadV2": { + "PrivateIncidentActionUpdatedV1ResponseBody": { "type": "object", "properties": { - "incident_timestamp_id": { + "event_type": { "type": "string", - "description": "The id of the incident timestamp that this incident timestamp value is associated with.", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "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" + ] }, - "value": { - "type": "string", - "description": "The current value of this timestamp, for this incident", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "private_incident.action_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.action_updated_v1", + "private_incident.action_updated_v1": { + "id": "abc123" + } }, "required": [ - "incident_timestamp_id", - "id", - "incident_id", - "created_at" + "event_type", + "private_incident.action_updated_v1" ] }, - "IncidentTimestampValueV2": { + "PrivateIncidentFollowUpCreatedV1ResponseBody": { "type": "object", "properties": { - "value": { + "event_type": { "type": "string", - "description": "The current value of this timestamp, for this incident", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "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": { - "value": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1": { + "id": "abc123" + } }, "required": [ - "id", - "incident_id", - "incident_timestamp_id", - "created_at" + "event_type", + "private_incident.follow_up_created_v1" ] }, - "IncidentTimestampWithValueV2": { + "PrivateIncidentFollowUpUpdatedV1ResponseBody": { "type": "object", "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" + "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" + ] }, - "value": { - "$ref": "#/components/schemas/IncidentTimestampValueV2" + "private_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1": { + "id": "abc123" } }, "required": [ - "incident_timestamp" + "event_type", + "private_incident.follow_up_updated_v1" ] }, - "IncidentTypeV1": { + "PrivateIncidentIncidentCreatedV2ResponseBody": { "type": "object", "properties": { - "create_in_triage": { + "event_type": { "type": "string", - "description": "Whether incidents of this must always, or can optionally, be created in triage", - "example": "always", + "description": "What type of event is this webhook for?", + "example": "private_incident.incident_created_v2", "enum": [ - "always", - "optional" + "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" ] }, - "created_at": { - "type": "string", - "description": "When this resource was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { + "private_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + } + }, + "example": { + "event_type": "private_incident.incident_created_v2", + "private_incident.incident_created_v2": { + "id": "abc123" + } + }, + "required": [ + "event_type", + "private_incident.incident_created_v2" + ] + }, + "PrivateIncidentIncidentUpdatedV2ResponseBody": { + "type": "object", + "properties": { + "event_type": { "type": "string", - "description": "What is this incident type for?", - "example": "Customer facing production outages" + "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" + ] }, - "id": { + "private_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" + } + }, + "example": { + "event_type": "private_incident.incident_updated_v2", + "private_incident.incident_updated_v2": { + "id": "abc123" + } + }, + "required": [ + "event_type", + "private_incident.incident_updated_v2" + ] + }, + "PrivateIncidentMembershipGrantedV1ResponseBody": { + "type": "object", + "properties": { + "event_type": { "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 + "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" + ] }, - "name": { + "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": { "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 + "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" + ] }, - "updated_at": { - "type": "string", - "description": "When this resource was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "private_incident.membership_revoked_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" } }, "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": "private_incident.membership_revoked_v1", + "private_incident.membership_revoked_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + } }, "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" + "event_type", + "private_incident.membership_revoked_v1" ] }, - "IncidentUpdateV2": { + "PublicIncidentActionCreatedV1ResponseBody": { "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" - }, - "merged_into_incident_id": { - "type": "string", - "description": "The ID of the incident that this incident was merged into, if it was merged in to another incident", - "example": "abc123" - }, - "message": { + "event_type": { "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" + "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" + ] }, - "updater": { - "$ref": "#/components/schemas/ActorV2" + "public_incident.action_created_v1": { + "$ref": "#/components/schemas/ActionV1" } }, "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": { + "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" - } + }, + "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", - "new_incident_status", - "updater", - "created_at", - "next_update_in_minutes" + "event_type", + "public_incident.action_created_v1" ] }, - "IncidentV1": { + "PublicIncidentActionUpdatedV1ResponseBody": { "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": { - "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 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_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. 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" - }, - "status": { + "event_type": { "type": "string", - "description": "Current status of the incident", - "example": "triage", + "description": "What type of event is this webhook for?", + "example": "public_incident.action_updated_v1", "enum": [ - "triage", - "investigating", - "fixing", - "monitoring", - "closed", - "declined" + "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" ] }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." - }, - "timestamps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTimestampV1" + "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" }, - "description": "Incident lifecycle events and when they last occurred", - "example": [ - { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" - } - ] - }, - "updated_at": { - "type": "string", - "description": "When the incident was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "visibility": { + "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": "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", + "description": "What type of event is this webhook for?", + "example": "public_incident.follow_up_created_v1", "enum": [ - "public", - "private" + "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" } }, "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": { + "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" - } - }, - "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", + }, + "completed_at": "2021-08-17T13:28:57.801578Z", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", + "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", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "event_type", + "public_incident.follow_up_created_v1" + ] + }, + "PublicIncidentFollowUpUpdatedV1ResponseBody": { + "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" + ] }, - "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": { + "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": "Issues with **low impact**.", + "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", - "name": "Minor", - "rank": 1, + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", "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", - "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" + "event_type", + "public_incident.follow_up_updated_v1" ] }, - "IncidentV2": { + "PublicIncidentIncidentCreatedV2ResponseBody": { "type": "object", "properties": { - "call_url": { - "type": "string", - "description": "The call URL attached to this incident", - "example": "https://zoom.us/foo" - }, - "created_at": { + "event_type": { "type": "string", - "description": "When the incident was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "creator": { - "$ref": "#/components/schemas/ActorV2" + "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/CustomFieldEntryV1" + "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" + } }, - "description": "Custom field entries for this incident", - "example": [ + "custom_field_entries": [ { "custom_field": { "description": "Which team is impacted by this issue", @@ -17983,15 +30785,8 @@ } ] } - ] - }, - "duration_metrics": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" - }, - "description": "Incident duration metrics and their measurements for this incident", - "example": [ + ], + "duration_metrics": [ { "duration_metric": { "id": "01FCNDV6P870EA6S7TK1DSYD5H", @@ -17999,23 +30794,15 @@ }, "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" + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" }, - "description": "A list of who is assigned to each role for this incident", - "example": [ + "has_debrief": false, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { "assignee": { "email": "lisa@incident.io", @@ -18036,18 +30823,17 @@ "updated_at": "2021-08-17T13:28:57.801578Z" } } - ] - }, - "incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "incident_timestamp_values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTimestampWithValueV2" + ], + "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": "Incident lifecycle events and when they occurred", - "example": [ + "incident_timestamp_values": [ { "incident_timestamp": { "id": "01FCNDV6P870EA6S7TK1DSYD5H", @@ -18058,290 +30844,290 @@ "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" - }, - "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. 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": { + ], + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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": "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", + "description": "What type of event is this webhook for?", + "example": "public_incident.incident_status_updated_v2", "enum": [ - "public", - "private" + "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" ] }, - "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" + "public_incident.incident_status_updated_v2": { + "$ref": "#/components/schemas/IncidentWithStatusChangeV2" } }, "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" - } - ] + "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" + } }, - "values": [ + "custom_field_entries": [ { - "value_catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call" + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] }, - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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" + }, + "has_debrief": false, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "value_text": "This is my text field, I hope you like it" + "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" + } } - ] - } - ], - "duration_metrics": [ - { - "duration_metric": { + ], + "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": "Lasted" + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "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", + "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", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "role": { + "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": "The person currently coordinating the incident", + "description": "Issues with **low impact**.", "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", + "name": "Minor", + "rank": 1, "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" - } + "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 + }, + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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" } - ], - "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" + "event_type", + "public_incident.incident_status_updated_v2" ] }, - "IncidentWithStatusChangeV2": { + "PublicIncidentIncidentUpdatedV2ResponseBody": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV2" - }, - "new_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "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" + ] }, - "previous_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "public_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookIncidentV2" } }, "example": { - "incident": { + "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": { @@ -18411,6 +31197,7 @@ "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", "provider": "asana" }, + "has_debrief": false, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { @@ -18466,10 +31253,14 @@ "updated_at": "2021-08-17T13:28:57.801578Z" }, "mode": "standard", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", "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**.", @@ -18488,2979 +31279,2680 @@ "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" + "event_type", + "public_incident.incident_updated_v2" ] }, - "ListEntriesResponseBody": { + "RBACRoleV2": { "type": "object", "properties": { - "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" - } - ] - }, - "catalog_type": { - "$ref": "#/components/schemas/CatalogTypeV2" + "description": { + "type": "string", + "description": "Description of the purpose for the RBAC role", + "example": "Elevated permissions for the customer success team." }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" - } - }, - "example": { - "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" - }, - "categories": [ - "issue-tracker" - ], - "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" + "id": { + "type": "string", + "description": "Unique identifier of the RBAC role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } - }, - "required": [ - "catalog_type", - "catalog_entries", - "pagination_meta" - ] - }, - "ListResourcesResponseBody": { - "type": "object", - "properties": { - "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": { - "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": [ - "resources" - ] - }, - "ListResponseBody": { - "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" - } - ] - } - }, - "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" - } - ] + "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": { - "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" - } - ] + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" }, "required": [ - "incident_statuses" + "id", + "name", + "slug" ] }, - "ListResponseBody11": { + "RetrospectiveIncidentOptionsV2": { "type": "object", "properties": { - "incident_timestamps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTimestampV2" - }, - "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - ] + "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": { - "incident_timestamps": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - ] + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "slack_channel_id": "abc123" + } + }, + "ReturnsMetaV2": { + "type": "object", + "properties": { + "array": { + "type": "boolean", + "description": "Whether the return value should be single or multi-value", + "example": true + }, + "type": { + "type": "string", + "description": "Expected return type of this expression (what to try casting the result to)", + "example": "IncidentStatus" + } + }, + "example": { + "array": true, + "type": "IncidentStatus" }, "required": [ - "incident_timestamps" + "type", + "array" ] }, - "ListResponseBody12": { + "RunscopeRequestAttribute": { "type": "object", "properties": { - "incident_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTypeV1" + "assertions": { + "type": "object", + "example": { + "abc123": "abc123" }, - "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" - } - ] + "additionalProperties": true + }, + "method": { + "type": "string", + "description": "HTTP Method of request sent", + "example": "abc123" + }, + "note": { + "type": "string", + "description": "A description or note of this request step", + "example": "abc123" + }, + "response_size_bytes": { + "type": "integer", + "description": "Number of bytes of response", + "example": 1, + "format": "int64" + }, + "response_status_code": { + "type": "string", + "description": "Status code of the response", + "example": "abc123" + }, + "response_time_ms": { + "type": "integer", + "description": "Time in milliseconds for response", + "example": 1, + "format": "int64" + }, + "result": { + "type": "string", + "description": "The result of the request", + "example": "abc123" + }, + "scripts": { + "type": "object", + "example": { + "abc123": "abc123" + }, + "additionalProperties": true + }, + "step_type": { + "type": "string", + "description": "The type of step in the request", + "example": "abc123" + }, + "url": { + "type": "string", + "description": "The URL of the request from Runscope", + "example": "abc123" + }, + "variables": { + "type": "object", + "example": { + "abc123": "abc123" + }, + "additionalProperties": true } }, "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" - } - ] - }, - "required": [ - "incident_types" - ] + "assertions": { + "abc123": "abc123" + }, + "method": "abc123", + "note": "abc123", + "response_size_bytes": 1, + "response_status_code": "abc123", + "response_time_ms": 1, + "result": "abc123", + "scripts": { + "abc123": "abc123" + }, + "step_type": "abc123", + "url": "abc123", + "variables": { + "abc123": "abc123" + } + } }, - "ListResponseBody13": { + "ScheduleConfigCreatePayloadV2": { "type": "object", "properties": { - "incident_updates": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentUpdateV2" + "$ref": "#/components/schemas/ScheduleRotationCreatePayloadV2" }, "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" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "hourly" } - } + ], + "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": "monday" + } + ] } ] - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "incident_updates": [ + "rotations": [ { - "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" + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "hourly" } - } + ], + "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": "monday" + } + ] } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } - }, - "required": [ - "incident_updates" - ] + ] + } }, - "ListResponseBody14": { + "ScheduleConfigUpdatePayloadV2": { "type": "object", "properties": { - "incidents": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentV1" + "$ref": "#/components/schemas/ScheduleRotationUpdatePayloadV2" }, "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": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - ] + "interval": 1, + "interval_type": "hourly" } ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "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" - } + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ], - "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": [ + "name": "My Rotation", + "users": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" } ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" + } + ] } ] - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "incidents": [ + "rotations": [ { - "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": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - ] + "interval": 1, + "interval_type": "hourly" } ], - "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" - } + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ], - "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": [ + "name": "My Rotation", + "users": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" } ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" + } + ] } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 - } - }, - "required": [ - "incidents" - ] + ] + } }, - "ListResponseBody15": { + "ScheduleConfigV2": { "type": "object", "properties": { - "incidents": { + "rotations": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentV2" + "$ref": "#/components/schemas/ScheduleRotationV2" }, + "description": "Rotas in this schedule", "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": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - ] + "interval": 1, + "interval_type": "hourly" } ], - "duration_metrics": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 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": [ + "name": "Primary On-Call Schedule", + "users": [ { - "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" - } + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ], - "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": [ + "working_interval": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" } - ], - "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": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "incidents": [ + "rotations": [ { - "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": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - ] + "interval": 1, + "interval_type": "hourly" } ], - "duration_metrics": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "duration_metric": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Lasted" - }, - "value_seconds": 1 + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 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": [ + "name": "Primary On-Call Schedule", + "users": [ { - "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" - } + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ], - "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": [ + "working_interval": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" + } + ] + } + ] + }, + "required": [ + "rotations", + "version" + ] + }, + "ScheduleCreatePayloadV2": { + "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/ScheduleConfigCreatePayloadV2" + }, + "holidays_public_config": { + "$ref": "#/components/schemas/ScheduleHolidaysPublicConfigPayloadV2" + }, + "name": { + "type": "string", + "description": "Name of the schedule", + "example": "My Schedule" + }, + "timezone": { + "type": "string", + "description": "Timezone of the schedule", + "example": "America/Los_Angeles" + } + }, + "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": "hourly" + } + ], + "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": "monday" } + ] + } + ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + }, + "ScheduleEntriesListPayloadV2": { + "type": "object", + "properties": { + "final": { + "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" } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", + } + ] + }, + "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": { + "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", - "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**.", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + ], + "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": "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 + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } } ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 - } + "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": [ - "incidents" + "scheduled", + "overrides", + "final" ] }, - "ListResponseBody16": { + "ScheduleEntryV2": { "type": "object", "properties": { - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" + "end_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "schedules": { + "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/UserV2" + } + }, + "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" + ] + }, + "ScheduleHolidaysPublicConfigPayloadV2": { + "type": "object", + "properties": { + "country_codes": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleV2" + "type": "string", + "example": "abc123" }, + "description": "ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for", "example": [ - { - "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" - } + "abc123" ] } }, "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": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Primary On-Call Schedule", - "timezone": "Europe/London", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "country_codes": [ + "abc123" ] }, "required": [ - "schedules" + "country_codes" ] }, - "ListResponseBody17": { + "ScheduleHolidaysPublicConfigV2": { "type": "object", "properties": { - "severities": { + "country_codes": { "type": "array", "items": { - "$ref": "#/components/schemas/SeverityV2" + "type": "string", + "example": "abc123" }, + "description": "ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for", "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" - } + "GB", + "FR" ] } }, "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" - } + "country_codes": [ + "GB", + "FR" ] }, "required": [ - "severities" + "country_codes" ] }, - "ListResponseBody18": { + "ScheduleLayerCreatePayloadV2": { "type": "object", "properties": { - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" + "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" + ] + }, + "ScheduleLayerUpdatePayloadV2": { + "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" + } + }, + "ScheduleLayerV2": { + "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" + } + }, + "ScheduleOverrideCreatePayloadV2": { + "type": "object", + "properties": { + "end_at": { + "type": "string", + "description": "End time of the override", + "example": "2021-08-17T14:00:00.000000Z", + "format": "date-time" + }, + "layer_id": { + "type": "string", + "description": "The layer this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYNH" + }, + "rotation_id": { + "type": "string", + "description": "The rotation this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "schedule_id": { + "type": "string", + "description": "The schedule this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "start_at": { + "type": "string", + "description": "Start time of the override", + "example": "2021-08-17T13:00:00.000000Z", + "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/UserReferencePayloadV2" + } + }, + "example": { + "end_at": "2021-08-17T14:00:00.000000Z", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "schedule_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:00:00.000000Z", + "user": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + }, + "required": [ + "start_at", + "end_at", + "schedule_id", + "rotation_id", + "layer_id", + "user" + ] + }, + "ScheduleOverrideV2": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "end_at": { + "type": "string", + "description": "End of the override", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "Unique internal ID of the schedule override", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layer_id": { + "type": "string", + "description": "The layer on the rotation on the schedule that this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "rotation_id": { + "type": "string", + "description": "The rotation on the schedule that this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "schedule_id": { + "type": "string", + "description": "The schedule that this override applies to", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "start_at": { + "type": "string", + "description": "Start of the override", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/UserV2" + } + }, + "example": { + "created_at": "2021-08-17T13:28:57.801578Z", + "end_at": "2021-08-17T13:28:57.801578Z", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layer_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "schedule_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "start_at": "2021-08-17T13:28:57.801578Z", + "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", + "schedule_id", + "rotation_id", + "layer_id", + "user", + "start_at", + "end_at", + "created_at", + "updated_at", + "user_id" + ] + }, + "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/ScheduleRotationHandoverV2" + }, + "example": [ + { + "interval": 1, + "interval_type": "hourly" + } + ] + }, + "id": { + "type": "string", + "description": "Unique identifier of the rotation", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleLayerCreatePayloadV2" + }, + "example": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ] + }, + "name": { + "type": "string", + "description": "Name of the rotation", + "example": "My Rotation" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReferencePayloadV2" + }, + "example": [ + { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ] }, - "users": { + "working_interval": { "type": "array", "items": { - "$ref": "#/components/schemas/UserWithRolesV2" + "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalCreatePayloadV2" }, "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" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" } ] } }, "example": { - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - }, + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ + { + "interval": 1, + "interval_type": "hourly" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "My Rotation", "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" + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" } ] }, "required": [ - "users", - "pagination_meta" + "name" ] }, - "ListResponseBody2": { + "ScheduleRotationHandoverV2": { "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" - } + "interval": { + "type": "integer", + "example": 1, + "format": "int64" + }, + "interval_type": { + "type": "string", + "description": "How often a handover occurs", + "example": "hourly", + "enum": [ + "hourly", + "daily", + "weekly" ] } }, "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", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] - }, - "required": [ - "actions" - ] + "interval": 1, + "interval_type": "hourly" + } }, - "ListResponseBody3": { + "ScheduleRotationUpdatePayloadV2": { "type": "object", "properties": { - "custom_field_options": { + "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/CustomFieldOptionV1" + "$ref": "#/components/schemas/ScheduleRotationHandoverV2" }, "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "interval": 1, + "interval_type": "hourly" } ] }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" - } - }, - "example": { - "custom_field_options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } - }, - "required": [ - "custom_field_options", - "pagination_meta" - ] - }, - "ListResponseBody4": { - "type": "object", - "properties": { - "custom_fields": { + "id": { + "type": "string", + "description": "Unique identifier of the rotation", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "layers": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldV1" + "$ref": "#/components/schemas/ScheduleLayerUpdatePayloadV2" }, "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" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ] - } - }, - "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": { + }, + "name": { + "type": "string", + "description": "Name of the rotation", + "example": "My Rotation" + }, + "users": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldV2" + "$ref": "#/components/schemas/UserReferencePayloadV2" }, "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" + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" } ] - } - }, - "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": { + }, + "working_interval": { "type": "array", "items": { - "$ref": "#/components/schemas/FollowUpV2" + "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalUpdatePayloadV2" }, "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 - }, - "status": "outstanding", - "title": "Cat is stuck in the tree", - "updated_at": "2021-08-17T13:28:57.801578Z" + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" } ] } }, "example": { - "follow_ups": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" + "interval": 1, + "interval_type": "hourly" + } + ], + "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": "monday" } ] - }, - "required": [ - "follow_ups" - ] + } }, - "ListResponseBody7": { + "ScheduleRotationV2": { "type": "object", "properties": { - "incident_attachments": { + "effective_from": { + "type": "string", + "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/IncidentAttachmentV1" + "$ref": "#/components/schemas/ScheduleRotationHandoverV2" }, + "description": "Defines the handover intervals for this rota, in order they should apply", "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": "hourly" } ] - } - }, - "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" + }, + "id": { + "type": "string", + "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" } - } - ] - }, - "required": [ - "incident_attachments" - ] - }, - "ListResponseBody8": { - "type": "object", - "properties": { - "incident_roles": { + ] + }, + "name": { + "type": "string", + "description": "Human readable name synced from external provider", + "example": "Primary On-Call Schedule" + }, + "users": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleV1" + "$ref": "#/components/schemas/UserV2" }, "example": [ { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "email": "lisa@incident.io", "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" + "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": "monday" } ] } }, "example": { - "incident_roles": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "interval": 1, + "interval_type": "hourly" + } + ], + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ + { + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" + } + ], + "name": "Primary On-Call Schedule", + "users": [ + { + "email": "lisa@incident.io", "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" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + ], + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" } ] }, "required": [ - "incident_roles" + "id", + "name", + "layers", + "user_ids", + "working_intervals", + "handover_start_at", + "handovers" ] }, - "ListResponseBody9": { + "ScheduleRotationWorkingIntervalCreatePayloadV2": { "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" - } + "end_time": { + "type": "string", + "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": "Weekdays for use with a schedule", + "example": "monday", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" ] } }, "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" - } - ] + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" }, "required": [ - "incident_roles" + "weekday", + "start_time", + "end_time" ] }, - "ListScheduleEntriesResponseBody": { + "ScheduleRotationWorkingIntervalUpdatePayloadV2": { "type": "object", "properties": { - "pagination_meta": { - "$ref": "#/components/schemas/AfterPaginationMetaResultV2" + "end_time": { + "type": "string", + "description": "End time of the interval, in 24hr format", + "example": "17:00" }, - "schedule_entries": { - "$ref": "#/components/schemas/ScheduleEntriesListPayloadV2" - } - }, - "example": { - "pagination_meta": { - "after": "abc123", - "after_url": "abc123" + "start_time": { + "type": "string", + "description": "Start time of the interval, in 24hr format", + "example": "09:00" }, - "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": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - ], - "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" - } - } + "weekday": { + "type": "string", + "description": "Weekdays for use with a schedule", + "example": "monday", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" ] } }, - "required": [ - "schedule_entries" - ] + "example": { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" + } }, - "ListTypesResponseBody": { + "ScheduleRotationWorkingIntervalV2": { "type": "object", "properties": { - "catalog_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogTypeV2" - }, - "example": [ - { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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" - } + "end_time": { + "type": "string", + "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": "Weekdays for use with a schedule", + "example": "monday", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" ] } }, "example": { - "catalog_types": [ - { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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" - } - ] + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" }, "required": [ - "catalog_types" + "weekday", + "start_time", + "end_time" ] }, - "ListWorkflowsResponseBody": { + "ScheduleUpdatePayloadV2": { "type": "object", "properties": { - "workflows": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkflowSlim" + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about the schedule", + "example": { + "incident.io/terraform/version": "version-of-terraform" }, - "example": [ + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "config": { + "$ref": "#/components/schemas/ScheduleConfigUpdatePayloadV2" + }, + "holidays_public_config": { + "$ref": "#/components/schemas/ScheduleHolidaysPublicConfigPayloadV2" + }, + "name": { + "type": "string", + "description": "Name of the schedule", + "example": "My Schedule" + }, + "timezone": { + "type": "string", + "description": "Timezone of the schedule", + "example": "America/Los_Angeles" + } + }, + "example": { + "annotations": { + "incident.io/terraform/version": "version-of-terraform" + }, + "config": { + "rotations": [ { - "condition_groups": [ + "effective_from": "2021-08-17T13:28:57.801578Z", + "handover_start_at": "2021-08-17T13:28:57.801578Z", + "handovers": [ { - "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" - } - } - ] + "interval": 1, + "interval_type": "hourly" } ], - "continue_on_step_error": true, - "delay": { - "conditions_apply_over_delay": false, - "for_seconds": 60 - }, - "expressions": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "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" + "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": "monday" + } + ] + } + ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + }, + "ScheduleV2": { + "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" + } + }, + "config": { + "$ref": "#/components/schemas/ScheduleConfigV2" + }, + "created_at": { + "type": "string", + "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" + } + } + ] + }, + "holidays_public_config": { + "$ref": "#/components/schemas/ScheduleHolidaysPublicConfigV2" + }, + "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": { + "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": "hourly" } ], - "folder": "My folder 01", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "include_private_incidents": true, - "name": "My workflow", - "once_for": [ + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "layers": [ { - "array": false, - "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", - "label": "Incident -> Affected Team", - "type": "IncidentSeverity" + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Layer 1" } ], - "runs_from": "2021-08-17T13:28:57.801578Z", - "runs_on_incident_modes": [ - "standard", - "retrospective" - ], - "runs_on_incidents": "newly_created", - "state": "active", - "steps": [ + "name": "Primary On-Call Schedule", + "users": [ { - "label": "PagerDuty Escalate", - "name": "pagerduty.escalate" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" } ], - "trigger": { - "label": "Incident Updated", - "name": "incident.updated" - }, - "version": 3 + "working_interval": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "monday" + } + ] + } + ] + }, + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "annotations", + "id", + "name", + "timezone", + "external_provider", + "external_provider_id", + "created_at", + "updated_at" + ] + }, + "ScimGroupRoleMappingsUpdatedV1ResponseBody": { + "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" + }, + "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" } ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "workflows": [ + "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": [ { - "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 + "name": "Security", + "type": "scim_group" } - ] + ], + "version": 1 + }, + "required": [ + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" + ] + }, + "SeverityDefinitionsV1": { + "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": "Description of the severity", + "example": "Issues with **low impact**." + }, + "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": { + "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" + } + }, + "SeverityDefinitionsV2": { + "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": "Description of the severity", + "example": "Issues with **low impact**." + }, + "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" + } }, - "required": [ - "workflows" - ] + "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" + } }, - "ManagedResourceV2": { + "SeverityV1": { "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" - } + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "managed_by": { + "description": { "type": "string", - "description": "How is this resource managed", - "example": "dashboard", - "enum": [ - "dashboard", - "terraform", - "external" - ] + "description": "Description of the severity", + "example": "Issues with **low impact**." }, - "resource_id": { + "id": { "type": "string", - "description": "The ID of the related resource", - "example": "abc123" + "description": "Unique identifier of the severity", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "resource_type": { + "name": { "type": "string", - "description": "The type of the related resource", - "example": "schedule", - "enum": [ - "workflow", - "schedule" - ] + "description": "Human readable name of the severity", + "example": "Minor", + "maxLength": 50 }, - "source_url": { + "rank": { + "type": "integer", + "description": "Rank to help sort severities (lower numbers are less severe)", + "example": 1, + "format": "int64" + }, + "updated_at": { "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" + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "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" + "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": [ - "resource_type", - "resource_id", - "managed_by", - "annotations" + "id", + "name", + "description", + "rank", + "created_at", + "updated_at" ] }, - "ManagementMetaV2": { + "SeverityV2": { "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" - } + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "managed_by": { + "description": { "type": "string", - "description": "How is this resource managed", - "example": "dashboard", - "enum": [ - "dashboard", - "terraform", - "external" - ] + "description": "Description of the severity", + "example": "Issues with **low impact**." }, - "source_url": { + "id": { "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" + "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": { - "annotations": { - "incident.io/terraform/version": "3.0.0" - }, - "managed_by": "dashboard", - "source_url": "https://github.com/my-company/infrastructure" + "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": [ - "annotations", - "managed_by" + "id", + "name", + "description", + "rank", + "created_at", + "updated_at" ] }, - "PaginationMetaResult": { + "ShowEntryResponseBody": { "type": "object", "properties": { - "after": { - "type": "string", - "description": "If provided, pass this as the 'after' param to load the next page", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryV2" }, - "page_size": { - "type": "integer", - "description": "What was the maximum number of results requested", - "default": 25, - "example": 25, - "format": "int64" + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" } }, "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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": "abc123", + "image_url": "abc123", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "abc123", + "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" + }, + "categories": [ + "issue-tracker" + ], + "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": "alert", + "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": [ - "page_size" + "catalog_type", + "catalog_entry" ] }, - "PaginationMetaResultWithTotal": { + "ShowResponseBody": { "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" + "action": { + "$ref": "#/components/schemas/ActionV1" } }, "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + "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" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } }, "required": [ - "page_size" + "action" ] }, - "PrivateIncidentAccessAttemptedV1ResponseBody": { + "ShowResponseBody10": { "type": "object", "properties": { - "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/AuditLogTargetV2" + "incident_timestamp": { + "$ref": "#/components/schemas/IncidentTimestampV2" + } + }, + "example": { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + }, + "required": [ + "incident_timestamp" + ] + }, + "ShowResponseBody11": { + "type": "object", + "properties": { + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" + } + }, + "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" + } + }, + "required": [ + "incident_type" + ] + }, + "ShowResponseBody12": { + "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" + } + }, + "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" }, - "description": "The custom field that was created", - "example": [ + "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": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" } - ] - }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" } }, - "example": { - "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": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" - } - ], - "version": 1 - }, "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context", - "metadata" + "incident" ] }, - "PrivateIncidentActionCreatedV1ResponseBody": { + "ShowResponseBody13": { "type": "object", "properties": { - "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" + "incident": { + "$ref": "#/components/schemas/IncidentV2" } }, "example": { - "event_type": "private_incident.action_created_v1", - "private_incident.action_created_v1": { - "id": "abc123" + "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" + }, + "has_debrief": false, + "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 } }, "required": [ - "event_type", - "private_incident.action_created_v1" + "incident" ] }, - "PrivateIncidentActionUpdatedV1ResponseBody": { + "ShowResponseBody14": { "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" + "schedule": { + "$ref": "#/components/schemas/ScheduleV2" } }, "example": { - "event_type": "private_incident.action_updated_v1", - "private_incident.action_updated_v1": { - "id": "abc123" + "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" + } + } + ], + "holidays_public_config": { + "country_codes": [ + "GB", + "FR" + ] + }, + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "name": "Primary On-Call Schedule", + "timezone": "Europe/London", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, "required": [ - "event_type", - "private_incident.action_updated_v1" + "schedule" ] }, - "PrivateIncidentFollowUpCreatedV1ResponseBody": { + "ShowResponseBody15": { "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" + "severity": { + "$ref": "#/components/schemas/SeverityV1" } }, "example": { - "event_type": "private_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1": { - "id": "abc123" + "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": [ - "event_type", - "private_incident.follow_up_created_v1" + "severity" ] }, - "PrivateIncidentFollowUpUpdatedV1ResponseBody": { + "ShowResponseBody16": { "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" + "user": { + "$ref": "#/components/schemas/UserWithRolesV2" } }, "example": { - "event_type": "private_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1": { - "id": "abc123" + "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": [ - "event_type", - "private_incident.follow_up_updated_v1" + "user" ] }, - "PrivateIncidentIncidentCreatedV2ResponseBody": { + "ShowResponseBody2": { "type": "object", "properties": { - "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" + "action": { + "$ref": "#/components/schemas/ActionV2" } }, "example": { - "event_type": "private_incident.incident_created_v2", - "private_incident.incident_created_v2": { - "id": "abc123" + "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": [ - "event_type", - "private_incident.incident_created_v2" + "action" ] }, - "PrivateIncidentIncidentUpdatedV2ResponseBody": { - "type": "object", - "properties": { - "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" + "ShowResponseBody3": { + "type": "object", + "properties": { + "custom_field_option": { + "$ref": "#/components/schemas/CustomFieldOptionV1" } }, "example": { - "event_type": "private_incident.incident_updated_v2", - "private_incident.incident_updated_v2": { - "id": "abc123" + "custom_field_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" } }, "required": [ - "event_type", - "private_incident.incident_updated_v2" + "custom_field_option" ] }, - "PrivateIncidentMembershipGrantedV1ResponseBody": { + "ShowResponseBody4": { "type": "object", "properties": { - "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" + "custom_field": { + "$ref": "#/components/schemas/CustomFieldV1" } }, "example": { - "event_type": "private_incident.membership_granted_v1", - "private_incident.membership_granted_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" + "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": [ - "event_type", - "private_incident.membership_granted_v1" + "custom_field" ] }, - "PrivateIncidentMembershipRevokedV1ResponseBody": { + "ShowResponseBody5": { "type": "object", "properties": { - "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" + "custom_field": { + "$ref": "#/components/schemas/CustomFieldV2" } }, "example": { - "event_type": "private_incident.membership_revoked_v1", - "private_incident.membership_revoked_v1": { - "actor_user_id": "abc123", - "incident_id": "abc123", - "user_id": "abc123" + "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": [ - "event_type", - "private_incident.membership_revoked_v1" + "custom_field" ] }, - "PublicIncidentActionCreatedV1ResponseBody": { + "ShowResponseBody6": { "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" - ] - }, - "public_incident.action_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "follow_up": { + "$ref": "#/components/schemas/FollowUpV2" } }, "example": { - "event_type": "public_incident.action_created_v1", - "public_incident.action_created_v1": { + "follow_up": { "assignee": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -21476,2029 +33968,2500 @@ "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", + "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.action_created_v1" + "follow_up" ] }, - "PublicIncidentActionUpdatedV1ResponseBody": { + "ShowResponseBody7": { "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": { - "$ref": "#/components/schemas/ActionV1" + "incident_role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "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" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "incident_role": { "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": "The person currently coordinating the incident", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", + "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": [ - "event_type", - "public_incident.action_updated_v1" + "incident_role" ] }, - "PublicIncidentFollowUpCreatedV1ResponseBody": { + "ShowResponseBody8": { "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" - ] + "incident_role": { + "$ref": "#/components/schemas/IncidentRoleV2" + } + }, + "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", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "incident_role" + ] + }, + "ShowResponseBody9": { + "type": "object", + "properties": { + "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" }, - "public_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "workflow": { + "$ref": "#/components/schemas/Workflow" } }, "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" + "management_meta": { + "annotations": { + "incident.io/terraform/version": "3.0.0" }, - "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" + "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", + "shortform": "abc123", + "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" }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "version": 3 } }, "required": [ - "event_type", - "public_incident.follow_up_created_v1" + "workflow", + "management_meta" ] }, - "PublicIncidentFollowUpUpdatedV1ResponseBody": { + "Step": { "type": "object", "properties": { - "event_type": { + "description": { "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" - ] + "description": "Human readable description of what this step does", + "example": "Escalates a page to the default escalation policy of the configured PagerDuty service." }, - "public_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/ActionV1" + "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" + }, + "params": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamV2" + }, + "description": "Type information for the step parameters", + "example": [ + { + "array": true, + "default_value": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ] } }, "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" - } + "description": "Escalates a page to the default escalation policy of the configured PagerDuty service.", + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate", + "params": [ + { + "array": true, + "default_value": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "description": "What slack channel should we send the message to?", + "infer_reference": true, + "label": "To date", + "name": "severity", + "optional": true, + "type": "IncidentSeverity" + } + ] }, "required": [ - "event_type", - "public_incident.follow_up_updated_v1" + "name", + "label", + "description", + "params" ] }, - "PublicIncidentIncidentCreatedV2ResponseBody": { + "StepConfig": { "type": "object", "properties": { - "event_type": { + "for_each": { "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" - ] + "description": "Reference to the loop variable to run this step over", + "example": "abc123" }, - "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" - } + "id": { + "type": "string", + "description": "Unique ID of this step in a workflow", + "example": "abc123" + }, + "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" + }, + "param_bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EngineParamBindingV2" }, - "custom_field_entries": [ + "description": "Bindings for the step parameters", + "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": [ + "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" + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" } - ] - } - ], - "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" + "label": "Lawrence Jones", + "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", - "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 + ] } }, + "example": { + "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" + } + } + ] + }, "required": [ - "event_type", - "public_incident.incident_created_v2" + "id", + "name", + "label", + "description", + "param_bindings", + "params" ] }, - "PublicIncidentIncidentStatusUpdatedV2ResponseBody": { + "StepConfigPayload": { "type": "object", "properties": { - "event_type": { + "for_each": { "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" - ] + "description": "Reference to an expression that returns resources to run this step over", + "example": "abc123" }, - "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" + "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" + }, + "description": "List of parameter bindings", + "example": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } - ], - "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": { + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "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 - }, - "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" + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } + ] + }, + "required": [ + "id", + "name", + "param_bindings", + "label", + "description", + "params" + ] + }, + "StepConfigSlim": { + "type": "object", + "properties": { + "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": { + "label": "PagerDuty Escalate", + "name": "pagerduty.escalate" + }, "required": [ - "event_type", - "public_incident.incident_status_updated_v2" + "name", + "label", + "description", + "params" ] }, - "PublicIncidentIncidentUpdatedV2ResponseBody": { + "TextDocument": { "type": "object", "properties": { - "event_type": { + "markdown": { "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" - ] + "description": "the original Markdown string", + "example": "There's a snake in my boot" }, - "public_incident.incident_updated_v2": { - "$ref": "#/components/schemas/WebhookIncidentV2" + "text_node": { + "$ref": "#/components/schemas/TextNode" } }, "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" + "markdown": "There's a snake in my boot", + "text_node": { + "attrs": { + "level": 3 }, - "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" - } - } + "content": [ + {} ], - "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": [ + "marks": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "attrs": { + "color": "blue" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "type": "em" } ], - "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 + "text": "some nice text", + "type": "text" } }, "required": [ - "event_type", - "public_incident.incident_updated_v2" + "text_node", + "markdown" ] }, - "RBACRoleV2": { + "TextMark": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the purpose for the RBAC role", - "example": "Elevated permissions for the customer success team." + "attrs": { + "type": "object", + "description": "type-specific mark attributes", + "example": { + "color": "blue" + }, + "additionalProperties": true }, - "id": { + "type": { "type": "string", - "description": "Unique identifier of the RBAC role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "the type of the node, eg 'text'", + "example": "em" + } + }, + "example": { + "attrs": { + "color": "blue" }, - "name": { + "type": "em" + }, + "required": [ + "type" + ] + }, + "TextNode": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "description": "type-specific node attributes", + "example": { + "level": 3 + }, + "additionalProperties": true + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TextNode" + }, + "description": "children of this node", + "example": [ + { + "attrs": { + "level": 3 + }, + "content": [ + {} + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" + } + ] + }, + "marks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TextMark" + }, + "description": "marks that apply to this node, eg 'bold'", + "example": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ] + }, + "text": { "type": "string", - "description": "Name of the RBAC role", - "example": "Customer Success" + "description": "if this node doesn't have children, it has text content", + "example": "some nice text" }, - "slug": { + "type": { "type": "string", - "description": "Unique human-readable slug for the RBAC role", - "example": "customer-success" + "description": "the type of the node", + "example": "text" } }, "example": { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "attrs": { + "level": 3 + }, + "content": [ + { + "attrs": { + "level": 3 + }, + "content": [ + {} + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" + } + ], + "marks": [ + { + "attrs": { + "color": "blue" + }, + "type": "em" + } + ], + "text": "some nice text", + "type": "text" }, "required": [ - "id", - "name", - "slug" + "type" ] }, - "RetrospectiveIncidentOptionsV2": { + "TriggerSlim": { "type": "object", "properties": { - "postmortem_document_url": { + "label": { "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" + "description": "Human readable identifier for this trigger", + "example": "Incident Updated" }, - "slack_channel_id": { + "name": { "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" + "description": "Unique name of the trigger", + "example": "incident.updated" } }, "example": { - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "slack_channel_id": "abc123" - } + "label": "Incident Updated", + "name": "incident.updated" + }, + "required": [ + "name", + "label" + ] }, - "ReturnsMetaV2": { + "UpdateEntryRequestBody": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "Whether the return value should be single or multi-value", - "example": true + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": [ + "lawrence@incident.io", + "lawrence" + ] }, - "type": { + "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" + } + }, + "external_id": { "type": "string", - "description": "Expected return type of this expression (what to try casting the result to)", - "example": "IncidentStatus" + "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": { - "array": true, - "type": "IncidentStatus" + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "attribute_values": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "name": "Primary On-call", + "rank": 3 }, "required": [ - "type", - "array" + "name", + "attribute_values" ] }, - "ScheduleConfigCreatePayloadV2": { + "UpdateRequestBody": { "type": "object", "properties": { - "rotations": { + "alert_sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlertRouteAlertSourcePayloadV2" + }, + "description": "Which alert sources should this alert route match?", + "example": [ + { + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ] + } + ] + }, + "auto_decline_enabled": { + "type": "boolean", + "description": "Should triage incidents be declined when alerts are resolved?", + "example": false + }, + "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleRotationCreatePayloadV2" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, + "description": "What condition groups must be true for this alert route to fire?", "example": [ { - "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": [ + "conditions": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } ] } ] - } - }, - "example": { - "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" - } - ] - } - ] - } - }, - "ScheduleConfigUpdatePayloadV2": { - "type": "object", - "properties": { - "rotations": { + }, + "defer_time_seconds": { + "type": "integer", + "description": "How long should the escalation defer time be?", + "example": 1, + "format": "int64" + }, + "enabled": { + "type": "boolean", + "description": "Whether this alert route is enabled or not", + "example": false + }, + "escalation_bindings": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleRotationUpdatePayloadV2" + "$ref": "#/components/schemas/AlertRouteEscalationBindingPayloadV2" }, + "description": "Which escalation paths should this alert route escalate to?", "example": [ { - "effective_from": "2021-08-17T13:28:57.801578Z", - "handover_start_at": "2021-08-17T13:28:57.801578Z", - "handovers": [ - { - "interval": 1, - "interval_type": "daily" + "binding": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } - ], - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "layers": [ - { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + } + } + ] + }, + "expressions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpressionPayloadV2" + }, + "description": "The expressions used in this template", + "example": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ], - "name": "My Rotation", - "users": [ + }, + "label": "Team Slack channel", + "operations": [ { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "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\"]" + } } ], - "working_interval": [ + "reference": "abc123", + "root_reference": "incident.status" + } + ] + }, + "grouping_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupingKeyV2" + }, + "description": "Which attributes should this alert route use to group alerts?", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ] + }, + "grouping_window_seconds": { + "type": "integer", + "description": "How large should the grouping window be?", + "example": 1, + "format": "int64" + }, + "incident_condition_groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionGroupPayloadV2" + }, + "description": "What condition groups must be true for this alert route to create an incident?", + "example": [ + { + "conditions": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } ] } ] + }, + "incident_enabled": { + "type": "boolean", + "description": "Whether this alert route will create incidents or not", + "example": false + }, + "name": { + "type": "string", + "description": "The name of this alert route config, for the user's reference", + "example": "Production incidents" + }, + "template": { + "$ref": "#/components/schemas/AlertRouteIncidentTemplatePayloadV2" } }, "example": { - "rotations": [ + "alert_sources": [ { - "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": [ + "alert_source_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "condition_groups": [ { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] } - ], - "working_interval": [ + ] + } + ], + "auto_decline_enabled": false, + "condition_groups": [ + { + "conditions": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" } ] } - ] - } - }, - "ScheduleConfigV2": { - "type": "object", - "properties": { - "rotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleRotationV2" - }, - "description": "Rotas in this schedule", - "example": [ - { - "effective_from": "2021-08-17T13:28:57.801578Z", - "handover_start_at": "2021-08-17T13:28:57.801578Z", - "handovers": [ + ], + "defer_time_seconds": 1, + "enabled": false, + "escalation_bindings": [ + { + "binding": { + "array_value": [ { - "interval": 1, - "interval_type": "daily" + "literal": "SEV123", + "reference": "incident.severity" } ], - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "layers": [ - { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + } + ], + "expressions": [ + { + "else_branch": { + "result": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" } - ], - "name": "Primary On-Call Schedule", - "users": [ + } + }, + "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" + } + ], + "grouping_keys": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "grouping_window_seconds": 1, + "incident_condition_groups": [ + { + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] + } + ], + "incident_enabled": false, + "name": "Production incidents", + "template": { + "custom_field_priorities": { + "abc123": "abc123" + }, + "custom_fields": { + "custom_field_10014": { + "array_value": [ { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "literal": "SEV123", + "reference": "incident.severity" } ], - "working_interval": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" - } - ] + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ] - } - }, - "example": { - "rotations": [ - { - "effective_from": "2021-08-17T13:28:57.801578Z", - "handover_start_at": "2021-08-17T13:28:57.801578Z", - "handovers": [ + }, + "incident_mode": { + "array_value": [ { - "interval": 1, - "interval_type": "daily" + "literal": "SEV123", + "reference": "incident.severity" } ], - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "layers": [ + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "incident_type": { + "array_value": [ { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + "literal": "SEV123", + "reference": "incident.severity" } ], - "name": "Primary On-Call Schedule", - "users": [ + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "name": { + "array_value": [ { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "literal": "SEV123", + "reference": "incident.severity" } ], - "working_interval": [ + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "priority_severity": "severity-first-wins", + "severity": { + "array_value": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "literal": "SEV123", + "reference": "incident.severity" } - ] + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "summary": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + }, + "workspace": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } } - ] + } }, "required": [ - "rotations", - "version" + "name", + "condition_groups", + "grouping_keys", + "grouping_window_seconds", + "defer_time_seconds", + "escalation_bindings", + "auto_decline_enabled", + "enabled", + "incident_enabled", + "is_private", + "incident_condition_groups", + "alert_sources", + "auto_cancel_escalations" ] }, - "ScheduleCreatePayloadV2": { + "UpdateRequestBody2": { "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" - } + "sort_key": { + "type": "integer", + "description": "Sort key used to order the custom field options correctly", + "default": 1000, + "example": 10, + "format": "int64" }, - "config": { - "$ref": "#/components/schemas/ScheduleConfigCreatePayloadV2" + "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" + ] + }, + "UpdateRequestBody3": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" }, "name": { "type": "string", - "description": "Name of the schedule", - "example": "My Schedule" + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 }, - "timezone": { + "required": { "type": "string", - "description": "Timezone of the schedule", - "example": "America/Los_Angeles" - } - }, - "example": { - "annotations": { - "incident.io/terraform/version": "version-of-terraform" + "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" + ] }, - "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" - } - ] - } + "required_v2": { + "type": "string", + "description": "When this custom field must be set during the incident lifecycle.", + "example": "never", + "enum": [ + "never", + "before_resolution", + "always" ] }, - "name": "My Schedule", - "timezone": "America/Los_Angeles" - } + "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": [ + "name", + "description", + "field_type", + "show_before_creation", + "show_before_closure", + "show_before_update", + "options", + "created_at", + "updated_at" + ] }, - "ScheduleEntriesListPayloadV2": { + "UpdateRequestBody4": { "type": "object", "properties": { - "final": { - "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" - } - } - ] - }, - "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" - } - } - ] + "description": { + "type": "string", + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" }, - "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" - } - } - ] + "name": { + "type": "string", + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 } }, "example": { - "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": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - ], - "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" - } - } - ] + "description": "Which team is impacted by this issue", + "name": "Affected Team" }, "required": [ - "scheduled", - "overrides", - "final" + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" ] }, - "ScheduleEntryV2": { + "UpdateRequestBody5": { "type": "object", "properties": { - "end_at": { + "description": { "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "entry_id": { + "instructions": { "type": "string", - "description": "Unique identifier of the schedule entry", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "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" }, - "fingerprint": { + "name": { "type": "string", - "description": "A unique identifier for this entry, used to determine a unique shift", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 }, - "layer_id": { + "required": { + "type": "boolean", + "description": "DEPRECATED: this will always be false.", + "example": false + }, + "shortform": { "type": "string", - "description": "If present, the layer this entry applies to on the rota", - "example": "01G0J1EXE7AXZ2C93K61WBPYNH" + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead" + } + }, + "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", + "condition_groups", + "role_type", + "created_at", + "updated_at" + ] + }, + "UpdateRequestBody6": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "rotation_id": { + "instructions": { "type": "string", - "description": "If present, the rotation this entry applies to on the schedule", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "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" }, - "start_at": { + "name": { "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 }, - "user": { - "$ref": "#/components/schemas/UserV1" + "shortform": { + "type": "string", + "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", + "example": "lead" } }, "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" - } + "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": [ - "external_user_id", - "start_at", - "end_at" + "name", + "shortform", + "description", + "instructions", + "condition_groups", + "role_type", + "created_at", + "updated_at" ] }, - "ScheduleLayerCreatePayloadV2": { + "UpdateRequestBody7": { "type": "object", "properties": { - "id": { + "description": { "type": "string", - "description": "Unique identifier of the layer", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "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": "Name of the layer", - "example": "Layer 1" + "description": "Unique name of this status", + "example": "Closed" } }, "example": { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "name": "Closed" }, "required": [ - "name" + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "ScheduleLayerV2": { + "UpdateRequestBody8": { "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" + "schedule": { + "$ref": "#/components/schemas/ScheduleUpdatePayloadV2" } }, "example": { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" - } + "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" + } + ] + } + ] + }, + "holidays_public_config": { + "country_codes": [ + "abc123" + ] + }, + "name": "My Schedule", + "timezone": "America/Los_Angeles" + } + }, + "required": [ + "schedule", + "annotations", + "name", + "timezone", + "external_provider", + "external_provider_id", + "created_at", + "updated_at" + ] }, - "ScheduleRotationCreatePayloadV2": { + "UpdateTypeRequestBody": { "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" + "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" + } }, - "handovers": { + "categories": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleRotationHandoverV2" + "type": "string", + "example": "issue-tracker", + "enum": [ + "customer", + "issue-tracker", + "product-feature", + "service", + "on-call", + "team", + "user" + ] }, + "description": "What categories is this type considered part of", "example": [ - { - "interval": 1, - "interval_type": "daily" - } + "issue-tracker" ] }, - "id": { + "color": { "type": "string", - "description": "Unique identifier of the rotation", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] }, - "layers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleLayerCreatePayloadV2" - }, - "example": [ - { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" - } + "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": "alert", + "enum": [ + "alert", + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "escalation-path", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "status-page", + "store", + "star", + "tag", + "user", + "users" ] }, "name": { "type": "string", - "description": "Name of the rotation", - "example": "My Rotation" + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserReferencePayloadV1" - }, - "example": [ - { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - } - ] + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true }, - "working_interval": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeekdayIntervalV2" - }, - "example": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" - } - ] + "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": { - "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" - } + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "categories": [ + "issue-tracker" ], - "working_interval": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" - } - ] + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "alert", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog" }, "required": [ - "name" + "name", + "description" ] }, - "ScheduleRotationHandoverV2": { + "UpdateTypeSchemaRequestBody": { "type": "object", "properties": { - "interval": { + "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" - }, - "interval_type": { - "type": "string", - "example": "daily", - "enum": [ - "hourly", - "daily", - "weekly" - ] } }, "example": { - "interval": 1, - "interval_type": "daily" - } + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "path": [ + { + "attribute_id": "abc123" + } + ], + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "required": [ + "attributes", + "version", + "name", + "description", + "type_name", + "semantic_type", + "ranked", + "schema", + "icon", + "categories", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "engine_resource_type", + "mode", + "use_name_as_identifier" + ] }, - "ScheduleRotationUpdatePayloadV2": { + "UpdateWorkflowPayload": { "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" + "annotations": { + "type": "object", + "description": "Annotations that track metadata about this resource", + "example": { + "incident.io/terraform/version": "3.0.0" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } }, - "handovers": { + "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleRotationHandoverV2" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, + "description": "List of conditions to apply to the workflow", "example": [ { - "interval": 1, - "interval_type": "daily" + "conditions": [ + { + "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 of the rotation", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true }, - "layers": { + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" + }, + "expressions": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleLayerV2" + "$ref": "#/components/schemas/ExpressionPayloadV2" }, + "description": "The expressions used in the workflow", "example": [ { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + "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": "Name of the rotation", - "example": "My Rotation" + "description": "The human-readable name of the workflow", + "example": "My workflow" }, - "users": { + "once_for": { "type": "array", "items": { - "$ref": "#/components/schemas/UserReferencePayloadV1" + "type": "string", + "example": "incident.url" }, + "description": "Once For strategy to apply to this workflow", "example": [ - { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - } + "incident.url" ] }, - "working_interval": { + "runs_on_incident_modes": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleRotationWorkingIntervalUpdatePayloadV2" + "type": "string", + "example": "test", + "enum": [ + "standard", + "test", + "retrospective" + ] }, + "description": "Which modes of incident this should run on (defaults to just standard incidents)", "example": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" - } + "standard", + "retrospective" ] - } - }, - "example": { - "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" - } - ] - } - }, - "ScheduleRotationV2": { - "type": "object", - "properties": { - "effective_from": { - "type": "string", - "description": "When this rotation config will be effective from", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" }, - "handover_start_at": { + "runs_on_incidents": { "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" - } + "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" ] }, - "id": { + "shortform": { "type": "string", - "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" - } - ] + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" }, - "name": { + "state": { "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" - } + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", + "enum": [ + "active", + "disabled", + "draft", + "error" ] }, - "working_interval": { + "steps": { "type": "array", "items": { - "$ref": "#/components/schemas/WeekdayIntervalV2" + "$ref": "#/components/schemas/StepConfigPayload" }, + "description": "List of step to execute as part of the workflow", "example": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } ] } }, "example": { - "effective_from": "2021-08-17T13:28:57.801578Z", - "handover_start_at": "2021-08-17T13:28:57.801578Z", - "handovers": [ + "annotations": { + "incident.io/terraform/version": "3.0.0" + }, + "condition_groups": [ { - "interval": 1, - "interval_type": "daily" + "conditions": [ + { + "operation": "one_of", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ], + "subject": "incident.severity" + } + ] } ], - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "layers": [ + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 + }, + "expressions": [ { - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Layer 1" + "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" } ], - "name": "Primary On-Call Schedule", - "users": [ - { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "folder": "My folder 01", + "include_private_incidents": true, + "name": "My workflow", + "once_for": [ + "incident.url" ], - "working_interval": [ + "runs_on_incident_modes": [ + "standard", + "retrospective" + ], + "runs_on_incidents": "newly_created", + "shortform": "abc123", + "state": "active", + "steps": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" + "for_each": "abc123", + "id": "abc123", + "name": "pagerduty.escalate", + "param_bindings": [ + { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + ] } ] }, "required": [ - "id", "name", - "layers", - "user_ids", - "working_intervals", - "handover_start_at", - "handovers" + "once_for", + "condition_groups", + "steps", + "expressions", + "include_private_incidents", + "runs_on_incident_modes", + "continue_on_step_error", + "runs_on_incidents" ] }, - "ScheduleRotationWorkingIntervalUpdatePayloadV2": { - "type": "object", - "properties": { - "end_time": { - "type": "string", - "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": [ - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday", - "sunday" - ] - } - }, - "example": { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "tuesday" - } - }, - "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" - } - }, - "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" - } - }, - "ScheduleV2": { + "UserReferencePayloadV1": { "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" - } - }, - "config": { - "$ref": "#/components/schemas/ScheduleConfigV2" - }, - "created_at": { - "type": "string", - "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" - } - } - ] + "email": { + "type": "string", + "description": "The user's email address, matching the email on their Slack account", + "example": "bob@example.com" }, "id": { "type": "string", - "description": "Unique internal ID of the schedule", + "description": "The incident.io ID of a user", "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "name": { + "slack_user_id": { "type": "string", - "description": "Human readable name synced from external provider", - "example": "Primary On-Call Schedule" + "description": "The ID of the user's Slack account.", + "example": "USER123" + } + }, + "example": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } + }, + "UserReferencePayloadV2": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The user's email address, matching the email on their Slack account", + "example": "bob@example.com" }, - "timezone": { + "id": { "type": "string", - "description": "Timezone of the schedule, as interpreted at the point of generating the report", - "example": "Europe/London" + "description": "The incident.io ID of a user", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "updated_at": { + "slack_user_id": { "type": "string", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "The ID of the user's Slack account.", + "example": "USER123" } }, "example": { - "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" - } - } - ], + "email": "bob@example.com", "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Primary On-Call Schedule", - "timezone": "Europe/London", - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "required": [ - "annotations", - "id", - "name", - "timezone", - "external_provider", - "external_provider_id", - "created_at", - "updated_at" - ] + "slack_user_id": "USER123" + } }, - "ScimGroupRoleMappingsUpdatedV1ResponseBody": { + "UserRoleMembershipsUpdatedV1ResponseBody": { "type": "object", "properties": { "action": { "type": "string", "description": "The type of log entry that this is", - "example": "scim_group.role_mappings_updated" + "example": "user.role_memberships_updated" }, "actor": { "$ref": "#/components/schemas/AuditLogActorV2" @@ -23507,7 +36470,7 @@ "$ref": "#/components/schemas/AuditLogEntryContextV2" }, "metadata": { - "$ref": "#/components/schemas/AuditLogUserSCIMGroupMappingChangedMetadataV2" + "$ref": "#/components/schemas/AuditLogUserRoleMembershipChangedMetadataV2" }, "occurred_at": { "type": "string", @@ -23524,8 +36487,8 @@ "example": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" + "name": "Bob the builder", + "type": "user" } ] }, @@ -23537,7 +36500,7 @@ } }, "example": { - "action": "scim_group.role_mappings_updated", + "action": "user.role_memberships_updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -23561,8 +36524,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" + "name": "Bob the builder", + "type": "user" } ], "version": 1 @@ -23577,408 +36540,248 @@ "metadata" ] }, - "SeverityV2": { + "UserV1": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { + "email": { "type": "string", - "description": "Description of the severity", - "example": "Issues with **low impact**." + "description": "Email address of the user.", + "example": "lisa@incident.io" }, "id": { "type": "string", - "description": "Unique identifier of the severity", + "description": "Unique identifier of the user", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "name": { "type": "string", - "description": "Human readable name of the severity", - "example": "Minor", - "maxLength": 50 + "description": "Name of the user", + "example": "Lisa Karlin Curtis" }, - "rank": { - "type": "integer", - "description": "Rank to help sort severities (lower numbers are less severe)", - "example": 1, - "format": "int64" + "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" + ] }, - "updated_at": { + "slack_user_id": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Slack ID of the user", + "example": "U02AYNF2XJM" } }, "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, "required": [ + "role", "id", + "slack_role", "name", - "description", - "rank", - "created_at", - "updated_at" + "deprecated_base_role", + "organisation_id" ] }, - "ShowEntryResponseBody": { + "UserV2": { "type": "object", "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryV2" + "email": { + "type": "string", + "description": "Email address of the user.", + "example": "lisa@incident.io" }, - "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": { - "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" + "id": { + "type": "string", + "description": "Unique identifier of the user", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "categories": [ - "issue-tracker" - ], - "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": [ - "catalog_type", - "catalog_entry" - ] - }, - "ShowResponseBody": { - "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" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "action" - ] - }, - "ShowResponseBody10": { - "type": "object", - "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" - } - }, - "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - }, - "required": [ - "incident_timestamp" - ] - }, - "ShowResponseBody11": { - "type": "object", - "properties": { - "incident_type": { - "$ref": "#/components/schemas/IncidentTypeV1" - } - }, - "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" - } - }, - "required": [ - "incident_type" - ] - }, - "ShowResponseBody12": { - "type": "object", - "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV1" + "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": { - "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" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "required": [ + "role", + "id", + "slack_role", + "name", + "deprecated_base_role", + "organisation_id" + ] + }, + "UserWithRolesV2": { + "type": "object", + "properties": { + "base_role": { + "$ref": "#/components/schemas/RBACRoleV2" + }, + "custom_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RBACRoleV2" }, - "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": [ + "example": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + ] + }, + "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": { + "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": [ - "incident" + "base_role", + "custom_roles", + "role", + "id", + "slack_role", + "name", + "deprecated_base_role", + "organisation_id" ] }, - "ShowResponseBody13": { + "WebhookIncidentUserV2": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV2" + "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" + }, + "incident_id": { + "type": "string", + "description": "The ID of the incident", + "example": "abc123" + }, + "user_id": { + "type": "string", + "description": "The ID of the user", + "example": "abc123" } }, "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" - } + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + }, + "required": [ + "incident_id", + "user_id" + ] + }, + "WebhookIncidentV2": { + "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": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryV2" }, - "custom_field_entries": [ + "description": "Custom field entries for this incident", + "example": [ { "custom_field": { "description": "Which team is impacted by this issue", @@ -24017,8 +36820,15 @@ } ] } - ], - "duration_metrics": [ + ] + }, + "duration_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" + }, + "description": "Incident duration metrics and their measurements for this incident", + "example": [ { "duration_metric": { "id": "01FCNDV6P870EA6S7TK1DSYD5H", @@ -24026,14 +36836,28 @@ }, "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" + ] + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, + "has_debrief": { + "type": "boolean", + "description": "If this incident has a debrief attached", + "example": false + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentV2" }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "description": "A list of who is assigned to each role for this incident", + "example": [ { "assignee": { "email": "lisa@incident.io", @@ -24054,17 +36878,18 @@ "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_status": { + "$ref": "#/components/schemas/IncidentStatusV2" + }, + "incident_timestamp_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampWithValueV2" }, - "incident_timestamp_values": [ + "description": "Incident lifecycle events and when they occurred", + "example": [ { "incident_timestamp": { "id": "01FCNDV6P870EA6S7TK1DSYD5H", @@ -24075,132 +36900,255 @@ "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" + ] + }, + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV2" + }, + "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" + ] + }, + "most_recent_update_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" + }, + "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" + }, + "related_incidents": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" }, - "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" + "description": "Incident IDs of incidents related to this incident", + "example": [ + "INC-237" + ] + }, + "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": { - "schedule": { - "annotations": { - "incident.io/terraform/version": "3.0.0" + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" }, - "config": { - "rotations": [ + "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": [ { - "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" - } - ] + "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" } ] - }, - "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" - } + } + ], + "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" + }, + "has_debrief": false, + "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" } - ], - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "name": "Primary On-Call Schedule", - "timezone": "Europe/London", + } + ], + "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" - ] - }, - "ShowResponseBody15": { - "type": "object", - "properties": { - "severity": { - "$ref": "#/components/schemas/SeverityV2" - } - }, - "example": { + }, + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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**.", @@ -24208,55 +37156,143 @@ "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" - } + }, + "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": [ - "user" + "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", + "postmortem_status", + "created_at", + "updated_at", + "reported_at" ] }, - "ShowResponseBody2": { + "WebhookPayloadDefinitionsV2": { "type": "object", "properties": { - "action": { - "$ref": "#/components/schemas/ActionV2" + "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": { - "action": { + "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", @@ -24267,102 +37303,18 @@ "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": [ - "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": { + }, + "public_incident.action_updated_v1": { "assignee": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -24378,1158 +37330,667 @@ "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", - "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_up" - ] - }, - "ShowResponseBody7": { - "type": "object", - "properties": { - "incident_role": { - "$ref": "#/components/schemas/IncidentRoleV1" - } - }, - "example": { - "incident_role": { + }, + "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": "The person currently coordinating the incident", + "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", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": false, - "role_type": "lead", - "shortform": "lead", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "incident_role" - ] - }, - "ShowResponseBody8": { - "type": "object", - "properties": { - "incident_role": { - "$ref": "#/components/schemas/IncidentRoleV2" - } - }, - "example": { - "incident_role": { + }, + "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": "The person currently coordinating the incident", + "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", - "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" - ] - }, - "ShowResponseBody9": { - "type": "object", - "properties": { - "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, + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "incident_status" - ] - }, - "ShowWorkflowResponseBody": { - "type": "object", - "properties": { - "management_meta": { - "$ref": "#/components/schemas/ManagementMetaV2" - }, - "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" }, - "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 + "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" + } }, - "expressions": [ + "custom_field_entries": [ { - "else_branch": { - "result": { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "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" } - } + ] }, - "label": "Team Slack channel", - "operations": [ + "values": [ { - "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" - } - } - } + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" ], - "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" + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" }, - "operation_type": "navigate", - "parse": { - "returns": { - "array": true, - "type": "IncidentStatus" - }, - "source": "metadata.annotations[\"github.com/repo\"]" + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" }, - "returns": { - "array": true, - "type": "IncidentStatus" - } + "value_text": "This is my text field, I hope you like it" } - ], - "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": [ + "duration_metrics": [ { - "array": false, - "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", - "label": "Incident -> Affected Team", - "type": "IncidentSeverity" + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 } ], - "runs_from": "2021-08-17T13:28:57.801578Z", - "runs_on_incident_modes": [ - "standard", - "retrospective" - ], - "runs_on_incidents": "newly_created", - "state": "active", - "steps": [ + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "has_debrief": false, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { - "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" - } - } - ] + "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" + } } ], - "trigger": { - "label": "Incident Updated", - "name": "incident.updated" - }, - "version": 3 - } - }, - "required": [ - "workflow", - "management_meta" - ] - }, - "StepConfig": { - "type": "object", - "properties": { - "for_each": { - "type": "string", - "description": "Reference to the loop variable to run this step over", - "example": "abc123" - }, - "id": { - "type": "string", - "description": "Unique ID of this step in a workflow", - "example": "abc123" - }, - "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" - }, - "param_bindings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EngineParamBindingV3" + "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": "Bindings for the step parameters", - "example": [ + "incident_timestamp_values": [ { - "array_value": [ - { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } - ], + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "value": "2021-08-17T13:28:57.801578Z" } } - ] - } - }, - "example": { - "for_each": "abc123", - "id": "abc123", - "label": "PagerDuty Escalate", - "name": "pagerduty.escalate", - "param_bindings": [ - { - "array_value": [ + ], + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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": [ { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" + "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" + } + ] } ], - "value": { - "label": "Lawrence Jones", - "literal": "SEV123", - "reference": "incident.severity" - } + "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" + }, + "has_debrief": false, + "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 + }, + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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": [ - "id", - "name", - "label", - "description", - "param_bindings", - "params" - ] - }, - "StepConfigPayload": { - "type": "object", - "properties": { - "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" + "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" + } }, - "description": "List of parameter bindings", - "example": [ + "custom_field_entries": [ { - "array_value": [ + "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": [ { - "literal": "SEV123", - "reference": "incident.severity" + "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" } - ], - "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" + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 } - } - ] - }, - "required": [ - "id", - "name", - "param_bindings", - "label", - "description", - "params" - ] - }, - "StepConfigSlim": { - "type": "object", - "properties": { - "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": { - "label": "PagerDuty Escalate", - "name": "pagerduty.escalate" - }, - "required": [ - "name", - "label", - "description", - "params" - ] - }, - "TriggerSlim": { - "type": "object", - "properties": { - "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": { - "label": "Incident Updated", - "name": "incident.updated" - }, - "required": [ - "name", - "label" - ] - }, - "UpdateEntryRequestBody": { - "type": "object", - "properties": { - "aliases": { - "type": "array", - "items": { - "type": "string", - "example": "abc123" + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" }, - "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" + "has_debrief": false, + "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" }, - "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" + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" } - ], - "value": { - "literal": "SEV123", - "reference": "incident.severity" } - } - }, - "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": [ - "name", - "description", - "field_type", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody3": { - "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 - } - }, - "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": { - "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 + ], + "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", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", + "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 } - }, - "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": [ - "condition_groups", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" - ] + } }, - "UpdateRequestBody5": { + "WebhookPrivateResourceV2": { "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 - }, - "shortform": { + "id": { "type": "string", - "description": "Short human readable name for Slack. Note that this will be empty for the 'reporter' role.", - "example": "lead", - "minLength": 1 + "description": "The ID of the resource", + "example": "abc123" } }, "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" + "id": "abc123" }, "required": [ - "condition_groups", - "name", - "description", - "instructions", - "shortform", - "role_type", - "created_at", - "updated_at" + "id" ] }, - "UpdateRequestBody6": { + "WeekdayIntervalConfigV2": { "type": "object", "properties": { - "description": { + "id": { "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": "The unique identifier for this set of working intervals", + "example": "abc123" }, "name": { "type": "string", - "description": "Unique name of this status", - "example": "Closed" - } - }, - "example": { - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "name": "Closed" - }, - "required": [ - "name", - "description", - "rank", - "category", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody7": { - "type": "object", - "properties": { - "schedule": { - "$ref": "#/components/schemas/ScheduleUpdatePayloadV2" - } - }, - "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", - "annotations", - "name", - "timezone", - "external_provider", - "external_provider_id", - "created_at", - "updated_at" - ] - }, - "UpdateTypeRequestBody": { - "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" - } + "description": "A human readable label for this set of working intervals", + "example": "abc123" }, - "categories": { + "timezone": { + "type": "string", + "description": "How to interpret all the intervals", + "example": "abc123" + }, + "weekday_intervals": { "type": "array", "items": { - "type": "string", - "example": "issue-tracker", - "enum": [ - "customer", - "issue-tracker", - "product-feature", - "service", - "on-call", - "team", - "user" - ] + "$ref": "#/components/schemas/WeekdayIntervalV2" }, - "description": "What categories is this type considered part of", "example": [ - "issue-tracker" - ] - }, - "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" + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } ] - }, - "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" - }, - "categories": [ - "issue-tracker" - ], - "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" + "id": "abc123", + "name": "abc123", + "timezone": "abc123", + "weekday_intervals": [ + { + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" + } + ] }, "required": [ + "id", "name", - "description" + "timezone", + "weekday_intervals" ] }, - "UpdateTypeSchemaRequestBody": { + "WeekdayIntervalV2": { "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\"]" - } - ] + "end_time": { + "type": "string", + "description": "End time of the interval, in 24hr format", + "example": "17:00" }, - "version": { - "type": "integer", - "example": 1, - "format": "int64" + "start_time": { + "type": "string", + "description": "Start time of the interval, in 24hr format", + "example": "09:00" + }, + "weekday": { + "type": "string", + "example": "abc123" } }, "example": { - "attributes": [ - { - "array": false, - "backlink_attribute": "abc123", - "id": "01GW2G3V0S59R238FAHPDS1R66", - "mode": "manual", - "name": "tier", - "path": [ - { - "attribute_id": "abc123" - } - ], - "type": "Custom[\"Service\"]" - } - ], - "version": 1 + "end_time": "17:00", + "start_time": "09:00", + "weekday": "abc123" }, "required": [ - "attributes", - "version", - "name", - "description", - "type_name", - "semantic_type", - "ranked", - "schema", - "icon", - "categories", - "color", - "is_editable", - "annotations", - "created_at", - "updated_at", - "engine_resource_type", - "mode", - "use_name_as_identifier" + "weekday", + "start_time", + "end_time" ] }, - "UpdateWorkflowRequestBody": { + "Workflow": { "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" - } - }, "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/ConditionGroupPayloadV2" + "$ref": "#/components/schemas/ConditionGroupV2" }, - "description": "List of conditions to apply to the workflow", + "description": "Conditions that apply to the workflow trigger", "example": [ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } @@ -25546,20 +38007,22 @@ "expressions": { "type": "array", "items": { - "$ref": "#/components/schemas/ExpressionPayloadV2" + "$ref": "#/components/schemas/ExpressionV2" }, - "description": "The expressions used in the workflow", + "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" } @@ -25575,22 +38038,30 @@ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } @@ -25598,11 +38069,13 @@ "result": { "array_value": [ { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -25619,29 +38092,38 @@ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } ] }, "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "reference": "1235", + "reference_label": "Teams" }, "operation_type": "navigate", "parse": { @@ -25650,10 +38132,18 @@ "type": "IncidentStatus" }, "source": "metadata.annotations[\"github.com/repo\"]" + }, + "returns": { + "array": true, + "type": "IncidentStatus" } } ], "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" + }, "root_reference": "incident.status" } ] @@ -25663,6 +38153,11 @@ "description": "Folder to display the workflow in", "example": "My folder 01" }, + "id": { + "type": "string", + "description": "Unique identifier for the workflow", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, "include_private_incidents": { "type": "boolean", "description": "Whether to include private incidents", @@ -25676,19 +38171,30 @@ "once_for": { "type": "array", "items": { - "type": "string", - "example": "incident.url" + "$ref": "#/components/schemas/EngineReferenceV2" }, - "description": "Once For strategy to apply to this workflow", + "description": "This workflow will run 'once for' a list of references", "example": [ - "incident.url" + { + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" + } ] }, + "runs_from": { + "type": "string", + "description": "The time from which this workflow will run on incidents", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, "runs_on_incident_modes": { "type": "array", "items": { "type": "string", - "example": "test", + "description": "Incident mode that workflows can run on", + "example": "standard", "enum": [ "standard", "test", @@ -25710,6 +38216,11 @@ "newly_created_and_active" ] }, + "shortform": { + "type": "string", + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" + }, "state": { "type": "string", "description": "The state of the workflow (e.g. is it draft, or disabled)", @@ -25724,23 +38235,26 @@ "steps": { "type": "array", "items": { - "$ref": "#/components/schemas/StepConfigPayload" + "$ref": "#/components/schemas/StepConfig" }, - "description": "List of step to execute as part of the workflow", + "description": "Steps that are executed as part of the workflow", "example": [ { "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" } @@ -25748,32 +38262,46 @@ ] } ] + }, + "trigger": { + "$ref": "#/components/schemas/TriggerSlim" + }, + "version": { + "type": "integer", + "description": "Revision of the workflow, uniquely identifying its version", + "example": 3, + "format": "int64" } }, "example": { - "annotations": { - "incident.io/terraform/version": "3.0.0" - }, "condition_groups": [ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } @@ -25789,11 +38317,13 @@ "result": { "array_value": [ { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -25809,22 +38339,30 @@ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } @@ -25832,11 +38370,13 @@ "result": { "array_value": [ { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { + "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -25853,29 +38393,38 @@ { "conditions": [ { - "operation": "one_of", + "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": "incident.severity" + "subject": { + "label": "Incident Severity", + "reference": "incident.severity" + } } ] } ] }, "navigate": { - "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" + "reference": "1235", + "reference_label": "Teams" }, "operation_type": "navigate", "parse": { @@ -25884,889 +38433,630 @@ "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": [ - "incident.url" + { + "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", + "shortform": "abc123", "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": [ + "id", "name", - "once_for", + "trigger", + "version", + "expressions", "condition_groups", "steps", - "expressions", "include_private_incidents", "runs_on_incident_modes", "continue_on_step_error", - "runs_on_incidents" - ] - }, - "UserReferencePayloadV1": { - "type": "object", - "properties": { - "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": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - } - }, - "UserRoleMembershipsUpdatedV1ResponseBody": { - "type": "object", - "properties": { - "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" - }, - "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": { - "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" - }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Bob the builder", - "type": "user" - } - ], - "version": 1 - }, - "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context", - "metadata" - ] - }, - "UserV1": { - "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" - ] - }, - "slack_user_id": { - "type": "string", - "description": "Slack ID of the user", - "example": "U02AYNF2XJM" - } - }, - "example": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "required": [ - "role", - "id", - "slack_role", - "name", - "deprecated_base_role", - "organisation_id" + "runs_on_incidents", + "once_for", + "state" ] }, - "UserWithRolesV2": { + "WorkflowDefinitions": { "type": "object", "properties": { - "base_role": { - "$ref": "#/components/schemas/RBACRoleV2" - }, - "custom_roles": { + "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/RBACRoleV2" + "$ref": "#/components/schemas/ConditionGroupV2" }, + "description": "Conditions that apply to the workflow trigger", "example": [ { - "description": "Elevated permissions for the customer success team.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Customer Success", - "slug": "customer-success" + "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" + } + } + ] } ] }, - "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": { - "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": [ - "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. If the action was not taken by a user, for example it was taken by a Workflow, this will be empty.", - "example": "abc123" - }, - "incident_id": { - "type": "string", - "description": "The ID of the incident", - "example": "abc123" - }, - "user_id": { - "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" - ] - }, - "WebhookIncidentV2": { - "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" + "continue_on_step_error": { + "type": "boolean", + "description": "Whether to continue executing the workflow if a step fails", + "example": true }, - "creator": { - "$ref": "#/components/schemas/ActorV2" + "delay": { + "$ref": "#/components/schemas/WorkflowDelay" }, - "custom_field_entries": { + "expressions": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldEntryV1" + "$ref": "#/components/schemas/ExpressionV2" }, - "description": "Custom field entries for this incident", + "description": "Expressions that make variables available in the scope", "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" + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "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": { + "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" + } + } + } ], - "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": { + "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" + } + } + ] + } + ] }, - "value_text": "This is my text field, I hope you like it" + "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" + } } - ] - } - ] - }, - "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" + ], + "reference": "abc123", + "returns": { + "array": true, + "type": "IncidentStatus" }, - "value_seconds": 1 + "root_reference": "incident.status" } ] }, - "external_issue_reference": { - "$ref": "#/components/schemas/ExternalIssueReferenceV2" + "folder": { + "type": "string", + "description": "Folder to display the workflow in", + "example": "My folder 01" }, "id": { "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "Unique identifier for the workflow", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "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" - } - } - ] + "include_private_incidents": { + "type": "boolean", + "description": "Whether to include private incidents", + "example": true }, - "incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" + "name": { + "type": "string", + "description": "The human-readable name of the workflow", + "example": "My workflow" }, - "incident_timestamp_values": { + "once_for": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampWithValueV2" + "$ref": "#/components/schemas/EngineReferenceV2" }, - "description": "Incident lifecycle events and when they occurred", + "description": "This workflow will run 'once for' a list of references", "example": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" } ] }, - "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": { + "runs_from": { "type": "string", - "description": "Reference to this incident, as displayed across the product", - "example": "INC-123" + "description": "The time from which this workflow will run on incidents", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "related_incidents": { + "runs_on_incident_modes": { "type": "array", "items": { "type": "string", - "example": "abc123" + "description": "Incident mode that workflows can run on", + "example": "standard", + "enum": [ + "standard", + "test", + "retrospective" + ] }, - "description": "Incident IDs of incidents related to this incident", + "description": "Which modes of incident this should run on (defaults to just standard incidents)", "example": [ - "INC-237" + "standard", + "retrospective" ] }, - "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": { + "runs_on_incidents": { "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "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" + ] }, - "updated_at": { + "shortform": { "type": "string", - "description": "When the incident was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" }, - "visibility": { + "state": { "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", + "description": "The state of the workflow (e.g. is it draft, or disabled)", + "example": "active", "enum": [ - "public", - "private" + "active", + "disabled", + "draft", + "error" ] }, - "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" + "trigger": { + "$ref": "#/components/schemas/TriggerSlim" }, - "workload_minutes_working": { - "type": "number", - "description": "Amount of time spent on the incident in working hours", - "example": 20, - "format": "double" + "version": { + "type": "integer", + "description": "Revision of the workflow, uniquely identifying its version", + "example": 3, + "format": "int64" } }, "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": [ + "condition_groups": [ { - "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": [ + "conditions": [ { - "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" + "operation": { + "label": "Lawrence Jones", + "value": "01FCQSP07Z74QMMYPDDGQB9FTG" }, - "value_text": "This is my text field, I hope you like it" + "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" + } } ] } ], - "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" + "continue_on_step_error": true, + "delay": { + "conditions_apply_over_delay": false, + "for_seconds": 60 }, - "incident_timestamp_values": [ + "expressions": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "else_branch": { + "result": { + "array_value": [ + { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity" + } + } }, - "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": [ - "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" - ] - }, - "WebhookPrivateResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the resource", - "example": "abc123" - } - }, - "example": { - "id": "abc123" - }, - "required": [ - "id" - ] - }, - "WeekdayIntervalConfigV2": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for this set of working intervals", - "example": "abc123" - }, - "name": { - "type": "string", - "description": "A human readable label for this set of working intervals", - "example": "abc123" - }, - "timezone": { - "type": "string", - "description": "How to interpret all the intervals", - "example": "abc123" - }, - "weekday_intervals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeekdayIntervalV2" - }, - "example": [ - { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" - } - ] - } - }, - "example": { - "id": "abc123", - "name": "abc123", - "timezone": "abc123", - "weekday_intervals": [ + "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": [ { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" + "array": false, + "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", + "label": "Incident -> Affected Team", + "type": "IncidentSeverity" } - ] - }, - "required": [ - "id", - "name", - "timezone", - "weekday_intervals" - ] + ], + "runs_from": "2021-08-17T13:28:57.801578Z", + "runs_on_incident_modes": [ + "standard", + "retrospective" + ], + "runs_on_incidents": "newly_created", + "shortform": "abc123", + "state": "active", + "trigger": { + "label": "Incident Updated", + "name": "incident.updated" + }, + "version": 3 + } }, - "WeekdayIntervalV2": { + "WorkflowDelay": { "type": "object", "properties": { - "end_time": { - "type": "string", - "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" + "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 }, - "weekday": { - "type": "string", - "description": "Weekday this interval applies to", - "example": "abc123" + "for_seconds": { + "type": "integer", + "description": "Delay in seconds between trigger firing and running the workflow", + "example": 60, + "format": "int64" } }, "example": { - "end_time": "17:00", - "start_time": "09:00", - "weekday": "abc123" + "conditions_apply_over_delay": false, + "for_seconds": 60 }, "required": [ - "weekday", - "start_time", - "end_time" + "for_seconds", + "conditions_apply_over_delay" ] }, - "Workflow": { + "WorkflowPayload": { "type": "object", "properties": { "condition_groups": { "type": "array", "items": { - "$ref": "#/components/schemas/ConditionGroupV2" + "$ref": "#/components/schemas/ConditionGroupPayloadV2" }, - "description": "Conditions that apply to the workflow trigger", + "description": "List of conditions to apply to the workflow", "example": [ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } @@ -26783,22 +39073,20 @@ "expressions": { "type": "array", "items": { - "$ref": "#/components/schemas/ExpressionV2" + "$ref": "#/components/schemas/ExpressionPayloadV2" }, - "description": "Expressions that make variables available in the scope", + "description": "The expressions used in the workflow", "example": [ { "else_branch": { "result": { "array_value": [ { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -26814,30 +39102,22 @@ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } @@ -26845,13 +39125,11 @@ "result": { "array_value": [ { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -26868,38 +39146,29 @@ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } ] }, "navigate": { - "reference": "1235", - "reference_label": "Teams" + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" }, "operation_type": "navigate", "parse": { @@ -26908,18 +39177,10 @@ "type": "IncidentStatus" }, "source": "metadata.annotations[\"github.com/repo\"]" - }, - "returns": { - "array": true, - "type": "IncidentStatus" } } ], "reference": "abc123", - "returns": { - "array": true, - "type": "IncidentStatus" - }, "root_reference": "incident.status" } ] @@ -26929,11 +39190,6 @@ "description": "Folder to display the workflow in", "example": "My folder 01" }, - "id": { - "type": "string", - "description": "Unique identifier for the workflow", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, "include_private_incidents": { "type": "boolean", "description": "Whether to include private incidents", @@ -26947,29 +39203,20 @@ "once_for": { "type": "array", "items": { - "$ref": "#/components/schemas/EngineReferenceV2" + "type": "string", + "example": "incident.url" }, - "description": "This workflow will run 'once for' a list of references", + "description": "Once For strategy to apply to this workflow", "example": [ - { - "array": false, - "key": "incident.custom_field[\"01FCNDV6P870EA6S7TK1DSYDG0\"]", - "label": "Incident -> Affected Team", - "type": "IncidentSeverity" - } + "incident.url" ] }, - "runs_from": { - "type": "string", - "description": "The time from which this workflow will run on incidents", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, "runs_on_incident_modes": { "type": "array", "items": { "type": "string", - "example": "test", + "description": "Incident mode that workflows can run on", + "example": "standard", "enum": [ "standard", "test", @@ -26991,6 +39238,11 @@ "newly_created_and_active" ] }, + "shortform": { + "type": "string", + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" + }, "state": { "type": "string", "description": "The state of the workflow (e.g. is it draft, or disabled)", @@ -27005,26 +39257,23 @@ "steps": { "type": "array", "items": { - "$ref": "#/components/schemas/StepConfig" + "$ref": "#/components/schemas/StepConfigPayload" }, - "description": "Steps that are executed as part of the workflow", + "description": "List of step to execute as part of the workflow", "example": [ { "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" } @@ -27032,15 +39281,6 @@ ] } ] - }, - "trigger": { - "$ref": "#/components/schemas/TriggerSlim" - }, - "version": { - "type": "integer", - "description": "Revision of the workflow, uniquely identifying its version", - "example": 3, - "format": "int64" } }, "example": { @@ -27048,30 +39288,22 @@ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } @@ -27087,13 +39319,11 @@ "result": { "array_value": [ { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -27109,30 +39339,22 @@ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } @@ -27140,13 +39362,11 @@ "result": { "array_value": [ { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } ], "value": { - "label": "Lawrence Jones", "literal": "SEV123", "reference": "incident.severity" } @@ -27163,38 +39383,29 @@ { "conditions": [ { - "operation": { - "label": "Lawrence Jones", - "value": "01FCQSP07Z74QMMYPDDGQB9FTG" - }, + "operation": "one_of", "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" - } + "subject": "incident.severity" } ] } ] }, "navigate": { - "reference": "1235", - "reference_label": "Teams" + "reference": "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]" }, "operation_type": "navigate", "parse": { @@ -27203,109 +39414,48 @@ "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" - } + "incident.url" ], - "runs_from": "2021-08-17T13:28:57.801578Z", "runs_on_incident_modes": [ "standard", "retrospective" ], "runs_on_incidents": "newly_created", + "shortform": "abc123", "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": [ - "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" - ] - }, - "WorkflowDelay": { - "type": "object", - "properties": { - "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 - }, - "for_seconds": { - "type": "integer", - "description": "Delay in seconds between trigger firing and running the workflow", - "example": 60, - "format": "int64" - } - }, - "example": { - "conditions_apply_over_delay": false, - "for_seconds": 60 - }, - "required": [ - "for_seconds", - "conditions_apply_over_delay" - ] + ] + } }, "WorkflowSlim": { "type": "object", @@ -27546,7 +39696,8 @@ "type": "array", "items": { "type": "string", - "example": "test", + "description": "Incident mode that workflows can run on", + "example": "standard", "enum": [ "standard", "test", @@ -27568,6 +39719,11 @@ "newly_created_and_active" ] }, + "shortform": { + "type": "string", + "description": "Shortform used to trigger manual workflows in Slack - e.g. `/inc workflows page-ceo`", + "example": "abc123" + }, "state": { "type": "string", "description": "The state of the workflow (e.g. is it draft, or disabled)", @@ -27795,6 +39951,7 @@ "retrospective" ], "runs_on_incidents": "newly_created", + "shortform": "abc123", "state": "active", "steps": [ { @@ -27835,6 +39992,10 @@ "name": "Actions V2", "description": "Manage incident actions.\n\nIncident actions are used during an incident, to track work such as 'restart the database' or 'contact the customer'.\n\nYou can manage actions in the incident Slack channel with /incident actions, or on\nthe incident homepage.\n" }, + { + "name": "Alert Routes V2", + "description": "Create and manage alert routes.\n\nAlert routes take alerts from alert sources, filter them according to conditions, apply\ngrouping on alert attributes, then finally create:\n\n1. Incidents\n2. Escalations\n\nThese are best configured in the incident.io dashboard and exported via the UI to\nTerraform, as the configuration is complex.\n" + }, { "name": "Alert Events V2", "description": "Create alerts within incident.io.\n\nThe alerts API allows you to create alerts within incident.io by posting alert events. You\ncan use alerts to automatically trigger incidents.\n\nTo create an alert, you must first configure an alert source in the incident.io dashboard.\n" @@ -27903,13 +40064,9 @@ "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" + "description": "View and manage schedules.\nManage your full schedule of on-call rotations, including the users and rotation configuration.\n" }, { "name": "Severities V1", @@ -27933,7 +40090,7 @@ }, { "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" + "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) and are retained in WorkOS for 365 days.\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 6 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\n### Alerts\n\nThis is for changes triggered by a specific alert (e.g. from Datadog or Grafana).\n\nAs an example:\n\n```\n\"actor\": {\n \"type\": \"alert\",\n \"id\": \"01G0J1EXE7AXZ2C93K61WBPYEH\",\n \"name\": \"Staging: pod CPU high\",\n \"metadata\": {\n \"alert_source_id\": \"01HB0ZG3B0HM04RCXNSPV1EDYG\"\n }\n }\n```\n" } ], "x-webhooks": { @@ -28441,6 +40598,7 @@ "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", "provider": "asana" }, + "has_debrief": false, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { @@ -28496,6 +40654,7 @@ "updated_at": "2021-08-17T13:28:57.801578Z" }, "mode": "standard", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", "name": "Our database is sad", "permalink": "https://app.incident.io/incidents/123", "postmortem_document_url": "https://docs.google.com/my_doc_id", @@ -28618,6 +40777,7 @@ "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", "provider": "asana" }, + "has_debrief": false, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { @@ -28696,6 +40856,7 @@ "workload_minutes_total": 60.7, "workload_minutes_working": 20 }, + "message": "We're working on a fix, hoping to ship in the next 30 minutes", "new_status": { "category": "triage", "created_at": "2021-08-17T13:28:57.801578Z", @@ -28810,6 +40971,7 @@ "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", "provider": "asana" }, + "has_debrief": false, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { @@ -28865,6 +41027,7 @@ "updated_at": "2021-08-17T13:28:57.801578Z" }, "mode": "standard", + "most_recent_update_message": "We're working on a fix, hoping to ship in the next 30 minutes", "name": "Our database is sad", "permalink": "https://app.incident.io/incidents/123", "postmortem_document_url": "https://docs.google.com/my_doc_id", @@ -28912,7 +41075,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_route.created", @@ -28959,7 +41122,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_route.deleted", @@ -29006,7 +41169,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_route.updated", @@ -29053,7 +41216,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_schema.updated", @@ -29100,7 +41263,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_source_config.created", @@ -29147,7 +41310,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_source_config.deleted", @@ -29194,7 +41357,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "alert_source_config.updated", @@ -29241,7 +41404,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "announcement_rule.created", @@ -29288,7 +41451,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "announcement_rule.deleted", @@ -29335,7 +41498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "announcement_rule.updated", @@ -29382,7 +41545,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "api_key.created", @@ -29429,7 +41592,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "api_key.deleted", @@ -29476,7 +41639,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "catalog_type.created", @@ -29523,7 +41686,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "catalog_type.deleted", @@ -29570,7 +41733,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "catalog_type.updated", @@ -29617,7 +41780,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "custom_field.created", @@ -29664,7 +41827,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "custom_field.deleted", @@ -29711,7 +41874,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "custom_field.updated", @@ -29758,7 +41921,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "debrief_invite_rule.created", @@ -29805,7 +41968,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "debrief_invite_rule.deleted", @@ -29852,7 +42015,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "debrief_invite_rule.updated", @@ -29899,7 +42062,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "escalation_path.created", @@ -29946,7 +42109,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "escalation_path.deleted", @@ -29993,7 +42156,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "escalation_path.updated", @@ -30040,7 +42203,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "follow_up_priority.created", @@ -30087,7 +42250,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "follow_up_priority.deleted", @@ -30134,7 +42297,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "follow_up_priority.updated", @@ -30167,6 +42330,194 @@ } } }, + "/x-audit-logs/holiday_user_feed.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "HolidayUserFeedCreatedV1", + "description": "This entry is created whenever a holiday user feed is created", + "operationId": "Audit logs#HolidayUserFeedCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "holiday_user_feed.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": "US Team holidays", + "type": "holiday_user_feed" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/holiday_user_feed.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "HolidayUserFeedDeletedV1", + "description": "This entry is created whenever a holiday user feed is deleted", + "operationId": "Audit logs#HolidayUserFeedDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "holiday_user_feed.deleted", + "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": "US Team holidays", + "type": "holiday_user_feed" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/holiday_user_feed.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "HolidayUserFeedUpdatedV1", + "description": "This entry is created whenever a holiday user feed is updated", + "operationId": "Audit logs#HolidayUserFeedUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "holiday_user_feed.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "US Team holidays", + "type": "holiday_user_feed" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/incident_call_setting.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "IncidentCallSettingUpdatedV1", + "description": "This entry is created whenever an organisation's incident call settings are updated", + "operationId": "Audit logs#IncidentCallSettingUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "incident_call_setting.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Incident call settings", + "type": "incident_call_setting" + } + ], + "version": 1 + } + } + } + } + } + } + }, "/x-audit-logs/incident_duration_metric.created.1": { "get": { "tags": [ @@ -30181,7 +42532,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_duration_metric.created", @@ -30228,7 +42579,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_duration_metric.deleted", @@ -30275,7 +42626,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_duration_metric.updated", @@ -30322,7 +42673,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_role.created", @@ -30369,7 +42720,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_role.deleted", @@ -30416,7 +42767,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_role.updated", @@ -30463,7 +42814,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_status.created", @@ -30510,7 +42861,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_status.deleted", @@ -30557,7 +42908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_status.updated", @@ -30604,7 +42955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_timestamp.created", @@ -30651,7 +43002,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_timestamp.deleted", @@ -30698,7 +43049,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_timestamp.updated", @@ -30745,7 +43096,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_type.created", @@ -30792,7 +43143,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_type.deleted", @@ -30839,7 +43190,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "incident_type.updated", @@ -30886,7 +43237,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "integration.installed", @@ -30933,7 +43284,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "integration.uninstalled", @@ -30980,7 +43331,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "internal_status_page.created", @@ -31027,7 +43378,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "internal_status_page.deleted", @@ -31074,7 +43425,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "internal_status_page.updated", @@ -31121,7 +43472,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "nudge.created", @@ -31168,7 +43519,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "nudge.deleted", @@ -31215,7 +43566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "nudge.updated", @@ -31262,7 +43613,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "policy.created", @@ -31309,7 +43660,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "policy.deleted", @@ -31356,7 +43707,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "policy.updated", @@ -31403,7 +43754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "post_incident_task.created", @@ -31450,7 +43801,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "post_incident_task.deleted", @@ -31497,7 +43848,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "post_incident_task.updated", @@ -31530,6 +43881,570 @@ } } }, + "/x-audit-logs/postmortem_section.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionCreatedV1", + "description": "This entry is created whenever a postmortem template section is created", + "operationId": "Audit logs#PostmortemSectionCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.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": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_section.created.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionCreatedV2", + "description": "This entry is created whenever a postmortem template section is created", + "operationId": "Audit logs#PostmortemSectionCreatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.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": "follow_ups", + "type": "postmortem_template_section" + } + ], + "version": 2 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_section.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionDeletedV1", + "description": "This entry is created whenever a postmortem template section is deleted", + "operationId": "Audit logs#PostmortemSectionDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.deleted", + "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": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_section.deleted.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionDeletedV2", + "description": "This entry is created whenever a postmortem template section is deleted", + "operationId": "Audit logs#PostmortemSectionDeletedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.deleted", + "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": "follow_ups", + "type": "postmortem_template_section" + } + ], + "version": 2 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_section.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionUpdatedV1", + "description": "This entry is created whenever a postmortem template section is updated", + "operationId": "Audit logs#PostmortemSectionUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_section.updated.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemSectionUpdatedV2", + "description": "This entry is created whenever a postmortem template section is updated", + "operationId": "Audit logs#PostmortemSectionUpdatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_section.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "follow_ups", + "type": "postmortem_template_section" + } + ], + "version": 2 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateCreatedV1", + "description": "This entry is created whenever a postmortem template is created", + "operationId": "Audit logs#PostmortemTemplateCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.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": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.created.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateCreatedV2", + "description": "This entry is created whenever a postmortem template is created", + "operationId": "Audit logs#PostmortemTemplateCreatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.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": "Root cause analysis (RCA)", + "type": "postmortem_template" + } + ], + "version": 2 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateDeletedV1", + "description": "This entry is created whenever a postmortem template is deleted", + "operationId": "Audit logs#PostmortemTemplateDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.deleted", + "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": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.deleted.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateDeletedV2", + "description": "This entry is created whenever a postmortem template is deleted", + "operationId": "Audit logs#PostmortemTemplateDeletedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.deleted", + "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": "Root cause analysis (RCA)", + "type": "postmortem_template" + } + ], + "version": 2 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateUpdatedV1", + "description": "This entry is created whenever a postmortem template is updated", + "operationId": "Audit logs#PostmortemTemplateUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Schedule a debrief", + "type": "post_incident_task" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/postmortem_template.updated.2": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "PostmortemTemplateUpdatedV2", + "description": "This entry is created whenever a postmortem template is updated", + "operationId": "Audit logs#PostmortemTemplateUpdatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryBaseV2" + }, + "example": { + "action": "postmortem_template.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" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Root cause analysis (RCA)", + "type": "postmortem_template" + } + ], + "version": 2 + } + } + } + } + } + } + }, "/x-audit-logs/private_incident.access_attempted.1": { "get": { "tags": [ @@ -31594,7 +44509,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "private_incident.access_requested", @@ -31641,7 +44556,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "private_incident_membership.granted", @@ -31693,7 +44608,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "private_incident_membership.revoked", @@ -31745,7 +44660,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "rbac_role.created", @@ -31792,7 +44707,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "rbac_role.deleted", @@ -31839,7 +44754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "rbac_role.updated", @@ -31886,7 +44801,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "schedule.created", @@ -31933,7 +44848,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "schedule.deleted", @@ -31980,7 +44895,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "schedule.updated", @@ -32080,7 +44995,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "severity.created", @@ -32127,7 +45042,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "severity.deleted", @@ -32174,7 +45089,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "severity.updated", @@ -32221,7 +45136,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page.created", @@ -32268,7 +45183,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page.deleted", @@ -32315,7 +45230,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page.updated", @@ -32362,7 +45277,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_sub_page.created", @@ -32409,7 +45324,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_sub_page.deleted", @@ -32456,7 +45371,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_sub_page.updated", @@ -32503,7 +45418,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_template.created", @@ -32550,7 +45465,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_template.deleted", @@ -32597,7 +45512,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "status_page_template.updated", @@ -32644,7 +45559,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "user.created", @@ -32691,7 +45606,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "user.deactivated", @@ -32738,7 +45653,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "user.reinstated", @@ -32838,7 +45753,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "user.updated", @@ -32885,7 +45800,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "workflow.created", @@ -32932,7 +45847,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "workflow.deleted", @@ -32979,7 +45894,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + "$ref": "#/components/schemas/AuditLogEntryBaseV2" }, "example": { "action": "workflow.updated",