From b0ca47827bb988b6d02de1f00ae59fbb1079ac9e Mon Sep 17 00:00:00 2001 From: Lisa Karlin Curtis Date: Mon, 25 Mar 2024 14:26:45 +0000 Subject: [PATCH 1/3] Upgrade to latest openapi schema We've renamed a few types to be 'engine generic' API types, so we need to reflect that into the importer --- client/client.gen.go | 6436 ++++++--- client/openapi3.json | 22249 +++++++++++++++++++---------- cmd/catalog-importer/cmd/sync.go | 14 +- output/marshal.go | 12 +- output/output.go | 13 +- reconcile/entries.go | 14 +- 6 files changed, 19225 insertions(+), 9513 deletions(-) diff --git a/client/client.gen.go b/client/client.gen.go index 820d672..87f165b 100644 --- a/client/client.gen.go +++ b/client/client.gen.go @@ -20,10 +20,18 @@ import ( // Defines values for ActionV1Status. const ( - Completed ActionV1Status = "completed" - Deleted ActionV1Status = "deleted" - NotDoing ActionV1Status = "not_doing" - Outstanding ActionV1Status = "outstanding" + ActionV1StatusCompleted ActionV1Status = "completed" + ActionV1StatusDeleted ActionV1Status = "deleted" + ActionV1StatusNotDoing ActionV1Status = "not_doing" + ActionV1StatusOutstanding ActionV1Status = "outstanding" +) + +// Defines values for ActionV2Status. +const ( + ActionV2StatusCompleted ActionV2Status = "completed" + ActionV2StatusDeleted ActionV2Status = "deleted" + ActionV2StatusNotDoing ActionV2Status = "not_doing" + ActionV2StatusOutstanding ActionV2Status = "outstanding" ) // Defines values for CatalogResourceV2Category. @@ -33,34 +41,98 @@ const ( CatalogResourceV2CategoryPrimitive CatalogResourceV2Category = "primitive" ) +// Defines values for CatalogTypeAttributePayloadV2Mode. +const ( + CatalogTypeAttributePayloadV2ModeBacklink CatalogTypeAttributePayloadV2Mode = "backlink" + CatalogTypeAttributePayloadV2ModeDynamic CatalogTypeAttributePayloadV2Mode = "dynamic" + CatalogTypeAttributePayloadV2ModeEmpty CatalogTypeAttributePayloadV2Mode = "" + CatalogTypeAttributePayloadV2ModeExternal CatalogTypeAttributePayloadV2Mode = "external" + CatalogTypeAttributePayloadV2ModeInternal CatalogTypeAttributePayloadV2Mode = "internal" + CatalogTypeAttributePayloadV2ModeManual CatalogTypeAttributePayloadV2Mode = "manual" +) + +// Defines values for CatalogTypeAttributeV2Mode. +const ( + Backlink CatalogTypeAttributeV2Mode = "backlink" + Dynamic CatalogTypeAttributeV2Mode = "dynamic" + Empty CatalogTypeAttributeV2Mode = "" + External CatalogTypeAttributeV2Mode = "external" + Internal CatalogTypeAttributeV2Mode = "internal" + Manual CatalogTypeAttributeV2Mode = "manual" +) + // Defines values for CatalogTypeV2Color. const ( CatalogTypeV2ColorBlue CatalogTypeV2Color = "blue" + CatalogTypeV2ColorCyan CatalogTypeV2Color = "cyan" CatalogTypeV2ColorGreen CatalogTypeV2Color = "green" - CatalogTypeV2ColorRed CatalogTypeV2Color = "red" - CatalogTypeV2ColorSlate CatalogTypeV2Color = "slate" + CatalogTypeV2ColorOrange CatalogTypeV2Color = "orange" + CatalogTypeV2ColorPink CatalogTypeV2Color = "pink" CatalogTypeV2ColorViolet CatalogTypeV2Color = "violet" CatalogTypeV2ColorYellow CatalogTypeV2Color = "yellow" ) // Defines values for CatalogTypeV2Icon. const ( - CatalogTypeV2IconBolt CatalogTypeV2Icon = "bolt" - CatalogTypeV2IconBox CatalogTypeV2Icon = "box" - CatalogTypeV2IconBriefcase CatalogTypeV2Icon = "briefcase" - CatalogTypeV2IconBrowser CatalogTypeV2Icon = "browser" - CatalogTypeV2IconBulb CatalogTypeV2Icon = "bulb" - CatalogTypeV2IconClock CatalogTypeV2Icon = "clock" - CatalogTypeV2IconCog CatalogTypeV2Icon = "cog" - CatalogTypeV2IconDatabase CatalogTypeV2Icon = "database" - CatalogTypeV2IconDoc CatalogTypeV2Icon = "doc" - CatalogTypeV2IconEmail CatalogTypeV2Icon = "email" - CatalogTypeV2IconServer CatalogTypeV2Icon = "server" - CatalogTypeV2IconSeverity CatalogTypeV2Icon = "severity" - CatalogTypeV2IconStar CatalogTypeV2Icon = "star" - CatalogTypeV2IconTag CatalogTypeV2Icon = "tag" - CatalogTypeV2IconUser CatalogTypeV2Icon = "user" - CatalogTypeV2IconUsers CatalogTypeV2Icon = "users" + 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" +) + +// Defines values for CreateHTTPRequestBodyStatus. +const ( + Firing CreateHTTPRequestBodyStatus = "firing" + Resolved CreateHTTPRequestBodyStatus = "resolved" +) + +// Defines values for CreateHTTPResponseBodyDeduplicationKey. +const ( + UniqueKey CreateHTTPResponseBodyDeduplicationKey = "unique-key" +) + +// Defines values for CreateHTTPResponseBodyMessage. +const ( + EventAcceptedForProcessing CreateHTTPResponseBodyMessage = "Event accepted for processing" +) + +// Defines values for CreateHTTPResponseBodyStatus. +const ( + Success CreateHTTPResponseBodyStatus = "success" +) + +// Defines values for CreateRequestBody10Mode. +const ( + CreateRequestBody10ModeRetrospective CreateRequestBody10Mode = "retrospective" + CreateRequestBody10ModeStandard CreateRequestBody10Mode = "standard" + CreateRequestBody10ModeTest CreateRequestBody10Mode = "test" + CreateRequestBody10ModeTutorial CreateRequestBody10Mode = "tutorial" +) + +// Defines values for CreateRequestBody10Visibility. +const ( + CreateRequestBody10VisibilityPrivate CreateRequestBody10Visibility = "private" + CreateRequestBody10VisibilityPublic CreateRequestBody10Visibility = "public" ) // Defines values for CreateRequestBody2FieldType. @@ -79,88 +151,103 @@ const ( CreateRequestBody2RequiredNever CreateRequestBody2Required = "never" ) -// Defines values for CreateRequestBody3ResourceResourceType. +// Defines values for CreateRequestBody2RequiredV2. const ( - CreateRequestBody3ResourceResourceTypeAtlassianStatuspageIncident CreateRequestBody3ResourceResourceType = "atlassian_statuspage_incident" - CreateRequestBody3ResourceResourceTypeDatadogMonitorAlert CreateRequestBody3ResourceResourceType = "datadog_monitor_alert" - CreateRequestBody3ResourceResourceTypeGithubPullRequest CreateRequestBody3ResourceResourceType = "github_pull_request" - CreateRequestBody3ResourceResourceTypeOpsgenieAlert CreateRequestBody3ResourceResourceType = "opsgenie_alert" - CreateRequestBody3ResourceResourceTypePagerDutyIncident CreateRequestBody3ResourceResourceType = "pager_duty_incident" - CreateRequestBody3ResourceResourceTypeSentryIssue CreateRequestBody3ResourceResourceType = "sentry_issue" - CreateRequestBody3ResourceResourceTypeStatuspageIncident CreateRequestBody3ResourceResourceType = "statuspage_incident" - CreateRequestBody3ResourceResourceTypeZendeskTicket CreateRequestBody3ResourceResourceType = "zendesk_ticket" + CreateRequestBody2RequiredV2Always CreateRequestBody2RequiredV2 = "always" + CreateRequestBody2RequiredV2BeforeResolution CreateRequestBody2RequiredV2 = "before_resolution" + CreateRequestBody2RequiredV2Never CreateRequestBody2RequiredV2 = "never" ) -// Defines values for CreateRequestBody5Category. +// Defines values for CreateRequestBody3FieldType. const ( - CreateRequestBody5CategoryClosed CreateRequestBody5Category = "closed" - CreateRequestBody5CategoryLive CreateRequestBody5Category = "live" + CreateRequestBody3FieldTypeLink CreateRequestBody3FieldType = "link" + CreateRequestBody3FieldTypeMultiSelect CreateRequestBody3FieldType = "multi_select" + CreateRequestBody3FieldTypeNumeric CreateRequestBody3FieldType = "numeric" + CreateRequestBody3FieldTypeSingleSelect CreateRequestBody3FieldType = "single_select" + CreateRequestBody3FieldTypeText CreateRequestBody3FieldType = "text" ) -// Defines values for CreateRequestBody6Mode. +// Defines values for CreateRequestBody4ResourceResourceType. const ( - CreateRequestBody6ModeReal CreateRequestBody6Mode = "real" - CreateRequestBody6ModeTest CreateRequestBody6Mode = "test" + CreateRequestBody4ResourceResourceTypeAtlassianStatuspageIncident CreateRequestBody4ResourceResourceType = "atlassian_statuspage_incident" + CreateRequestBody4ResourceResourceTypeDatadogMonitorAlert CreateRequestBody4ResourceResourceType = "datadog_monitor_alert" + CreateRequestBody4ResourceResourceTypeGithubPullRequest CreateRequestBody4ResourceResourceType = "github_pull_request" + CreateRequestBody4ResourceResourceTypeGitlabMergeRequest CreateRequestBody4ResourceResourceType = "gitlab_merge_request" + CreateRequestBody4ResourceResourceTypeGoogleCalendarEvent CreateRequestBody4ResourceResourceType = "google_calendar_event" + CreateRequestBody4ResourceResourceTypeOpsgenieAlert CreateRequestBody4ResourceResourceType = "opsgenie_alert" + CreateRequestBody4ResourceResourceTypePagerDutyIncident CreateRequestBody4ResourceResourceType = "pager_duty_incident" + CreateRequestBody4ResourceResourceTypeScrubbed CreateRequestBody4ResourceResourceType = "scrubbed" + CreateRequestBody4ResourceResourceTypeSentryIssue CreateRequestBody4ResourceResourceType = "sentry_issue" + CreateRequestBody4ResourceResourceTypeStatuspageIncident CreateRequestBody4ResourceResourceType = "statuspage_incident" + CreateRequestBody4ResourceResourceTypeZendeskTicket CreateRequestBody4ResourceResourceType = "zendesk_ticket" ) -// Defines values for CreateRequestBody6Status. +// Defines values for CreateRequestBody8Category. const ( - CreateRequestBody6StatusClosed CreateRequestBody6Status = "closed" - CreateRequestBody6StatusDeclined CreateRequestBody6Status = "declined" - CreateRequestBody6StatusFixing CreateRequestBody6Status = "fixing" - CreateRequestBody6StatusInvestigating CreateRequestBody6Status = "investigating" - CreateRequestBody6StatusMonitoring CreateRequestBody6Status = "monitoring" - CreateRequestBody6StatusTriage CreateRequestBody6Status = "triage" + CreateRequestBody8CategoryClosed CreateRequestBody8Category = "closed" + CreateRequestBody8CategoryLearning CreateRequestBody8Category = "learning" + CreateRequestBody8CategoryLive CreateRequestBody8Category = "live" ) -// Defines values for CreateRequestBody6Visibility. +// Defines values for CreateRequestBody9Mode. const ( - CreateRequestBody6VisibilityPrivate CreateRequestBody6Visibility = "private" - CreateRequestBody6VisibilityPublic CreateRequestBody6Visibility = "public" + CreateRequestBody9ModeReal CreateRequestBody9Mode = "real" + CreateRequestBody9ModeTest CreateRequestBody9Mode = "test" ) -// Defines values for CreateRequestBody7Mode. +// Defines values for CreateRequestBody9Status. const ( - CreateRequestBody7ModeRetrospective CreateRequestBody7Mode = "retrospective" - CreateRequestBody7ModeStandard CreateRequestBody7Mode = "standard" - CreateRequestBody7ModeTest CreateRequestBody7Mode = "test" - CreateRequestBody7ModeTutorial CreateRequestBody7Mode = "tutorial" + CreateRequestBody9StatusClosed CreateRequestBody9Status = "closed" + CreateRequestBody9StatusDeclined CreateRequestBody9Status = "declined" + CreateRequestBody9StatusFixing CreateRequestBody9Status = "fixing" + CreateRequestBody9StatusInvestigating CreateRequestBody9Status = "investigating" + CreateRequestBody9StatusMonitoring CreateRequestBody9Status = "monitoring" + CreateRequestBody9StatusTriage CreateRequestBody9Status = "triage" ) -// Defines values for CreateRequestBody7Visibility. +// Defines values for CreateRequestBody9Visibility. const ( - CreateRequestBody7VisibilityPrivate CreateRequestBody7Visibility = "private" - CreateRequestBody7VisibilityPublic CreateRequestBody7Visibility = "public" + CreateRequestBody9VisibilityPrivate CreateRequestBody9Visibility = "private" + CreateRequestBody9VisibilityPublic CreateRequestBody9Visibility = "public" ) // Defines values for CreateTypeRequestBodyColor. const ( CreateTypeRequestBodyColorBlue CreateTypeRequestBodyColor = "blue" + CreateTypeRequestBodyColorCyan CreateTypeRequestBodyColor = "cyan" CreateTypeRequestBodyColorGreen CreateTypeRequestBodyColor = "green" - CreateTypeRequestBodyColorRed CreateTypeRequestBodyColor = "red" - CreateTypeRequestBodyColorSlate CreateTypeRequestBodyColor = "slate" + CreateTypeRequestBodyColorOrange CreateTypeRequestBodyColor = "orange" + CreateTypeRequestBodyColorPink CreateTypeRequestBodyColor = "pink" CreateTypeRequestBodyColorViolet CreateTypeRequestBodyColor = "violet" CreateTypeRequestBodyColorYellow CreateTypeRequestBodyColor = "yellow" ) // Defines values for CreateTypeRequestBodyIcon. const ( - CreateTypeRequestBodyIconBolt CreateTypeRequestBodyIcon = "bolt" - CreateTypeRequestBodyIconBox CreateTypeRequestBodyIcon = "box" - CreateTypeRequestBodyIconBriefcase CreateTypeRequestBodyIcon = "briefcase" - CreateTypeRequestBodyIconBrowser CreateTypeRequestBodyIcon = "browser" - CreateTypeRequestBodyIconBulb CreateTypeRequestBodyIcon = "bulb" - CreateTypeRequestBodyIconClock CreateTypeRequestBodyIcon = "clock" - CreateTypeRequestBodyIconCog CreateTypeRequestBodyIcon = "cog" - CreateTypeRequestBodyIconDatabase CreateTypeRequestBodyIcon = "database" - CreateTypeRequestBodyIconDoc CreateTypeRequestBodyIcon = "doc" - CreateTypeRequestBodyIconEmail CreateTypeRequestBodyIcon = "email" - CreateTypeRequestBodyIconServer CreateTypeRequestBodyIcon = "server" - CreateTypeRequestBodyIconSeverity CreateTypeRequestBodyIcon = "severity" - CreateTypeRequestBodyIconStar CreateTypeRequestBodyIcon = "star" - CreateTypeRequestBodyIconTag CreateTypeRequestBodyIcon = "tag" - CreateTypeRequestBodyIconUser CreateTypeRequestBodyIcon = "user" - CreateTypeRequestBodyIconUsers CreateTypeRequestBodyIcon = "users" + 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" ) // Defines values for CustomFieldTypeInfoV1FieldType. @@ -174,11 +261,11 @@ const ( // Defines values for CustomFieldV1FieldType. const ( - Link CustomFieldV1FieldType = "link" - MultiSelect CustomFieldV1FieldType = "multi_select" - Numeric CustomFieldV1FieldType = "numeric" - SingleSelect CustomFieldV1FieldType = "single_select" - Text CustomFieldV1FieldType = "text" + CustomFieldV1FieldTypeLink CustomFieldV1FieldType = "link" + CustomFieldV1FieldTypeMultiSelect CustomFieldV1FieldType = "multi_select" + CustomFieldV1FieldTypeNumeric CustomFieldV1FieldType = "numeric" + CustomFieldV1FieldTypeSingleSelect CustomFieldV1FieldType = "single_select" + CustomFieldV1FieldTypeText CustomFieldV1FieldType = "text" ) // Defines values for CustomFieldV1Required. @@ -188,10 +275,28 @@ const ( CustomFieldV1RequiredNever CustomFieldV1Required = "never" ) +// Defines values for CustomFieldV1RequiredV2. +const ( + CustomFieldV1RequiredV2Always CustomFieldV1RequiredV2 = "always" + CustomFieldV1RequiredV2BeforeResolution CustomFieldV1RequiredV2 = "before_resolution" + CustomFieldV1RequiredV2Never CustomFieldV1RequiredV2 = "never" +) + +// Defines values for CustomFieldV2FieldType. +const ( + Link CustomFieldV2FieldType = "link" + MultiSelect CustomFieldV2FieldType = "multi_select" + Numeric CustomFieldV2FieldType = "numeric" + SingleSelect CustomFieldV2FieldType = "single_select" + Text CustomFieldV2FieldType = "text" +) + // Defines values for ExternalIssueReferenceV1Provider. const ( ExternalIssueReferenceV1ProviderAsana ExternalIssueReferenceV1Provider = "asana" + ExternalIssueReferenceV1ProviderClickUp ExternalIssueReferenceV1Provider = "click_up" ExternalIssueReferenceV1ProviderGithub ExternalIssueReferenceV1Provider = "github" + ExternalIssueReferenceV1ProviderGitlab ExternalIssueReferenceV1Provider = "gitlab" ExternalIssueReferenceV1ProviderJira ExternalIssueReferenceV1Provider = "jira" ExternalIssueReferenceV1ProviderJiraServer ExternalIssueReferenceV1Provider = "jira_server" ExternalIssueReferenceV1ProviderLinear ExternalIssueReferenceV1Provider = "linear" @@ -201,7 +306,9 @@ const ( // Defines values for ExternalIssueReferenceV2Provider. const ( ExternalIssueReferenceV2ProviderAsana ExternalIssueReferenceV2Provider = "asana" + ExternalIssueReferenceV2ProviderClickUp ExternalIssueReferenceV2Provider = "click_up" ExternalIssueReferenceV2ProviderGithub ExternalIssueReferenceV2Provider = "github" + ExternalIssueReferenceV2ProviderGitlab ExternalIssueReferenceV2Provider = "gitlab" ExternalIssueReferenceV2ProviderJira ExternalIssueReferenceV2Provider = "jira" ExternalIssueReferenceV2ProviderJiraServer ExternalIssueReferenceV2Provider = "jira_server" ExternalIssueReferenceV2ProviderLinear ExternalIssueReferenceV2Provider = "linear" @@ -213,22 +320,34 @@ const ( ExternalResourceV1ResourceTypeAtlassianStatuspageIncident ExternalResourceV1ResourceType = "atlassian_statuspage_incident" ExternalResourceV1ResourceTypeDatadogMonitorAlert ExternalResourceV1ResourceType = "datadog_monitor_alert" ExternalResourceV1ResourceTypeGithubPullRequest ExternalResourceV1ResourceType = "github_pull_request" + ExternalResourceV1ResourceTypeGitlabMergeRequest ExternalResourceV1ResourceType = "gitlab_merge_request" + ExternalResourceV1ResourceTypeGoogleCalendarEvent ExternalResourceV1ResourceType = "google_calendar_event" ExternalResourceV1ResourceTypeOpsgenieAlert ExternalResourceV1ResourceType = "opsgenie_alert" ExternalResourceV1ResourceTypePagerDutyIncident ExternalResourceV1ResourceType = "pager_duty_incident" + ExternalResourceV1ResourceTypeScrubbed ExternalResourceV1ResourceType = "scrubbed" ExternalResourceV1ResourceTypeSentryIssue ExternalResourceV1ResourceType = "sentry_issue" ExternalResourceV1ResourceTypeStatuspageIncident ExternalResourceV1ResourceType = "statuspage_incident" ExternalResourceV1ResourceTypeZendeskTicket ExternalResourceV1ResourceType = "zendesk_ticket" ) +// Defines values for FollowUpV2Status. +const ( + Completed FollowUpV2Status = "completed" + Deleted FollowUpV2Status = "deleted" + NotDoing FollowUpV2Status = "not_doing" + Outstanding FollowUpV2Status = "outstanding" +) + // Defines values for IdentityV1Roles. const ( - IdentityV1RolesCatalogEditor IdentityV1Roles = "catalog_editor" - IdentityV1RolesCatalogViewer IdentityV1Roles = "catalog_viewer" - IdentityV1RolesGlobalAccess IdentityV1Roles = "global_access" - IdentityV1RolesIncidentCreator IdentityV1Roles = "incident_creator" - IdentityV1RolesIncidentEditor IdentityV1Roles = "incident_editor" - IdentityV1RolesManageSettings IdentityV1Roles = "manage_settings" - IdentityV1RolesViewer IdentityV1Roles = "viewer" + IdentityV1RolesCatalogEditor IdentityV1Roles = "catalog_editor" + IdentityV1RolesCatalogViewer IdentityV1Roles = "catalog_viewer" + IdentityV1RolesGlobalAccess IdentityV1Roles = "global_access" + IdentityV1RolesIncidentCreator IdentityV1Roles = "incident_creator" + IdentityV1RolesIncidentEditor IdentityV1Roles = "incident_editor" + IdentityV1RolesIncidentMembershipsEditor IdentityV1Roles = "incident_memberships_editor" + IdentityV1RolesManageSettings IdentityV1Roles = "manage_settings" + IdentityV1RolesViewer IdentityV1Roles = "viewer" ) // Defines values for IncidentRoleV1RoleType. @@ -238,12 +357,22 @@ const ( IncidentRoleV1RoleTypeReporter IncidentRoleV1RoleType = "reporter" ) +// Defines values for IncidentRoleV2RoleType. +const ( + IncidentRoleV2RoleTypeCustom IncidentRoleV2RoleType = "custom" + IncidentRoleV2RoleTypeLead IncidentRoleV2RoleType = "lead" + IncidentRoleV2RoleTypeReporter IncidentRoleV2RoleType = "reporter" +) + // Defines values for IncidentStatusV1Category. const ( + IncidentStatusV1CategoryCanceled IncidentStatusV1Category = "canceled" IncidentStatusV1CategoryClosed IncidentStatusV1Category = "closed" IncidentStatusV1CategoryDeclined IncidentStatusV1Category = "declined" + IncidentStatusV1CategoryLearning IncidentStatusV1Category = "learning" IncidentStatusV1CategoryLive IncidentStatusV1Category = "live" IncidentStatusV1CategoryMerged IncidentStatusV1Category = "merged" + IncidentStatusV1CategoryPaused IncidentStatusV1Category = "paused" IncidentStatusV1CategoryTriage IncidentStatusV1Category = "triage" ) @@ -297,34 +426,50 @@ const ( UpdateRequestBody2RequiredNever UpdateRequestBody2Required = "never" ) +// Defines values for UpdateRequestBody2RequiredV2. +const ( + Always UpdateRequestBody2RequiredV2 = "always" + BeforeResolution UpdateRequestBody2RequiredV2 = "before_resolution" + Never UpdateRequestBody2RequiredV2 = "never" +) + // Defines values for UpdateTypeRequestBodyColor. const ( Blue UpdateTypeRequestBodyColor = "blue" + Cyan UpdateTypeRequestBodyColor = "cyan" Green UpdateTypeRequestBodyColor = "green" - Red UpdateTypeRequestBodyColor = "red" - Slate UpdateTypeRequestBodyColor = "slate" + Orange UpdateTypeRequestBodyColor = "orange" + Pink UpdateTypeRequestBodyColor = "pink" Violet UpdateTypeRequestBodyColor = "violet" Yellow UpdateTypeRequestBodyColor = "yellow" ) // Defines values for UpdateTypeRequestBodyIcon. const ( - Bolt UpdateTypeRequestBodyIcon = "bolt" - Box UpdateTypeRequestBodyIcon = "box" - Briefcase UpdateTypeRequestBodyIcon = "briefcase" - Browser UpdateTypeRequestBodyIcon = "browser" - Bulb UpdateTypeRequestBodyIcon = "bulb" - Clock UpdateTypeRequestBodyIcon = "clock" - Cog UpdateTypeRequestBodyIcon = "cog" - Database UpdateTypeRequestBodyIcon = "database" - Doc UpdateTypeRequestBodyIcon = "doc" - Email UpdateTypeRequestBodyIcon = "email" - Server UpdateTypeRequestBodyIcon = "server" - Severity UpdateTypeRequestBodyIcon = "severity" - Star UpdateTypeRequestBodyIcon = "star" - Tag UpdateTypeRequestBodyIcon = "tag" - User UpdateTypeRequestBodyIcon = "user" - Users UpdateTypeRequestBodyIcon = "users" + 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" + Files UpdateTypeRequestBodyIcon = "files" + Flag UpdateTypeRequestBodyIcon = "flag" + Folder UpdateTypeRequestBodyIcon = "folder" + Globe UpdateTypeRequestBodyIcon = "globe" + Money UpdateTypeRequestBodyIcon = "money" + Server UpdateTypeRequestBodyIcon = "server" + Severity UpdateTypeRequestBodyIcon = "severity" + Star UpdateTypeRequestBodyIcon = "star" + Store UpdateTypeRequestBodyIcon = "store" + Tag UpdateTypeRequestBodyIcon = "tag" + User UpdateTypeRequestBodyIcon = "user" + Users UpdateTypeRequestBodyIcon = "users" ) // Defines values for UserV1Role. @@ -336,11 +481,20 @@ const ( UserV1RoleViewer UserV1Role = "viewer" ) +// Defines values for UserWithRolesV2Role. +const ( + Administrator UserWithRolesV2Role = "administrator" + Owner UserWithRolesV2Role = "owner" + Responder UserWithRolesV2Role = "responder" + Unset UserWithRolesV2Role = "unset" + Viewer UserWithRolesV2Role = "viewer" +) + // Defines values for ActionsV1ListParamsIncidentMode. const ( - Real ActionsV1ListParamsIncidentMode = "real" - Test ActionsV1ListParamsIncidentMode = "test" - Tutorial ActionsV1ListParamsIncidentMode = "tutorial" + ActionsV1ListParamsIncidentModeReal ActionsV1ListParamsIncidentMode = "real" + ActionsV1ListParamsIncidentModeTest ActionsV1ListParamsIncidentMode = "test" + ActionsV1ListParamsIncidentModeTutorial ActionsV1ListParamsIncidentMode = "tutorial" ) // Defines values for IncidentAttachmentsV1ListParamsResourceType. @@ -348,13 +502,32 @@ const ( AtlassianStatuspageIncident IncidentAttachmentsV1ListParamsResourceType = "atlassian_statuspage_incident" DatadogMonitorAlert IncidentAttachmentsV1ListParamsResourceType = "datadog_monitor_alert" GithubPullRequest IncidentAttachmentsV1ListParamsResourceType = "github_pull_request" + GitlabMergeRequest IncidentAttachmentsV1ListParamsResourceType = "gitlab_merge_request" + GoogleCalendarEvent IncidentAttachmentsV1ListParamsResourceType = "google_calendar_event" OpsgenieAlert IncidentAttachmentsV1ListParamsResourceType = "opsgenie_alert" PagerDutyIncident IncidentAttachmentsV1ListParamsResourceType = "pager_duty_incident" + Scrubbed IncidentAttachmentsV1ListParamsResourceType = "scrubbed" SentryIssue IncidentAttachmentsV1ListParamsResourceType = "sentry_issue" StatuspageIncident IncidentAttachmentsV1ListParamsResourceType = "statuspage_incident" ZendeskTicket IncidentAttachmentsV1ListParamsResourceType = "zendesk_ticket" ) +// Defines values for ActionsV2ListParamsIncidentMode. +const ( + ActionsV2ListParamsIncidentModeRetrospective ActionsV2ListParamsIncidentMode = "retrospective" + ActionsV2ListParamsIncidentModeStandard ActionsV2ListParamsIncidentMode = "standard" + ActionsV2ListParamsIncidentModeTest ActionsV2ListParamsIncidentMode = "test" + ActionsV2ListParamsIncidentModeTutorial ActionsV2ListParamsIncidentMode = "tutorial" +) + +// Defines values for FollowUpsV2ListParamsIncidentMode. +const ( + Retrospective FollowUpsV2ListParamsIncidentMode = "retrospective" + Standard FollowUpsV2ListParamsIncidentMode = "standard" + Test FollowUpsV2ListParamsIncidentMode = "test" + Tutorial FollowUpsV2ListParamsIncidentMode = "tutorial" +) + // APIKeyV2 defines model for APIKeyV2. type APIKeyV2 struct { // Id Unique identifier for this API key @@ -397,54 +570,46 @@ type ActionV1 struct { // ActionV1Status Status of the action type ActionV1Status string -// ActorV2 defines model for ActorV2. -type ActorV2 struct { - ApiKey *APIKeyV2 `json:"api_key,omitempty"` - User *UserV1 `json:"user,omitempty"` -} +// ActionV2 defines model for ActionV2. +type ActionV2 struct { + Assignee *UserV1 `json:"assignee,omitempty"` -// CatalogAttributeBindingPayloadV2 defines model for CatalogAttributeBindingPayloadV2. -type CatalogAttributeBindingPayloadV2 struct { - // ArrayValue If set, this is the array value of the attribute - ArrayValue *[]CatalogAttributeValuePayloadV2 `json:"array_value,omitempty"` - Value *CatalogAttributeValuePayloadV2 `json:"value,omitempty"` -} + // CompletedAt When the action was completed + CompletedAt *time.Time `json:"completed_at,omitempty"` -// CatalogAttributeBindingV2 defines model for CatalogAttributeBindingV2. -type CatalogAttributeBindingV2 struct { - // ArrayValue If array_value is set, this helps render the values - ArrayValue *[]CatalogAttributeValueV2 `json:"array_value,omitempty"` - Value *CatalogAttributeValueV2 `json:"value,omitempty"` -} + // CreatedAt When the action was created + CreatedAt time.Time `json:"created_at"` -// CatalogAttributeValuePayloadV2 defines model for CatalogAttributeValuePayloadV2. -type CatalogAttributeValuePayloadV2 struct { - // Literal The literal value of this attribute - Literal *string `json:"literal,omitempty"` -} + // Description Description of the action + Description string `json:"description"` -// CatalogAttributeValueV2 defines model for CatalogAttributeValueV2. -type CatalogAttributeValueV2 struct { - CatalogEntry *CatalogEntryReferenceV2 `json:"catalog_entry,omitempty"` + // Id Unique identifier for the action + Id string `json:"id"` - // ImageUrl If appropriate, URL to an image that can be displayed alongside the option - ImageUrl *string `json:"image_url,omitempty"` + // IncidentId Unique identifier of the incident the action belongs to + IncidentId string `json:"incident_id"` - // IsImageSlackIcon If true, the image_url is a Slack icon and should be displayed as such - IsImageSlackIcon *bool `json:"is_image_slack_icon,omitempty"` + // Status Status of the action + Status ActionV2Status `json:"status"` - // Label Human readable label to be displayed for user to select - Label string `json:"label"` + // UpdatedAt When the action was last updated + UpdatedAt time.Time `json:"updated_at"` +} - // Literal If set, this is the literal value of the step parameter - Literal *string `json:"literal,omitempty"` +// ActionV2Status Status of the action +type ActionV2Status string - // SortKey Gives an indication of how to sort the options when displayed to the user - SortKey string `json:"sort_key"` +// ActorV2 defines model for ActorV2. +type ActorV2 struct { + ApiKey *APIKeyV2 `json:"api_key,omitempty"` + User *UserV1 `json:"user,omitempty"` } // CatalogEntryReferenceV2 defines model for CatalogEntryReferenceV2. type CatalogEntryReferenceV2 struct { + // ArchivedAt When this entry was archived + ArchivedAt *time.Time `json:"archived_at,omitempty"` + // CatalogEntryId ID of this catalog entry CatalogEntryId string `json:"catalog_entry_id"` @@ -460,8 +625,11 @@ type CatalogEntryV2 struct { // Aliases Optional aliases that can be used to reference this entry Aliases []string `json:"aliases"` + // ArchivedAt When this entry was archived + ArchivedAt *time.Time `json:"archived_at,omitempty"` + // AttributeValues Values of this entry - AttributeValues map[string]CatalogAttributeBindingV2 `json:"attribute_values"` + AttributeValues map[string]EngineParamBindingV2 `json:"attribute_values"` // CatalogTypeId ID of this catalog type CatalogTypeId string `json:"catalog_type_id"` @@ -472,7 +640,7 @@ type CatalogEntryV2 struct { // 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 resource + // Id ID of this catalog entry Id string `json:"id"` // Name Name is the human readable name of this entry @@ -511,9 +679,15 @@ type CatalogTypeAttributePayloadV2 struct { // Array Whether this attribute is an array Array bool `json:"array"` + // BacklinkAttribute The attribute to use (if this is a backlink) + BacklinkAttribute *string `json:"backlink_attribute,omitempty"` + // Id The ID of this attribute Id *string `json:"id,omitempty"` + // Mode Controls how this attribute is modified + Mode *CatalogTypeAttributePayloadV2Mode `json:"mode,omitempty"` + // Name Unique name of this attribute Name string `json:"name"` @@ -521,14 +695,23 @@ type CatalogTypeAttributePayloadV2 struct { Type string `json:"type"` } +// CatalogTypeAttributePayloadV2Mode Controls how this attribute is modified +type CatalogTypeAttributePayloadV2Mode string + // CatalogTypeAttributeV2 defines model for CatalogTypeAttributeV2. type CatalogTypeAttributeV2 struct { // Array Whether this attribute is an array Array bool `json:"array"` + // BacklinkAttribute The attribute to use (if this is a backlink) + BacklinkAttribute *string `json:"backlink_attribute,omitempty"` + // Id The ID of this attribute Id string `json:"id"` + // Mode Controls how this attribute is modified + Mode CatalogTypeAttributeV2Mode `json:"mode"` + // Name Unique name of this attribute Name string `json:"name"` @@ -536,6 +719,9 @@ type CatalogTypeAttributeV2 struct { Type string `json:"type"` } +// CatalogTypeAttributeV2Mode Controls how this attribute is modified +type CatalogTypeAttributeV2Mode string + // CatalogTypeSchemaV2 defines model for CatalogTypeSchemaV2. type CatalogTypeSchemaV2 struct { // Attributes Attributes of this catalog type @@ -559,32 +745,38 @@ type CatalogTypeV2 struct { // Description Human readble description of this type Description string `json:"description"` + // DynamicResourceParameter If this is a dynamic catalog type, this will be the unique parameter for identitfying this resource externally. + DynamicResourceParameter *string `json:"dynamic_resource_parameter,omitempty"` + // EstimatedCount If populated, gives an estimated count of entries for this type EstimatedCount *int64 `json:"estimated_count,omitempty"` - // ExternalType The external resource this type is synced from, if any - ExternalType *string `json:"external_type,omitempty"` - // Icon Sets the display icon of this type in the dashboard Icon CatalogTypeV2Icon `json:"icon"` - // Id ID of this resource + // Id ID of this catalog type Id string `json:"id"` // IsEditable Catalog types that are synced with external resources can't be edited IsEditable bool `json:"is_editable"` + // LastSyncedAt When this type was last synced (if it's ever been sync'd) + LastSyncedAt *time.Time `json:"last_synced_at,omitempty"` + // Name Name is the human readable name of this type Name string `json:"name"` // Ranked If this type should be ranked Ranked bool `json:"ranked"` + // RegistryType The registry resource this type is synced from, if any + RegistryType *string `json:"registry_type,omitempty"` + // RequiredIntegrations If populated, the integrations required for this type RequiredIntegrations *[]string `json:"required_integrations,omitempty"` Schema CatalogTypeSchemaV2 `json:"schema"` - // SemanticType Semantic type of this resource + // SemanticType Semantic type of this resource (unused) SemanticType string `json:"semantic_type"` // SourceRepoUrl The url of the external repository where this type is managed @@ -609,7 +801,7 @@ type CreateEntryRequestBody struct { Aliases *[]string `json:"aliases,omitempty"` // AttributeValues Values of this entry - AttributeValues map[string]CatalogAttributeBindingPayloadV2 `json:"attribute_values"` + AttributeValues map[string]EngineParamBindingPayloadV2 `json:"attribute_values"` // CatalogTypeId ID of this catalog type CatalogTypeId string `json:"catalog_type_id"` @@ -629,6 +821,51 @@ type CreateEntryResponseBody struct { CatalogEntry CatalogEntryV2 `json:"catalog_entry"` } +// CreateHTTPRequestBody defines model for CreateHTTPRequestBody. +type CreateHTTPRequestBody struct { + // DeduplicationKey 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. + DeduplicationKey *string `json:"deduplication_key,omitempty"` + + // Description Description that optionally adds more detail to title + Description *string `json:"description,omitempty"` + + // Metadata Any additional metadata that you've configured your alert source to parse + Metadata *map[string]interface{} `json:"metadata,omitempty"` + + // SourceUrl If applicable, a link to the alert in the upstream system + SourceUrl *string `json:"source_url,omitempty"` + + // Status Current status of this alert + Status CreateHTTPRequestBodyStatus `json:"status"` + + // Title Alert title which is used when summarising the alert + Title string `json:"title"` +} + +// CreateHTTPRequestBodyStatus Current status of this alert +type CreateHTTPRequestBodyStatus string + +// CreateHTTPResponseBody defines model for CreateHTTPResponseBody. +type CreateHTTPResponseBody struct { + // DeduplicationKey The deduplication key that the event has been processed with + DeduplicationKey CreateHTTPResponseBodyDeduplicationKey `json:"deduplication_key"` + + // Message Human readable message giving detail about the event + Message CreateHTTPResponseBodyMessage `json:"message"` + + // Status Status of the event + Status CreateHTTPResponseBodyStatus `json:"status"` +} + +// CreateHTTPResponseBodyDeduplicationKey The deduplication key that the event has been processed with +type CreateHTTPResponseBodyDeduplicationKey string + +// CreateHTTPResponseBodyMessage Human readable message giving detail about the event +type CreateHTTPResponseBodyMessage string + +// CreateHTTPResponseBodyStatus Status of the event +type CreateHTTPResponseBodyStatus string + // CreateRequestBody defines model for CreateRequestBody. type CreateRequestBody struct { // CustomFieldId ID of the custom field this option belongs to @@ -641,6 +878,70 @@ type CreateRequestBody struct { Value string `json:"value"` } +// 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 { + // Description Description of the severity + Description string `json:"description"` + + // 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,omitempty"` +} + // CreateRequestBody2 defines model for CreateRequestBody2. type CreateRequestBody2 struct { // Description Description of the custom field @@ -652,10 +953,13 @@ type CreateRequestBody2 struct { // Name Human readable name for the custom field Name string `json:"name"` - // Required When this custom field must be set during the incident lifecycle. - Required CreateRequestBody2Required `json:"required"` + // Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. + Required *CreateRequestBody2Required `json:"required,omitempty"` + + // RequiredV2 When this custom field must be set during the incident lifecycle. + RequiredV2 *CreateRequestBody2RequiredV2 `json:"required_v2,omitempty"` - // ShowBeforeClosure Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure modal whatever the value of this setting. + // 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"` // ShowBeforeCreation Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required. @@ -671,11 +975,29 @@ type CreateRequestBody2 struct { // CreateRequestBody2FieldType Type of custom field type CreateRequestBody2FieldType string -// CreateRequestBody2Required When this custom field must be set during the incident lifecycle. +// CreateRequestBody2Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. type CreateRequestBody2Required string +// CreateRequestBody2RequiredV2 When this custom field must be set during the incident lifecycle. +type CreateRequestBody2RequiredV2 string + // CreateRequestBody3 defines model for CreateRequestBody3. type CreateRequestBody3 struct { + // Description Description of the custom field + Description string `json:"description"` + + // FieldType Type of custom field + FieldType CreateRequestBody3FieldType `json:"field_type"` + + // Name Human readable name for the custom field + Name string `json:"name"` +} + +// CreateRequestBody3FieldType Type of custom field +type CreateRequestBody3FieldType string + +// CreateRequestBody4 defines model for CreateRequestBody4. +type CreateRequestBody4 struct { // IncidentId ID of the incident to add an attachment to IncidentId string `json:"incident_id"` Resource struct { @@ -683,15 +1005,21 @@ type CreateRequestBody3 struct { ExternalId string `json:"external_id"` // ResourceType E.g. PagerDuty: the external system that holds the resource - ResourceType CreateRequestBody3ResourceResourceType `json:"resource_type"` + ResourceType CreateRequestBody4ResourceResourceType `json:"resource_type"` } `json:"resource"` } -// CreateRequestBody3ResourceResourceType E.g. PagerDuty: the external system that holds the resource -type CreateRequestBody3ResourceResourceType string +// CreateRequestBody4ResourceResourceType E.g. PagerDuty: the external system that holds the resource +type CreateRequestBody4ResourceResourceType string -// CreateRequestBody4 defines model for CreateRequestBody4. -type CreateRequestBody4 struct { +// CreateRequestBody5 defines model for CreateRequestBody5. +type CreateRequestBody5 struct { + IncidentId string `json:"incident_id"` + UserId string `json:"user_id"` +} + +// CreateRequestBody6 defines model for CreateRequestBody6. +type CreateRequestBody6 struct { // Description Describes the purpose of the role Description string `json:"description"` @@ -701,17 +1029,32 @@ type CreateRequestBody4 struct { // Name Human readable name of the incident role Name string `json:"name"` - // Required Whether incident require this role to be set + // Required DEPRECATED: this will always be false. Required bool `json:"required"` // Shortform Short human readable name for Slack Shortform string `json:"shortform"` } -// CreateRequestBody5 defines model for CreateRequestBody5. -type CreateRequestBody5 struct { - // Category Whether the status should be considered 'live' or 'closed'. The triage and declined statuses cannot be created or modified. - Category CreateRequestBody5Category `json:"category"` +// CreateRequestBody7 defines model for CreateRequestBody7. +type CreateRequestBody7 struct { + // Description Describes the purpose of the role + Description string `json:"description"` + + // Instructions Provided to whoever is nominated for the role + Instructions string `json:"instructions"` + + // Name Human readable name of the incident role + Name string `json:"name"` + + // Shortform Short human readable name for Slack + Shortform string `json:"shortform"` +} + +// CreateRequestBody8 defines model for CreateRequestBody8. +type CreateRequestBody8 struct { + // Category 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. + Category CreateRequestBody8Category `json:"category"` // Description Rich text description of the incident status Description string `json:"description"` @@ -720,11 +1063,11 @@ type CreateRequestBody5 struct { Name string `json:"name"` } -// CreateRequestBody5Category Whether the status should be considered 'live' or 'closed'. The triage and declined statuses cannot be created or modified. -type CreateRequestBody5Category string +// CreateRequestBody8Category 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. +type CreateRequestBody8Category string -// CreateRequestBody6 defines model for CreateRequestBody6. -type CreateRequestBody6 struct { +// 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"` @@ -738,7 +1081,7 @@ type CreateRequestBody6 struct { IncidentTypeId *string `json:"incident_type_id,omitempty"` // Mode Whether the incident is real or test - Mode *CreateRequestBody6Mode `json:"mode,omitempty"` + Mode *CreateRequestBody9Mode `json:"mode,omitempty"` // Name Explanation of the incident Name *string `json:"name,omitempty"` @@ -746,7 +1089,7 @@ type CreateRequestBody6 struct { // SeverityId Severity to create incident as SeverityId *string `json:"severity_id,omitempty"` - // SlackTeamId ID of the Slack team / workspace + // 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 @@ -756,115 +1099,56 @@ type CreateRequestBody6 struct { SourceMessageTimestamp *string `json:"source_message_timestamp,omitempty"` // Status Current status of the incident - Status *CreateRequestBody6Status `json:"status,omitempty"` + 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 CreateRequestBody6Visibility `json:"visibility"` + Visibility CreateRequestBody9Visibility `json:"visibility"` } -// CreateRequestBody6Mode Whether the incident is real or test -type CreateRequestBody6Mode string +// CreateRequestBody9Mode Whether the incident is real or test +type CreateRequestBody9Mode string -// CreateRequestBody6Status Current status of the incident -type CreateRequestBody6Status string +// CreateRequestBody9Status Current status of the incident +type CreateRequestBody9Status string -// CreateRequestBody6Visibility 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 CreateRequestBody6Visibility 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 -// CreateRequestBody7 defines model for CreateRequestBody7. -type CreateRequestBody7 struct { - // CustomFieldEntries Set the incident's custom fields to these values - CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` +// CreateResponseBody defines model for CreateResponseBody. +type CreateResponseBody struct { + IncidentAttachment IncidentAttachmentV1 `json:"incident_attachment"` +} - // Id Unique identifier for the incident - Id *string `json:"id,omitempty"` +// CreateResponseBody2 defines model for CreateResponseBody2. +type CreateResponseBody2 struct { + IncidentMembership IncidentMembership `json:"incident_membership"` +} - // IdempotencyKey Unique string used to de-duplicate incident create requests - IdempotencyKey string `json:"idempotency_key"` +// CreateTypeRequestBody defines model for CreateTypeRequestBody. +type CreateTypeRequestBody struct { + // Annotations Annotations that can track metadata about this type + Annotations *map[string]string `json:"annotations,omitempty"` - // IncidentRoleAssignments Assign incident roles to these people - IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV2 `json:"incident_role_assignments,omitempty"` + // Color Sets the display color of this type in the dashboard + Color *CreateTypeRequestBodyColor `json:"color,omitempty"` - // IncidentStatusId Incident status to assign to the incident - IncidentStatusId *string `json:"incident_status_id,omitempty"` + // Description Human readble description of this type + Description string `json:"description"` - // IncidentTimestampValues Assign the incident's timestamps to these values - IncidentTimestampValues *[]IncidentTimestampValuePayloadV2 `json:"incident_timestamp_values,omitempty"` + // Icon Sets the display icon of this type in the dashboard + Icon *CreateTypeRequestBodyIcon `json:"icon,omitempty"` - // IncidentTypeId Incident type to create this incident as - IncidentTypeId *string `json:"incident_type_id,omitempty"` + // Name Name is the human readable name of this type + Name string `json:"name"` - // Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident - Mode *CreateRequestBody7Mode `json:"mode,omitempty"` + // Ranked If this type should be ranked + Ranked *bool `json:"ranked,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"` - - // 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 CreateRequestBody7Visibility `json:"visibility"` -} - -// CreateRequestBody7Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident -type CreateRequestBody7Mode string - -// CreateRequestBody7Visibility 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 CreateRequestBody7Visibility string - -// CreateRequestBody8 defines model for CreateRequestBody8. -type CreateRequestBody8 struct { - // Description Description of the severity - Description string `json:"description"` - - // 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,omitempty"` -} - -// CreateResponseBody defines model for CreateResponseBody. -type CreateResponseBody struct { - IncidentAttachment IncidentAttachmentV1 `json:"incident_attachment"` -} - -// CreateTypeRequestBody defines model for CreateTypeRequestBody. -type CreateTypeRequestBody struct { - // Annotations Annotations that can track metadata about this type - Annotations *map[string]string `json:"annotations,omitempty"` - - // Color Sets the display color of this type in the dashboard - Color *CreateTypeRequestBodyColor `json:"color,omitempty"` - - // Description Human readble description of this type - Description string `json:"description"` - - // Icon Sets the display icon of this type in the dashboard - Icon *CreateTypeRequestBodyIcon `json:"icon,omitempty"` - - // Name Name is the human readable name of this type - Name string `json:"name"` - - // Ranked If this type should be ranked - Ranked *bool `json:"ranked,omitempty"` - - // SemanticType Semantic type of this resource - SemanticType *string `json:"semantic_type,omitempty"` - - // SourceRepoUrl The url of the external repository where this type is managed - SourceRepoUrl *string `json:"source_repo_url,omitempty"` + // SourceRepoUrl The url of the external repository where this type is managed + SourceRepoUrl *string `json:"source_repo_url,omitempty"` // TypeName 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 "] TypeName *string `json:"type_name,omitempty"` @@ -886,7 +1170,7 @@ type CustomFieldEntryPayloadV1 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 + // Values List of values to associate with this entry. Use an empty array to unset the value of the custom field. Values []CustomFieldValuePayloadV1 `json:"values"` } @@ -936,6 +1220,9 @@ type CustomFieldTypeInfoV1FieldType string // CustomFieldV1 defines model for CustomFieldV1. type CustomFieldV1 struct { + // CatalogTypeId For catalog fields, the ID of the associated catalog type + CatalogTypeId *string `json:"catalog_type_id,omitempty"` + // CreatedAt When the action was created CreatedAt time.Time `json:"created_at"` @@ -954,10 +1241,13 @@ type CustomFieldV1 struct { // Options What options are available for this custom field, if this field has options Options []CustomFieldOptionV1 `json:"options"` - // Required When this custom field must be set during the incident lifecycle. - Required CustomFieldV1Required `json:"required"` + // Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. + Required *CustomFieldV1Required `json:"required,omitempty"` - // ShowBeforeClosure Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure modal whatever the value of this setting. + // RequiredV2 When this custom field must be set during the incident lifecycle. + RequiredV2 *CustomFieldV1RequiredV2 `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"` // ShowBeforeCreation Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required. @@ -976,14 +1266,47 @@ type CustomFieldV1 struct { // CustomFieldV1FieldType Type of custom field type CustomFieldV1FieldType string -// CustomFieldV1Required When this custom field must be set during the incident lifecycle. +// CustomFieldV1Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. type CustomFieldV1Required string +// CustomFieldV1RequiredV2 When this custom field must be set during the incident lifecycle. +type CustomFieldV1RequiredV2 string + +// CustomFieldV2 defines model for CustomFieldV2. +type CustomFieldV2 struct { + // CatalogTypeId For catalog fields, the ID of the associated catalog type + CatalogTypeId *string `json:"catalog_type_id,omitempty"` + + // CreatedAt When the action was created + CreatedAt time.Time `json:"created_at"` + + // Description Description of the custom field + Description string `json:"description"` + + // FieldType Type of custom field + FieldType CustomFieldV2FieldType `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"` + + // UpdatedAt When the action was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// CustomFieldV2FieldType Type of custom field +type CustomFieldV2FieldType string + // CustomFieldValuePayloadV1 defines model for CustomFieldValuePayloadV1. type CustomFieldValuePayloadV1 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"` @@ -1002,6 +1325,8 @@ type CustomFieldValuePayloadV1 struct { // CustomFieldValueV1 defines model for CustomFieldValueV1. type CustomFieldValueV1 struct { + ValueCatalogEntry *EmbeddedCatalogEntryV1 `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"` @@ -1021,6 +1346,76 @@ type EditRequestBody struct { NotifyIncidentChannel bool `json:"notify_incident_channel"` } +// EmbeddedCatalogEntryV1 defines model for EmbeddedCatalogEntryV1. +type EmbeddedCatalogEntryV1 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"` +} + +// EngineParamBindingPayloadV2 defines model for EngineParamBindingPayloadV2. +type EngineParamBindingPayloadV2 struct { + // ArrayValue If set, this is the array value of the step parameter + ArrayValue *[]EngineParamBindingValuePayloadV2 `json:"array_value,omitempty"` + Value *EngineParamBindingValuePayloadV2 `json:"value,omitempty"` +} + +// EngineParamBindingV2 defines model for EngineParamBindingV2. +type EngineParamBindingV2 struct { + // ArrayValue If array_value is set, this helps render the values + ArrayValue *[]EngineParamBindingValueV2 `json:"array_value,omitempty"` + Value *EngineParamBindingValueV2 `json:"value,omitempty"` +} + +// EngineParamBindingValuePayloadV2 defines model for EngineParamBindingValuePayloadV2. +type EngineParamBindingValuePayloadV2 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 *string `json:"reference,omitempty"` +} + +// EngineParamBindingValueV2 defines model for EngineParamBindingValueV2. +type EngineParamBindingValueV2 struct { + CatalogEntry *CatalogEntryReferenceV2 `json:"catalog_entry,omitempty"` + + // Helptext Gives a description of the option to the user + Helptext *string `json:"helptext,omitempty"` + + // ImageUrl If appropriate, URL to an image that can be displayed alongside the option + ImageUrl *string `json:"image_url,omitempty"` + + // IsImageSlackIcon If true, the image_url is a Slack icon and should be displayed as such + IsImageSlackIcon *bool `json:"is_image_slack_icon,omitempty"` + + // Label Human readable label to be displayed for user to select + Label string `json:"label"` + + // Literal If set, this is the literal value of the step parameter + Literal *string `json:"literal,omitempty"` + + // Reference If set, this is the reference into the trigger scope that is the value of this parameter + Reference *string `json:"reference,omitempty"` + + // SortKey Gives an indication of how to sort the options when displayed to the user + SortKey string `json:"sort_key"` + + // Unavailable Unavailable is true if we've failed to build the value for this binding + Unavailable *bool `json:"unavailable,omitempty"` + + // Value Either the reference or the literal: this field is designed purely to make working with react-select easier + Value *string `json:"value,omitempty"` +} + // ExternalIssueReferenceV1 defines model for ExternalIssueReferenceV1. type ExternalIssueReferenceV1 struct { // IssueName Human readable ID for the issue @@ -1069,6 +1464,55 @@ type ExternalResourceV1 struct { // ExternalResourceV1ResourceType E.g. PagerDuty: the external system that holds the resource type ExternalResourceV1ResourceType string +// FollowUpPriorityV2 defines model for FollowUpPriorityV2. +type FollowUpPriorityV2 struct { + // Description Description of the follow-up priority option + Description *string `json:"description,omitempty"` + + // Id Unique identifier for the follow-up priority option + Id string `json:"id"` + + // Name Name of the follow-up priority option + Name string `json:"name"` + + // Rank Rank is used to order the follow-up priority options correctly + Rank int64 `json:"rank"` +} + +// FollowUpV2 defines model for FollowUpV2. +type FollowUpV2 struct { + Assignee *UserV1 `json:"assignee,omitempty"` + + // CompletedAt When the follow-up was completed + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CreatedAt When the follow-up was created + CreatedAt time.Time `json:"created_at"` + + // Description Description of the follow-up + Description *string `json:"description,omitempty"` + ExternalIssueReference *ExternalIssueReferenceV2 `json:"external_issue_reference,omitempty"` + + // Id Unique identifier for the follow-up + Id string `json:"id"` + + // IncidentId Unique identifier of the incident the follow-up belongs to + IncidentId string `json:"incident_id"` + Priority *FollowUpPriorityV2 `json:"priority,omitempty"` + + // Status Status of the follow-up + Status FollowUpV2Status `json:"status"` + + // Title Title of the follow-up + Title string `json:"title"` + + // UpdatedAt When the follow-up was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// FollowUpV2Status Status of the follow-up +type FollowUpV2Status string + // IdentityResponseBody defines model for IdentityResponseBody. type IdentityResponseBody struct { Identity IdentityV1 `json:"identity"` @@ -1076,6 +1520,9 @@ type IdentityResponseBody struct { // IdentityV1 defines model for IdentityV1. type IdentityV1 struct { + // DashboardUrl The dashboard URL for this organisation + DashboardUrl string `json:"dashboard_url"` + // Name The name assigned to the current API Key Name string `json:"name"` @@ -1096,11 +1543,37 @@ type IncidentAttachmentV1 struct { Resource ExternalResourceV1 `json:"resource"` } +// IncidentDurationMetricV2 defines model for IncidentDurationMetricV2. +type IncidentDurationMetricV2 struct { + // Id Unique ID of this incident duration metric + Id string `json:"id"` + + // Name Unique name of this duration metric + Name string `json:"name"` +} + +// IncidentDurationMetricWithValueV2 defines model for IncidentDurationMetricWithValueV2. +type IncidentDurationMetricWithValueV2 struct { + DurationMetric IncidentDurationMetricV2 `json:"duration_metric"` + + // ValueSeconds The calculated durations for this metric + ValueSeconds *int64 `json:"value_seconds,omitempty"` +} + // IncidentEditPayloadV2 defines model for IncidentEditPayloadV2. type IncidentEditPayloadV2 struct { + // CallUrl The call URL attached to this incident + CallUrl *string `json:"call_url,omitempty"` + // CustomFieldEntries Set the incident's custom fields to these values CustomFieldEntries *[]CustomFieldEntryPayloadV1 `json:"custom_field_entries,omitempty"` + // IncidentRoleAssignments Assign incident roles to these people + IncidentRoleAssignments *[]IncidentRoleAssignmentPayloadV2 `json:"incident_role_assignments,omitempty"` + + // IncidentStatusId 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.) + IncidentStatusId *string `json:"incident_status_id,omitempty"` + // IncidentTimestampValues Assign the incident's timestamps to these values IncidentTimestampValues *[]IncidentTimestampValuePayloadV2 `json:"incident_timestamp_values,omitempty"` @@ -1114,6 +1587,22 @@ type IncidentEditPayloadV2 struct { Summary *string `json:"summary,omitempty"` } +// IncidentMembership defines model for IncidentMembership. +type IncidentMembership struct { + // CreatedAt When the membership was created + CreatedAt time.Time `json:"created_at"` + + // Id Unique identifier of this incident membership + Id string `json:"id"` + + // IncidentId Unique identifier of the incident + IncidentId string `json:"incident_id"` + + // UpdatedAt When the membership was last updated + UpdatedAt time.Time `json:"updated_at"` + User UserV1 `json:"user"` +} + // IncidentRoleAssignmentPayloadV1 defines model for IncidentRoleAssignmentPayloadV1. type IncidentRoleAssignmentPayloadV1 struct { Assignee UserReferencePayloadV1 `json:"assignee"` @@ -1153,8 +1642,8 @@ type IncidentRoleV1 struct { // Name Human readable name of the incident role Name string `json:"name"` - // Required Whether incident require this role to be set - Required bool `json:"required"` + // Required DEPRECATED: this will always be false. + Required *bool `json:"required,omitempty"` // RoleType Type of incident role RoleType IncidentRoleV1RoleType `json:"role_type"` @@ -1169,9 +1658,39 @@ type IncidentRoleV1 struct { // IncidentRoleV1RoleType Type of incident role type IncidentRoleV1RoleType string +// IncidentRoleV2 defines model for IncidentRoleV2. +type IncidentRoleV2 struct { + // CreatedAt When the action 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 + Instructions string `json:"instructions"` + + // Name Human readable name of the incident role + Name string `json:"name"` + + // RoleType Type of incident role + RoleType IncidentRoleV2RoleType `json:"role_type"` + + // Shortform Short human readable name for Slack + Shortform string `json:"shortform"` + + // UpdatedAt When the action was last updated + UpdatedAt time.Time `json:"updated_at"` +} + +// IncidentRoleV2RoleType Type of incident role +type IncidentRoleV2RoleType string + // IncidentStatusV1 defines model for IncidentStatusV1. type IncidentStatusV1 struct { - // Category Whether this status is a live or closed status. If you have enabled auto-create, there will also be 'triage' and 'declined' statuses, which cannot be modified. + // 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 IncidentStatusV1Category `json:"category"` CreatedAt time.Time `json:"created_at"` @@ -1189,7 +1708,7 @@ type IncidentStatusV1 struct { UpdatedAt time.Time `json:"updated_at"` } -// IncidentStatusV1Category Whether this status is a live or closed status. If you have enabled auto-create, there will also be 'triage' and 'declined' statuses, which cannot be modified. +// 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 // IncidentTimestampV1 defines model for IncidentTimestampV1. @@ -1323,7 +1842,7 @@ type IncidentV1 struct { // SlackChannelName Name of the slack channel SlackChannelName *string `json:"slack_channel_name,omitempty"` - // SlackTeamId ID of the Slack team / workspace + // 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"` // Status Current status of the incident @@ -1361,8 +1880,11 @@ type IncidentV2 struct { Creator ActorV2 `json:"creator"` // CustomFieldEntries Custom field entries for this incident - CustomFieldEntries []CustomFieldEntryV1 `json:"custom_field_entries"` - ExternalIssueReference *ExternalIssueReferenceV2 `json:"external_issue_reference,omitempty"` + CustomFieldEntries []CustomFieldEntryV1 `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"` // Id Unique identifier for the incident Id string `json:"id"` @@ -1397,7 +1919,7 @@ type IncidentV2 struct { // SlackChannelName Name of the slack channel SlackChannelName *string `json:"slack_channel_name,omitempty"` - // SlackTeamId ID of the Slack team / workspace + // 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"` // Summary Detailed description of the incident @@ -1408,6 +1930,18 @@ type IncidentV2 struct { // 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 IncidentV2Visibility `json:"visibility"` + + // WorkloadMinutesLate Amount of time spent on the incident in late hours + WorkloadMinutesLate *float64 `json:"workload_minutes_late,omitempty"` + + // WorkloadMinutesSleeping Amount of time spent on the incident in sleeping hours + WorkloadMinutesSleeping *float64 `json:"workload_minutes_sleeping,omitempty"` + + // WorkloadMinutesTotal Amount of time spent on the incident in total + WorkloadMinutesTotal *float64 `json:"workload_minutes_total,omitempty"` + + // WorkloadMinutesWorking Amount of time spent on the incident in working hours + WorkloadMinutesWorking *float64 `json:"workload_minutes_working,omitempty"` } // IncidentV2Mode Whether the incident is real, a test, a tutorial, or importing as a retrospective incident @@ -1435,60 +1969,87 @@ type ListResponseBody struct { // ListResponseBody10 defines model for ListResponseBody10. type ListResponseBody10 struct { - Incidents []IncidentV1 `json:"incidents"` - PaginationMeta *PaginationMetaResultWithTotal `json:"pagination_meta,omitempty"` + IncidentStatuses []IncidentStatusV1 `json:"incident_statuses"` } // ListResponseBody11 defines model for ListResponseBody11. type ListResponseBody11 struct { - Incidents []IncidentV2 `json:"incidents"` - PaginationMeta *PaginationMetaResultWithTotal `json:"pagination_meta,omitempty"` + IncidentTimestamps []IncidentTimestampV2 `json:"incident_timestamps"` } // ListResponseBody12 defines model for ListResponseBody12. type ListResponseBody12 struct { + IncidentTypes []IncidentTypeV1 `json:"incident_types"` +} + +// ListResponseBody13 defines model for ListResponseBody13. +type ListResponseBody13 struct { + IncidentUpdates []IncidentUpdateV2 `json:"incident_updates"` + PaginationMeta *PaginationMetaResult `json:"pagination_meta,omitempty"` +} + +// ListResponseBody14 defines model for ListResponseBody14. +type ListResponseBody14 struct { + Incidents []IncidentV1 `json:"incidents"` + PaginationMeta *PaginationMetaResultWithTotal `json:"pagination_meta,omitempty"` +} + +// ListResponseBody15 defines model for ListResponseBody15. +type ListResponseBody15 struct { + Incidents []IncidentV2 `json:"incidents"` + PaginationMeta *PaginationMetaResultWithTotal `json:"pagination_meta,omitempty"` +} + +// ListResponseBody16 defines model for ListResponseBody16. +type ListResponseBody16 struct { Severities []SeverityV2 `json:"severities"` } +// ListResponseBody17 defines model for ListResponseBody17. +type ListResponseBody17 struct { + PaginationMeta PaginationMetaResult `json:"pagination_meta"` + Users []UserWithRolesV2 `json:"users"` +} + // ListResponseBody2 defines model for ListResponseBody2. type ListResponseBody2 struct { - CustomFieldOptions []CustomFieldOptionV1 `json:"custom_field_options"` + Actions []ActionV2 `json:"actions"` } // ListResponseBody3 defines model for ListResponseBody3. type ListResponseBody3 struct { - CustomFields []CustomFieldV1 `json:"custom_fields"` + CustomFieldOptions []CustomFieldOptionV1 `json:"custom_field_options"` + PaginationMeta PaginationMetaResult `json:"pagination_meta"` } // ListResponseBody4 defines model for ListResponseBody4. type ListResponseBody4 struct { - IncidentAttachments []IncidentAttachmentV1 `json:"incident_attachments"` + CustomFields []CustomFieldV1 `json:"custom_fields"` } // ListResponseBody5 defines model for ListResponseBody5. type ListResponseBody5 struct { - IncidentRoles []IncidentRoleV1 `json:"incident_roles"` + CustomFields []CustomFieldV2 `json:"custom_fields"` } // ListResponseBody6 defines model for ListResponseBody6. type ListResponseBody6 struct { - IncidentStatuses []IncidentStatusV1 `json:"incident_statuses"` + FollowUps []FollowUpV2 `json:"follow_ups"` } // ListResponseBody7 defines model for ListResponseBody7. type ListResponseBody7 struct { - IncidentTimestamps []IncidentTimestampV2 `json:"incident_timestamps"` + IncidentAttachments []IncidentAttachmentV1 `json:"incident_attachments"` } // ListResponseBody8 defines model for ListResponseBody8. type ListResponseBody8 struct { - IncidentTypes []IncidentTypeV1 `json:"incident_types"` + IncidentRoles []IncidentRoleV1 `json:"incident_roles"` } // ListResponseBody9 defines model for ListResponseBody9. type ListResponseBody9 struct { - IncidentUpdates []IncidentUpdateV2 `json:"incident_updates"` - PaginationMeta *PaginationMetaResult `json:"pagination_meta,omitempty"` + IncidentRoles []IncidentRoleV2 `json:"incident_roles"` } // ListTypesResponseBody defines model for ListTypesResponseBody. @@ -1517,6 +2078,21 @@ type PaginationMetaResultWithTotal struct { TotalRecordCount *int64 `json:"total_record_count,omitempty"` } +// RBACRoleV2 defines model for RBACRoleV2. +type RBACRoleV2 struct { + // Description Description of the purpose for the RBAC role + Description *string `json:"description,omitempty"` + + // Id Unique identifier of the RBAC role + Id string `json:"id"` + + // Name Name of the RBAC role + Name string `json:"name"` + + // Slug Unique human-readable slug for the RBAC role + Slug string `json:"slug"` +} + // RetrospectiveIncidentOptionsV2 defines model for RetrospectiveIncidentOptionsV2. type RetrospectiveIncidentOptionsV2 struct { // SlackChannelId If the incident mode is 'retrospective', pass the ID of a Slack channel in your workspace to attach the incident to an existing channel, rather than creating a new one @@ -1557,47 +2133,72 @@ type ShowResponseBody struct { // ShowResponseBody10 defines model for ShowResponseBody10. type ShowResponseBody10 struct { + IncidentTimestamp IncidentTimestampV2 `json:"incident_timestamp"` +} + +// ShowResponseBody11 defines model for ShowResponseBody11. +type ShowResponseBody11 struct { + IncidentType IncidentTypeV1 `json:"incident_type"` +} + +// ShowResponseBody12 defines model for ShowResponseBody12. +type ShowResponseBody12 struct { + Incident IncidentV1 `json:"incident"` +} + +// ShowResponseBody13 defines model for ShowResponseBody13. +type ShowResponseBody13 struct { + Incident IncidentV2 `json:"incident"` +} + +// ShowResponseBody14 defines model for ShowResponseBody14. +type ShowResponseBody14 struct { Severity SeverityV2 `json:"severity"` } +// ShowResponseBody15 defines model for ShowResponseBody15. +type ShowResponseBody15 struct { + User UserWithRolesV2 `json:"user"` +} + // ShowResponseBody2 defines model for ShowResponseBody2. type ShowResponseBody2 struct { - CustomFieldOption CustomFieldOptionV1 `json:"custom_field_option"` + Action ActionV2 `json:"action"` } // ShowResponseBody3 defines model for ShowResponseBody3. type ShowResponseBody3 struct { - CustomField CustomFieldV1 `json:"custom_field"` + CustomFieldOption CustomFieldOptionV1 `json:"custom_field_option"` } // ShowResponseBody4 defines model for ShowResponseBody4. type ShowResponseBody4 struct { - IncidentRole IncidentRoleV1 `json:"incident_role"` + CustomField CustomFieldV1 `json:"custom_field"` } // ShowResponseBody5 defines model for ShowResponseBody5. type ShowResponseBody5 struct { - IncidentStatus IncidentStatusV1 `json:"incident_status"` + CustomField CustomFieldV2 `json:"custom_field"` } // ShowResponseBody6 defines model for ShowResponseBody6. type ShowResponseBody6 struct { - IncidentTimestamp IncidentTimestampV2 `json:"incident_timestamp"` + FollowUp FollowUpV2 `json:"follow_up"` } // ShowResponseBody7 defines model for ShowResponseBody7. type ShowResponseBody7 struct { - IncidentType IncidentTypeV1 `json:"incident_type"` + IncidentRole IncidentRoleV1 `json:"incident_role"` } // ShowResponseBody8 defines model for ShowResponseBody8. type ShowResponseBody8 struct { - Incident IncidentV1 `json:"incident"` + IncidentRole IncidentRoleV2 `json:"incident_role"` } // ShowResponseBody9 defines model for ShowResponseBody9. type ShowResponseBody9 struct { - Incident IncidentV2 `json:"incident"` + IncidentStatus IncidentStatusV1 `json:"incident_status"` } // UpdateEntryRequestBody defines model for UpdateEntryRequestBody. @@ -1606,7 +2207,7 @@ type UpdateEntryRequestBody struct { Aliases *[]string `json:"aliases,omitempty"` // AttributeValues Values of this entry - AttributeValues map[string]CatalogAttributeBindingPayloadV2 `json:"attribute_values"` + AttributeValues map[string]EngineParamBindingPayloadV2 `json:"attribute_values"` // ExternalId An optional alternative ID for this entry, which is ensured to be unique for the type ExternalId *string `json:"external_id,omitempty"` @@ -1635,10 +2236,13 @@ type UpdateRequestBody2 struct { // Name Human readable name for the custom field Name string `json:"name"` - // Required When this custom field must be set during the incident lifecycle. - Required UpdateRequestBody2Required `json:"required"` + // Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. + Required *UpdateRequestBody2Required `json:"required,omitempty"` - // ShowBeforeClosure Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure modal whatever the value of this setting. + // RequiredV2 When this custom field must be set during the incident lifecycle. + RequiredV2 *UpdateRequestBody2RequiredV2 `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"` // ShowBeforeCreation Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required. @@ -1651,11 +2255,23 @@ type UpdateRequestBody2 struct { ShowInAnnouncementPost *bool `json:"show_in_announcement_post,omitempty"` } -// UpdateRequestBody2Required When this custom field must be set during the incident lifecycle. +// UpdateRequestBody2Required When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead]. type UpdateRequestBody2Required string +// UpdateRequestBody2RequiredV2 When this custom field must be set during the incident lifecycle. +type UpdateRequestBody2RequiredV2 string + // UpdateRequestBody3 defines model for UpdateRequestBody3. type UpdateRequestBody3 struct { + // Description Description of the custom field + Description string `json:"description"` + + // Name Human readable name for the custom field + Name string `json:"name"` +} + +// UpdateRequestBody4 defines model for UpdateRequestBody4. +type UpdateRequestBody4 struct { // Description Describes the purpose of the role Description string `json:"description"` @@ -1665,15 +2281,30 @@ type UpdateRequestBody3 struct { // Name Human readable name of the incident role Name string `json:"name"` - // Required Whether incident require this role to be set - Required bool `json:"required"` + // Required DEPRECATED: this will always be false. + Required *bool `json:"required,omitempty"` // Shortform Short human readable name for Slack Shortform string `json:"shortform"` } -// 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"` + + // Instructions Provided to whoever is nominated for the role + Instructions string `json:"instructions"` + + // Name Human readable name of the incident role + Name string `json:"name"` + + // Shortform Short human readable name for Slack + Shortform string `json:"shortform"` +} + +// UpdateRequestBody6 defines model for UpdateRequestBody6. +type UpdateRequestBody6 struct { // Description Rich text description of the incident status Description string `json:"description"` @@ -1701,9 +2332,6 @@ type UpdateTypeRequestBody struct { // Ranked If this type should be ranked Ranked *bool `json:"ranked,omitempty"` - // SemanticType Semantic type of this resource - SemanticType *string `json:"semantic_type,omitempty"` - // SourceRepoUrl The url of the external repository where this type is managed SourceRepoUrl *string `json:"source_repo_url,omitempty"` } @@ -1753,6 +2381,30 @@ type UserV1 struct { // UserV1Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. type UserV1Role string +// UserWithRolesV2 defines model for UserWithRolesV2. +type UserWithRolesV2 struct { + BaseRole RBACRoleV2 `json:"base_role"` + CustomRoles []RBACRoleV2 `json:"custom_roles"` + + // 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 UserWithRolesV2Role `json:"role"` + + // SlackUserId Slack ID of the user + SlackUserId *string `json:"slack_user_id,omitempty"` +} + +// UserWithRolesV2Role DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. +type UserWithRolesV2Role string + // ActionsV1ListParams defines parameters for ActionsV1List. type ActionsV1ListParams struct { // IncidentId Find actions related to this incident @@ -1798,7 +2450,7 @@ type IncidentAttachmentsV1ListParamsResourceType string // IncidentsV1ListParams defines parameters for IncidentsV1List. type IncidentsV1ListParams struct { // PageSize Integer number of records to return - PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` + PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` // 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"` @@ -1807,25 +2459,55 @@ type IncidentsV1ListParams struct { Status *[]string `form:"status,omitempty" json:"status,omitempty"` } +// ActionsV2ListParams defines parameters for ActionsV2List. +type ActionsV2ListParams struct { + // IncidentId Find actions related to this incident + IncidentId *string `form:"incident_id,omitempty" json:"incident_id,omitempty"` + + // IncidentMode Filter to actions from incidents of the given mode. If not set, only actions from `standard` and `retrospective` incidents are returned + IncidentMode *ActionsV2ListParamsIncidentMode `form:"incident_mode,omitempty" json:"incident_mode,omitempty"` +} + +// ActionsV2ListParamsIncidentMode defines parameters for ActionsV2List. +type ActionsV2ListParamsIncidentMode string + +// AlertEventsV2CreateHTTPParams defines parameters for AlertEventsV2CreateHTTP. +type AlertEventsV2CreateHTTPParams struct { + // Token Token used to authenticate the request, generated when configuring the alert source. Will be consumed via a URL query string parameter + Token *string `form:"token,omitempty" json:"token,omitempty"` +} + // CatalogV2ListEntriesParams defines parameters for CatalogV2ListEntries. type CatalogV2ListEntriesParams struct { // CatalogTypeId ID of this catalog type CatalogTypeId string `form:"catalog_type_id" json:"catalog_type_id"` // PageSize Integer number of records to return - PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` + PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` // 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"` } +// FollowUpsV2ListParams defines parameters for FollowUpsV2List. +type FollowUpsV2ListParams struct { + // IncidentId Find follow-ups related to this incident + IncidentId *string `form:"incident_id,omitempty" json:"incident_id,omitempty"` + + // IncidentMode Filter to follow-ups from incidents of the given mode. If not set, only follow-ups from `standard` and `retrospective` incidents are returned + IncidentMode *FollowUpsV2ListParamsIncidentMode `form:"incident_mode,omitempty" json:"incident_mode,omitempty"` +} + +// FollowUpsV2ListParamsIncidentMode defines parameters for FollowUpsV2List. +type FollowUpsV2ListParamsIncidentMode string + // IncidentUpdatesV2ListParams defines parameters for IncidentUpdatesV2List. type IncidentUpdatesV2ListParams struct { // IncidentId Incident whose updates you want to list IncidentId *string `form:"incident_id,omitempty" json:"incident_id,omitempty"` // PageSize Integer number of records to return - PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` + PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` // 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"` @@ -1842,10 +2524,13 @@ type IncidentsV2ListParams struct { // Status Filter on incident status. The accepted operators are 'one_of', or 'not_in'. Status *map[string][]string `form:"status,omitempty" json:"status,omitempty"` + // StatusCategory Filter on the category of the incidents status. The accepted operators are 'one_of', or 'not_in'. If this is not provided, this value defaults to `{"one_of": ["triage", "active", "post-incident", "closed"] }`, meaning that canceled, declined and merged incidents are not included. + StatusCategory *map[string][]string `form:"status_category,omitempty" json:"status_category,omitempty"` + // 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"` - // IncidentType Filter on incident type. The accepted operator is 'one_of'. + // IncidentType Filter on incident type. The accepted operators are 'one_of, or 'not_in'. IncidentType *map[string][]string `form:"incident_type,omitempty" json:"incident_type,omitempty"` // IncidentRole Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'. @@ -1853,6 +2538,18 @@ type IncidentsV2ListParams struct { // CustomField 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. CustomField *map[string]map[string][]string `form:"custom_field,omitempty" json:"custom_field,omitempty"` + + // Mode 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. + Mode *map[string][]string `form:"mode,omitempty" json:"mode,omitempty"` +} + +// UsersV2ListParams defines parameters for UsersV2List. +type UsersV2ListParams struct { + // PageSize Integer number of records to return + PageSize *int64 `form:"page_size,omitempty" json:"page_size,omitempty"` + + // 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"` } // CustomFieldOptionsV1CreateJSONRequestBody defines body for CustomFieldOptionsV1Create for application/json ContentType. @@ -1868,28 +2565,37 @@ type CustomFieldsV1CreateJSONRequestBody = CreateRequestBody2 type CustomFieldsV1UpdateJSONRequestBody = UpdateRequestBody2 // IncidentAttachmentsV1CreateJSONRequestBody defines body for IncidentAttachmentsV1Create for application/json ContentType. -type IncidentAttachmentsV1CreateJSONRequestBody = CreateRequestBody3 +type IncidentAttachmentsV1CreateJSONRequestBody = CreateRequestBody4 + +// IncidentMembershipsV1CreateJSONRequestBody defines body for IncidentMembershipsV1Create for application/json ContentType. +type IncidentMembershipsV1CreateJSONRequestBody = CreateRequestBody5 + +// IncidentMembershipsV1RevokeJSONRequestBody defines body for IncidentMembershipsV1Revoke for application/json ContentType. +type IncidentMembershipsV1RevokeJSONRequestBody = CreateRequestBody5 // IncidentRolesV1CreateJSONRequestBody defines body for IncidentRolesV1Create for application/json ContentType. -type IncidentRolesV1CreateJSONRequestBody = CreateRequestBody4 +type IncidentRolesV1CreateJSONRequestBody = CreateRequestBody6 // IncidentRolesV1UpdateJSONRequestBody defines body for IncidentRolesV1Update for application/json ContentType. -type IncidentRolesV1UpdateJSONRequestBody = UpdateRequestBody3 +type IncidentRolesV1UpdateJSONRequestBody = UpdateRequestBody4 // IncidentStatusesV1CreateJSONRequestBody defines body for IncidentStatusesV1Create for application/json ContentType. -type IncidentStatusesV1CreateJSONRequestBody = CreateRequestBody5 +type IncidentStatusesV1CreateJSONRequestBody = CreateRequestBody8 // IncidentStatusesV1UpdateJSONRequestBody defines body for IncidentStatusesV1Update for application/json ContentType. -type IncidentStatusesV1UpdateJSONRequestBody = UpdateRequestBody4 +type IncidentStatusesV1UpdateJSONRequestBody = UpdateRequestBody6 // IncidentsV1CreateJSONRequestBody defines body for IncidentsV1Create for application/json ContentType. -type IncidentsV1CreateJSONRequestBody = CreateRequestBody6 +type IncidentsV1CreateJSONRequestBody = CreateRequestBody9 // SeveritiesV1CreateJSONRequestBody defines body for SeveritiesV1Create for application/json ContentType. -type SeveritiesV1CreateJSONRequestBody = CreateRequestBody8 +type SeveritiesV1CreateJSONRequestBody = CreateRequestBody11 // SeveritiesV1UpdateJSONRequestBody defines body for SeveritiesV1Update for application/json ContentType. -type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody8 +type SeveritiesV1UpdateJSONRequestBody = CreateRequestBody11 + +// AlertEventsV2CreateHTTPJSONRequestBody defines body for AlertEventsV2CreateHTTP for application/json ContentType. +type AlertEventsV2CreateHTTPJSONRequestBody = CreateHTTPRequestBody // CatalogV2CreateEntryJSONRequestBody defines body for CatalogV2CreateEntry for application/json ContentType. type CatalogV2CreateEntryJSONRequestBody = CreateEntryRequestBody @@ -1906,8 +2612,20 @@ type CatalogV2UpdateTypeJSONRequestBody = UpdateTypeRequestBody // CatalogV2UpdateTypeSchemaJSONRequestBody defines body for CatalogV2UpdateTypeSchema for application/json ContentType. type CatalogV2UpdateTypeSchemaJSONRequestBody = UpdateTypeSchemaRequestBody +// CustomFieldsV2CreateJSONRequestBody defines body for CustomFieldsV2Create for application/json ContentType. +type CustomFieldsV2CreateJSONRequestBody = CreateRequestBody3 + +// CustomFieldsV2UpdateJSONRequestBody defines body for CustomFieldsV2Update for application/json ContentType. +type CustomFieldsV2UpdateJSONRequestBody = UpdateRequestBody3 + +// IncidentRolesV2CreateJSONRequestBody defines body for IncidentRolesV2Create for application/json ContentType. +type IncidentRolesV2CreateJSONRequestBody = CreateRequestBody7 + +// IncidentRolesV2UpdateJSONRequestBody defines body for IncidentRolesV2Update for application/json ContentType. +type IncidentRolesV2UpdateJSONRequestBody = UpdateRequestBody5 + // IncidentsV2CreateJSONRequestBody defines body for IncidentsV2Create for application/json ContentType. -type IncidentsV2CreateJSONRequestBody = CreateRequestBody7 +type IncidentsV2CreateJSONRequestBody = CreateRequestBody10 // IncidentsV2EditJSONRequestBody defines body for IncidentsV2Edit for application/json ContentType. type IncidentsV2EditJSONRequestBody = EditRequestBody @@ -2043,6 +2761,16 @@ type ClientInterface interface { // IncidentAttachmentsV1Delete request IncidentAttachmentsV1Delete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + // IncidentMembershipsV1Create request with any body + IncidentMembershipsV1CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncidentMembershipsV1Create(ctx context.Context, body IncidentMembershipsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentMembershipsV1Revoke request with any body + IncidentMembershipsV1RevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncidentMembershipsV1Revoke(ctx context.Context, body IncidentMembershipsV1RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // IncidentRolesV1List request IncidentRolesV1List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2101,6 +2829,9 @@ type ClientInterface interface { // UtilitiesV1OpenAPI request UtilitiesV1OpenAPI(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UtilitiesV1OpenAPIV3 request + UtilitiesV1OpenAPIV3(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // SeveritiesV1List request SeveritiesV1List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2120,6 +2851,17 @@ type ClientInterface interface { SeveritiesV1Update(ctx context.Context, id string, body SeveritiesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ActionsV2List request + ActionsV2List(ctx context.Context, params *ActionsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ActionsV2Show request + ActionsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AlertEventsV2CreateHTTP request with any body + AlertEventsV2CreateHTTPWithBody(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AlertEventsV2CreateHTTP(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CatalogV2ListEntries request CatalogV2ListEntries(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2166,6 +2908,50 @@ type ClientInterface interface { CatalogV2UpdateTypeSchema(ctx context.Context, id string, body CatalogV2UpdateTypeSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CustomFieldsV2List request + CustomFieldsV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CustomFieldsV2Create request with any body + CustomFieldsV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CustomFieldsV2Create(ctx context.Context, body CustomFieldsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CustomFieldsV2Delete request + CustomFieldsV2Delete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CustomFieldsV2Show request + CustomFieldsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CustomFieldsV2Update request with any body + CustomFieldsV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CustomFieldsV2Update(ctx context.Context, id string, body CustomFieldsV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // FollowUpsV2List request + FollowUpsV2List(ctx context.Context, params *FollowUpsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // FollowUpsV2Show request + FollowUpsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentRolesV2List request + IncidentRolesV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentRolesV2Create request with any body + IncidentRolesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncidentRolesV2Create(ctx context.Context, body IncidentRolesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentRolesV2Delete request + IncidentRolesV2Delete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentRolesV2Show request + IncidentRolesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncidentRolesV2Update request with any body + IncidentRolesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncidentRolesV2Update(ctx context.Context, id string, body IncidentRolesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // IncidentTimestampsV2List request IncidentTimestampsV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2190,6 +2976,12 @@ type ClientInterface interface { IncidentsV2EditWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UsersV2List request + UsersV2List(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UsersV2Show request + UsersV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) ActionsV1List(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2444,6 +3236,54 @@ func (c *Client) IncidentAttachmentsV1Delete(ctx context.Context, id string, req return c.Client.Do(req) } +func (c *Client) IncidentMembershipsV1CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentMembershipsV1CreateRequestWithBody(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) IncidentMembershipsV1Create(ctx context.Context, body IncidentMembershipsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentMembershipsV1CreateRequest(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) IncidentMembershipsV1RevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentMembershipsV1RevokeRequestWithBody(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) IncidentMembershipsV1Revoke(ctx context.Context, body IncidentMembershipsV1RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentMembershipsV1RevokeRequest(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) IncidentRolesV1List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewIncidentRolesV1ListRequest(c.Server) if err != nil { @@ -2696,6 +3536,18 @@ func (c *Client) UtilitiesV1OpenAPI(ctx context.Context, reqEditors ...RequestEd return c.Client.Do(req) } +func (c *Client) UtilitiesV1OpenAPIV3(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUtilitiesV1OpenAPIV3Request(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) SeveritiesV1List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSeveritiesV1ListRequest(c.Server) if err != nil { @@ -2780,6 +3632,54 @@ func (c *Client) SeveritiesV1Update(ctx context.Context, id string, body Severit return c.Client.Do(req) } +func (c *Client) ActionsV2List(ctx context.Context, params *ActionsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActionsV2ListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) 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) CatalogV2ListEntries(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCatalogV2ListEntriesRequest(c.Server, params) if err != nil { @@ -2984,8 +3884,8 @@ func (c *Client) CatalogV2UpdateTypeSchema(ctx context.Context, id string, body return c.Client.Do(req) } -func (c *Client) IncidentTimestampsV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentTimestampsV2ListRequest(c.Server) +func (c *Client) CustomFieldsV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2ListRequest(c.Server) if err != nil { return nil, err } @@ -2996,8 +3896,8 @@ func (c *Client) IncidentTimestampsV2List(ctx context.Context, reqEditors ...Req return c.Client.Do(req) } -func (c *Client) IncidentTimestampsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentTimestampsV2ShowRequest(c.Server, id) +func (c *Client) CustomFieldsV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2CreateRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -3008,8 +3908,8 @@ func (c *Client) IncidentTimestampsV2Show(ctx context.Context, id string, reqEdi return c.Client.Do(req) } -func (c *Client) IncidentUpdatesV2List(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentUpdatesV2ListRequest(c.Server, params) +func (c *Client) CustomFieldsV2Create(ctx context.Context, body CustomFieldsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2CreateRequest(c.Server, body) if err != nil { return nil, err } @@ -3020,8 +3920,8 @@ func (c *Client) IncidentUpdatesV2List(ctx context.Context, params *IncidentUpda return c.Client.Do(req) } -func (c *Client) IncidentsV2List(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2ListRequest(c.Server, params) +func (c *Client) CustomFieldsV2Delete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2DeleteRequest(c.Server, id) if err != nil { return nil, err } @@ -3032,8 +3932,8 @@ func (c *Client) IncidentsV2List(ctx context.Context, params *IncidentsV2ListPar return c.Client.Do(req) } -func (c *Client) IncidentsV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2CreateRequestWithBody(c.Server, contentType, body) +func (c *Client) CustomFieldsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2ShowRequest(c.Server, id) if err != nil { return nil, err } @@ -3044,8 +3944,8 @@ func (c *Client) IncidentsV2CreateWithBody(ctx context.Context, contentType stri return c.Client.Do(req) } -func (c *Client) IncidentsV2Create(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2CreateRequest(c.Server, body) +func (c *Client) CustomFieldsV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2UpdateRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -3056,8 +3956,8 @@ func (c *Client) IncidentsV2Create(ctx context.Context, body IncidentsV2CreateJS return c.Client.Do(req) } -func (c *Client) IncidentsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2ShowRequest(c.Server, id) +func (c *Client) CustomFieldsV2Update(ctx context.Context, id string, body CustomFieldsV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCustomFieldsV2UpdateRequest(c.Server, id, body) if err != nil { return nil, err } @@ -3068,8 +3968,8 @@ func (c *Client) IncidentsV2Show(ctx context.Context, id string, reqEditors ...R return c.Client.Do(req) } -func (c *Client) IncidentsV2EditWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2EditRequestWithBody(c.Server, id, contentType, body) +func (c *Client) FollowUpsV2List(ctx context.Context, params *FollowUpsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFollowUpsV2ListRequest(c.Server, params) if err != nil { return nil, err } @@ -3080,8 +3980,8 @@ func (c *Client) IncidentsV2EditWithBody(ctx context.Context, id string, content return c.Client.Do(req) } -func (c *Client) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncidentsV2EditRequest(c.Server, id, body) +func (c *Client) FollowUpsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFollowUpsV2ShowRequest(c.Server, id) if err != nil { return nil, err } @@ -3092,27 +3992,243 @@ func (c *Client) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV return c.Client.Do(req) } -// NewActionsV1ListRequest generates requests for ActionsV1List -func NewActionsV1ListRequest(server string, params *ActionsV1ListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) IncidentRolesV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2ListRequest(c.Server) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/v1/actions") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) IncidentRolesV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2CreateRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } - - queryValues := queryURL.Query() - + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentRolesV2Create(ctx context.Context, body IncidentRolesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2CreateRequest(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) IncidentRolesV2Delete(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2DeleteRequest(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) IncidentRolesV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2ShowRequest(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) IncidentRolesV2UpdateWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2UpdateRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentRolesV2Update(ctx context.Context, id string, body IncidentRolesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentRolesV2UpdateRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentTimestampsV2List(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentTimestampsV2ListRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentTimestampsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentTimestampsV2ShowRequest(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) IncidentUpdatesV2List(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentUpdatesV2ListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentsV2List(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2ListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentsV2CreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2CreateRequestWithBody(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) IncidentsV2Create(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2CreateRequest(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) IncidentsV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2ShowRequest(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) IncidentsV2EditWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2EditRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncidentsV2Edit(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncidentsV2EditRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UsersV2List(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUsersV2ListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UsersV2Show(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUsersV2ShowRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewActionsV1ListRequest generates requests for ActionsV1List +func NewActionsV1ListRequest(server string, params *ActionsV1ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/actions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + if params.IncidentId != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); err != nil { @@ -3797,8 +4913,19 @@ func NewIncidentAttachmentsV1DeleteRequest(server string, id string) (*http.Requ return req, nil } -// NewIncidentRolesV1ListRequest generates requests for IncidentRolesV1List -func NewIncidentRolesV1ListRequest(server string) (*http.Request, error) { +// NewIncidentMembershipsV1CreateRequest calls the generic IncidentMembershipsV1Create builder with application/json body +func NewIncidentMembershipsV1CreateRequest(server string, body IncidentMembershipsV1CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncidentMembershipsV1CreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewIncidentMembershipsV1CreateRequestWithBody generates requests for IncidentMembershipsV1Create with any type of body +func NewIncidentMembershipsV1CreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3806,7 +4933,7 @@ func NewIncidentRolesV1ListRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/v1/incident_roles") + operationPath := fmt.Sprintf("/v1/incident_memberships") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3816,27 +4943,29 @@ func NewIncidentRolesV1ListRequest(server string) (*http.Request, error) { 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 } -// NewIncidentRolesV1CreateRequest calls the generic IncidentRolesV1Create builder with application/json body -func NewIncidentRolesV1CreateRequest(server string, body IncidentRolesV1CreateJSONRequestBody) (*http.Request, error) { +// NewIncidentMembershipsV1RevokeRequest calls the generic IncidentMembershipsV1Revoke builder with application/json body +func NewIncidentMembershipsV1RevokeRequest(server string, body IncidentMembershipsV1RevokeJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewIncidentRolesV1CreateRequestWithBody(server, "application/json", bodyReader) + return NewIncidentMembershipsV1RevokeRequestWithBody(server, "application/json", bodyReader) } -// NewIncidentRolesV1CreateRequestWithBody generates requests for IncidentRolesV1Create with any type of body -func NewIncidentRolesV1CreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewIncidentMembershipsV1RevokeRequestWithBody generates requests for IncidentMembershipsV1Revoke with any type of body +func NewIncidentMembershipsV1RevokeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3844,7 +4973,7 @@ func NewIncidentRolesV1CreateRequestWithBody(server string, contentType string, return nil, err } - operationPath := fmt.Sprintf("/v1/incident_roles") + operationPath := fmt.Sprintf("/v1/incident_memberships/actions/revoke") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3864,23 +4993,16 @@ func NewIncidentRolesV1CreateRequestWithBody(server string, contentType string, return req, nil } -// NewIncidentRolesV1DeleteRequest generates requests for IncidentRolesV1Delete -func NewIncidentRolesV1DeleteRequest(server string, id string) (*http.Request, error) { +// NewIncidentRolesV1ListRequest generates requests for IncidentRolesV1List +func NewIncidentRolesV1ListRequest(server 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("/v1/incident_roles/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/incident_roles") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3890,7 +5012,7 @@ func NewIncidentRolesV1DeleteRequest(server string, id string) (*http.Request, e return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -3898,13 +5020,87 @@ func NewIncidentRolesV1DeleteRequest(server string, id string) (*http.Request, e return req, nil } -// NewIncidentRolesV1ShowRequest generates requests for IncidentRolesV1Show -func NewIncidentRolesV1ShowRequest(server string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) +// NewIncidentRolesV1CreateRequest calls the generic IncidentRolesV1Create builder with application/json body +func NewIncidentRolesV1CreateRequest(server string, body IncidentRolesV1CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncidentRolesV1CreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewIncidentRolesV1CreateRequestWithBody generates requests for IncidentRolesV1Create with any type of body +func NewIncidentRolesV1CreateRequestWithBody(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("/v1/incident_roles") + 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 +} + +// NewIncidentRolesV1DeleteRequest generates requests for IncidentRolesV1Delete +func NewIncidentRolesV1DeleteRequest(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("/v1/incident_roles/%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 +} + +// NewIncidentRolesV1ShowRequest generates requests for IncidentRolesV1Show +func NewIncidentRolesV1ShowRequest(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 } @@ -4402,6 +5598,33 @@ func NewUtilitiesV1OpenAPIRequest(server string) (*http.Request, error) { return req, nil } +// NewUtilitiesV1OpenAPIV3Request generates requests for UtilitiesV1OpenAPIV3 +func NewUtilitiesV1OpenAPIV3Request(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/openapiV3.json") + 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 +} + // NewSeveritiesV1ListRequest generates requests for SeveritiesV1List func NewSeveritiesV1ListRequest(server string) (*http.Request, error) { var err error @@ -4584,6 +5807,170 @@ func NewSeveritiesV1UpdateRequestWithBody(server string, id string, contentType return req, nil } +// NewActionsV2ListRequest generates requests for ActionsV2List +func NewActionsV2ListRequest(server string, params *ActionsV2ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/actions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.IncidentId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); err != nil { + return nil, err + } 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.IncidentMode != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_mode", runtime.ParamLocationQuery, *params.IncidentMode); 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 +} + +// NewActionsV2ShowRequest generates requests for ActionsV2Show +func NewActionsV2ShowRequest(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/actions/%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 +} + +// NewAlertEventsV2CreateHTTPRequest calls the generic AlertEventsV2CreateHTTP builder with application/json body +func NewAlertEventsV2CreateHTTPRequest(server string, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAlertEventsV2CreateHTTPRequestWithBody(server, alertSourceConfigId, params, "application/json", bodyReader) +} + +// NewAlertEventsV2CreateHTTPRequestWithBody generates requests for AlertEventsV2CreateHTTP with any type of body +func NewAlertEventsV2CreateHTTPRequestWithBody(server string, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "alert_source_config_id", runtime.ParamLocationPath, alertSourceConfigId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/alert_events/http/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Token != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "token", runtime.ParamLocationQuery, *params.Token); 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("POST", 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 @@ -4882,7 +6269,7 @@ func NewCatalogV2CreateTypeRequest(server string, body CatalogV2CreateTypeJSONRe // NewCatalogV2CreateTypeRequestWithBody generates requests for CatalogV2CreateType with any type of body func NewCatalogV2CreateTypeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - + serverURL, err := url.Parse(server) if err != nil { return nil, err @@ -5070,8 +6457,8 @@ func NewCatalogV2UpdateTypeSchemaRequestWithBody(server string, id string, conte return req, nil } -// NewIncidentTimestampsV2ListRequest generates requests for IncidentTimestampsV2List -func NewIncidentTimestampsV2ListRequest(server string) (*http.Request, error) { +// NewCustomFieldsV2ListRequest generates requests for CustomFieldsV2List +func NewCustomFieldsV2ListRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5079,7 +6466,7 @@ func NewIncidentTimestampsV2ListRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/v2/incident_timestamps") + operationPath := fmt.Sprintf("/v2/custom_fields") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5097,23 +6484,27 @@ func NewIncidentTimestampsV2ListRequest(server string) (*http.Request, error) { return req, nil } -// NewIncidentTimestampsV2ShowRequest generates requests for IncidentTimestampsV2Show -func NewIncidentTimestampsV2ShowRequest(server string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) +// NewCustomFieldsV2CreateRequest calls the generic CustomFieldsV2Create builder with application/json body +func NewCustomFieldsV2CreateRequest(server string, body CustomFieldsV2CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCustomFieldsV2CreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewCustomFieldsV2CreateRequestWithBody generates requests for CustomFieldsV2Create with any type of body +func NewCustomFieldsV2CreateRequestWithBody(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/incident_timestamps/%s", pathParam0) + operationPath := fmt.Sprintf("/v2/custom_fields") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5123,24 +6514,33 @@ func NewIncidentTimestampsV2ShowRequest(server string, id string) (*http.Request 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 } -// NewIncidentUpdatesV2ListRequest generates requests for IncidentUpdatesV2List -func NewIncidentUpdatesV2ListRequest(server string, params *IncidentUpdatesV2ListParams) (*http.Request, error) { +// NewCustomFieldsV2DeleteRequest generates requests for CustomFieldsV2Delete +func NewCustomFieldsV2DeleteRequest(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/incident_updates") + operationPath := fmt.Sprintf("/v2/custom_fields/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5150,57 +6550,39 @@ func NewIncidentUpdatesV2ListRequest(server string, params *IncidentUpdatesV2Lis return nil, err } - queryValues := queryURL.Query() - - if params.IncidentId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); err != nil { - return nil, err - } 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) - } - } - } - + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err } - if params.PageSize != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewCustomFieldsV2ShowRequest generates requests for CustomFieldsV2Show +func NewCustomFieldsV2ShowRequest(server string, id string) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.After != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + operationPath := fmt.Sprintf("/v2/custom_fields/%s", pathParam0) + 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) if err != nil { @@ -5210,16 +6592,34 @@ func NewIncidentUpdatesV2ListRequest(server string, params *IncidentUpdatesV2Lis return req, nil } -// NewIncidentsV2ListRequest generates requests for IncidentsV2List -func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*http.Request, error) { +// NewCustomFieldsV2UpdateRequest calls the generic CustomFieldsV2Update builder with application/json body +func NewCustomFieldsV2UpdateRequest(server string, id string, body CustomFieldsV2UpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCustomFieldsV2UpdateRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewCustomFieldsV2UpdateRequestWithBody generates requests for CustomFieldsV2Update with any type of body +func NewCustomFieldsV2UpdateRequestWithBody(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/incidents") + operationPath := fmt.Sprintf("/v2/custom_fields/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5229,91 +6629,40 @@ func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*h return nil, err } - queryValues := queryURL.Query() - - if params.PageSize != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err } - if params.After != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + req.Header.Add("Content-Type", contentType) - if params.Status != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); 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) - } - } - } +// NewFollowUpsV2ListRequest generates requests for FollowUpsV2List +func NewFollowUpsV2ListRequest(server string, params *FollowUpsV2ListParams) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - if params.Severity != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); 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) - } - } - } - + operationPath := fmt.Sprintf("/v2/follow_ups") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - if params.IncidentType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_type", runtime.ParamLocationQuery, *params.IncidentType); 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, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - if params.IncidentRole != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_role", runtime.ParamLocationQuery, *params.IncidentRole); err != nil { + if params.IncidentId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5327,9 +6676,9 @@ func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*h } - if params.CustomField != nil { + if params.IncidentMode != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "custom_field", runtime.ParamLocationQuery, *params.CustomField); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_mode", runtime.ParamLocationQuery, *params.IncidentMode); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5353,27 +6702,23 @@ func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*h return req, nil } -// NewIncidentsV2CreateRequest calls the generic IncidentsV2Create builder with application/json body -func NewIncidentsV2CreateRequest(server string, body IncidentsV2CreateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewFollowUpsV2ShowRequest generates requests for FollowUpsV2Show +func NewFollowUpsV2ShowRequest(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 } - bodyReader = bytes.NewReader(buf) - return NewIncidentsV2CreateRequestWithBody(server, "application/json", bodyReader) -} - -// NewIncidentsV2CreateRequestWithBody generates requests for IncidentsV2Create with any type of body -func NewIncidentsV2CreateRequestWithBody(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/incidents") + operationPath := fmt.Sprintf("/v2/follow_ups/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5383,33 +6728,24 @@ func NewIncidentsV2CreateRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewIncidentsV2ShowRequest generates requests for IncidentsV2Show -func NewIncidentsV2ShowRequest(server string, id string) (*http.Request, error) { +// NewIncidentRolesV2ListRequest generates requests for IncidentRolesV2List +func NewIncidentRolesV2ListRequest(server 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/incidents/%s", pathParam0) + operationPath := fmt.Sprintf("/v2/incident_roles") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5427,34 +6763,27 @@ func NewIncidentsV2ShowRequest(server string, id string) (*http.Request, error) return req, nil } -// NewIncidentsV2EditRequest calls the generic IncidentsV2Edit builder with application/json body -func NewIncidentsV2EditRequest(server string, id string, body IncidentsV2EditJSONRequestBody) (*http.Request, error) { +// NewIncidentRolesV2CreateRequest calls the generic IncidentRolesV2Create builder with application/json body +func NewIncidentRolesV2CreateRequest(server string, body IncidentRolesV2CreateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewIncidentsV2EditRequestWithBody(server, id, "application/json", bodyReader) + return NewIncidentRolesV2CreateRequestWithBody(server, "application/json", bodyReader) } -// NewIncidentsV2EditRequestWithBody generates requests for IncidentsV2Edit with any type of body -func NewIncidentsV2EditRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewIncidentRolesV2CreateRequestWithBody generates requests for IncidentRolesV2Create with any type of body +func NewIncidentRolesV2CreateRequestWithBody(server 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/incidents/%s/actions/edit", pathParam0) + operationPath := fmt.Sprintf("/v2/incident_roles") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5474,264 +6803,1662 @@ func NewIncidentsV2EditRequestWithBody(server string, id string, contentType str return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewIncidentRolesV2DeleteRequest generates requests for IncidentRolesV2Delete +func NewIncidentRolesV2DeleteRequest(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 } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return nil -} -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + operationPath := fmt.Sprintf("/v2/incident_roles/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err } + + return req, nil } -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // ActionsV1List request - ActionsV1ListWithResponse(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*ActionsV1ListResponse, error) +// NewIncidentRolesV2ShowRequest generates requests for IncidentRolesV2Show +func NewIncidentRolesV2ShowRequest(server string, id string) (*http.Request, error) { + var err error - // ActionsV1Show request - ActionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV1ShowResponse, error) + var pathParam0 string - // CustomFieldOptionsV1List request - CustomFieldOptionsV1ListWithResponse(ctx context.Context, params *CustomFieldOptionsV1ListParams, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ListResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - // CustomFieldOptionsV1Create request with any body - CustomFieldOptionsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - CustomFieldOptionsV1CreateWithResponse(ctx context.Context, body CustomFieldOptionsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) + operationPath := fmt.Sprintf("/v2/incident_roles/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // CustomFieldOptionsV1Delete request - CustomFieldOptionsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1DeleteResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CustomFieldOptionsV1Show request - CustomFieldOptionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ShowResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CustomFieldOptionsV1Update request with any body - CustomFieldOptionsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) + return req, nil +} - CustomFieldOptionsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldOptionsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) +// NewIncidentRolesV2UpdateRequest calls the generic IncidentRolesV2Update builder with application/json body +func NewIncidentRolesV2UpdateRequest(server string, id string, body IncidentRolesV2UpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncidentRolesV2UpdateRequestWithBody(server, id, "application/json", bodyReader) +} - // CustomFieldsV1List request - CustomFieldsV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV1ListResponse, error) +// NewIncidentRolesV2UpdateRequestWithBody generates requests for IncidentRolesV2Update with any type of body +func NewIncidentRolesV2UpdateRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // CustomFieldsV1Create request with any body - CustomFieldsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) + var pathParam0 string - CustomFieldsV1CreateWithResponse(ctx context.Context, body CustomFieldsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - // CustomFieldsV1Delete request - CustomFieldsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1DeleteResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CustomFieldsV1Show request - CustomFieldsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1ShowResponse, error) + operationPath := fmt.Sprintf("/v2/incident_roles/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // CustomFieldsV1Update request with any body - CustomFieldsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - CustomFieldsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - // UtilitiesV1Identity request - UtilitiesV1IdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1IdentityResponse, error) + req.Header.Add("Content-Type", contentType) - // IncidentAttachmentsV1List request - IncidentAttachmentsV1ListWithResponse(ctx context.Context, params *IncidentAttachmentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1ListResponse, error) + return req, nil +} - // IncidentAttachmentsV1Create request with any body - IncidentAttachmentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) +// NewIncidentTimestampsV2ListRequest generates requests for IncidentTimestampsV2List +func NewIncidentTimestampsV2ListRequest(server string) (*http.Request, error) { + var err error - IncidentAttachmentsV1CreateWithResponse(ctx context.Context, body IncidentAttachmentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // IncidentAttachmentsV1Delete request - IncidentAttachmentsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1DeleteResponse, error) + operationPath := fmt.Sprintf("/v2/incident_timestamps") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // IncidentRolesV1List request - IncidentRolesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV1ListResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // IncidentRolesV1Create request with any body - IncidentRolesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - IncidentRolesV1CreateWithResponse(ctx context.Context, body IncidentRolesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) + return req, nil +} - // IncidentRolesV1Delete request - IncidentRolesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1DeleteResponse, error) +// NewIncidentTimestampsV2ShowRequest generates requests for IncidentTimestampsV2Show +func NewIncidentTimestampsV2ShowRequest(server string, id string) (*http.Request, error) { + var err error - // IncidentRolesV1Show request - IncidentRolesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1ShowResponse, error) + var pathParam0 string - // IncidentRolesV1Update request with any body - IncidentRolesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - IncidentRolesV1UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // IncidentStatusesV1List request - IncidentStatusesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ListResponse, error) + operationPath := fmt.Sprintf("/v2/incident_timestamps/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // IncidentStatusesV1Create request with any body - IncidentStatusesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - IncidentStatusesV1CreateWithResponse(ctx context.Context, body IncidentStatusesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // IncidentStatusesV1Delete request - IncidentStatusesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1DeleteResponse, error) + return req, nil +} - // IncidentStatusesV1Show request - IncidentStatusesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ShowResponse, error) +// NewIncidentUpdatesV2ListRequest generates requests for IncidentUpdatesV2List +func NewIncidentUpdatesV2ListRequest(server string, params *IncidentUpdatesV2ListParams) (*http.Request, error) { + var err error - // IncidentStatusesV1Update request with any body - IncidentStatusesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - IncidentStatusesV1UpdateWithResponse(ctx context.Context, id string, body IncidentStatusesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) + operationPath := fmt.Sprintf("/v2/incident_updates") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // IncidentTypesV1List request - IncidentTypesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTypesV1ListResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // IncidentTypesV1Show request - IncidentTypesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTypesV1ShowResponse, error) + queryValues := queryURL.Query() - // IncidentsV1List request - IncidentsV1ListWithResponse(ctx context.Context, params *IncidentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentsV1ListResponse, error) + if params.IncidentId != nil { - // IncidentsV1Create request with any body - IncidentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_id", runtime.ParamLocationQuery, *params.IncidentId); 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) + } + } + } - IncidentsV1CreateWithResponse(ctx context.Context, body IncidentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) + } - // IncidentsV1Show request - IncidentsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV1ShowResponse, error) + if params.PageSize != nil { - // UtilitiesV1OpenAPI request - UtilitiesV1OpenAPIWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.After != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewIncidentsV2ListRequest generates requests for IncidentsV2List +func NewIncidentsV2ListRequest(server string, params *IncidentsV2ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/incidents") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.After != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); 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.StatusCategory != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status_category", runtime.ParamLocationQuery, *params.StatusCategory); 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 { + 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.IncidentType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_type", runtime.ParamLocationQuery, *params.IncidentType); 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.IncidentRole != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "incident_role", runtime.ParamLocationQuery, *params.IncidentRole); 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.CustomField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "custom_field", runtime.ParamLocationQuery, *params.CustomField); 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.Mode != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "mode", runtime.ParamLocationQuery, *params.Mode); 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 +} + +// NewIncidentsV2CreateRequest calls the generic IncidentsV2Create builder with application/json body +func NewIncidentsV2CreateRequest(server string, body IncidentsV2CreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncidentsV2CreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewIncidentsV2CreateRequestWithBody generates requests for IncidentsV2Create with any type of body +func NewIncidentsV2CreateRequestWithBody(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/incidents") + 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 +} + +// NewIncidentsV2ShowRequest generates requests for IncidentsV2Show +func NewIncidentsV2ShowRequest(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/incidents/%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 +} + +// NewIncidentsV2EditRequest calls the generic IncidentsV2Edit builder with application/json body +func NewIncidentsV2EditRequest(server string, id string, body IncidentsV2EditJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncidentsV2EditRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewIncidentsV2EditRequestWithBody generates requests for IncidentsV2Edit with any type of body +func NewIncidentsV2EditRequestWithBody(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/incidents/%s/actions/edit", pathParam0) + 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 +} + +// NewUsersV2ListRequest generates requests for UsersV2List +func NewUsersV2ListRequest(server string, params *UsersV2ListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.After != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "after", runtime.ParamLocationQuery, *params.After); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUsersV2ShowRequest generates requests for UsersV2Show +func NewUsersV2ShowRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // ActionsV1List request + ActionsV1ListWithResponse(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*ActionsV1ListResponse, error) + + // ActionsV1Show request + ActionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV1ShowResponse, error) + + // CustomFieldOptionsV1List request + CustomFieldOptionsV1ListWithResponse(ctx context.Context, params *CustomFieldOptionsV1ListParams, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ListResponse, error) + + // CustomFieldOptionsV1Create request with any body + CustomFieldOptionsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) + + CustomFieldOptionsV1CreateWithResponse(ctx context.Context, body CustomFieldOptionsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) + + // CustomFieldOptionsV1Delete request + CustomFieldOptionsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1DeleteResponse, error) + + // CustomFieldOptionsV1Show request + CustomFieldOptionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ShowResponse, error) + + // CustomFieldOptionsV1Update request with any body + CustomFieldOptionsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) + + CustomFieldOptionsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldOptionsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) + + // CustomFieldsV1List request + CustomFieldsV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV1ListResponse, error) + + // CustomFieldsV1Create request with any body + CustomFieldsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) + + CustomFieldsV1CreateWithResponse(ctx context.Context, body CustomFieldsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) + + // CustomFieldsV1Delete request + CustomFieldsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1DeleteResponse, error) + + // CustomFieldsV1Show request + CustomFieldsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1ShowResponse, error) + + // CustomFieldsV1Update request with any body + CustomFieldsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) + + CustomFieldsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) + + // UtilitiesV1Identity request + UtilitiesV1IdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1IdentityResponse, error) + + // IncidentAttachmentsV1List request + IncidentAttachmentsV1ListWithResponse(ctx context.Context, params *IncidentAttachmentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1ListResponse, error) + + // IncidentAttachmentsV1Create request with any body + IncidentAttachmentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) + + IncidentAttachmentsV1CreateWithResponse(ctx context.Context, body IncidentAttachmentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) + + // IncidentAttachmentsV1Delete request + IncidentAttachmentsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1DeleteResponse, error) + + // IncidentMembershipsV1Create request with any body + IncidentMembershipsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1CreateResponse, error) + + IncidentMembershipsV1CreateWithResponse(ctx context.Context, body IncidentMembershipsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1CreateResponse, error) + + // IncidentMembershipsV1Revoke request with any body + IncidentMembershipsV1RevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1RevokeResponse, error) + + IncidentMembershipsV1RevokeWithResponse(ctx context.Context, body IncidentMembershipsV1RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1RevokeResponse, error) + + // IncidentRolesV1List request + IncidentRolesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV1ListResponse, error) + + // IncidentRolesV1Create request with any body + IncidentRolesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) + + IncidentRolesV1CreateWithResponse(ctx context.Context, body IncidentRolesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) + + // IncidentRolesV1Delete request + IncidentRolesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1DeleteResponse, error) + + // IncidentRolesV1Show request + IncidentRolesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1ShowResponse, error) + + // IncidentRolesV1Update request with any body + IncidentRolesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) + + IncidentRolesV1UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) + + // IncidentStatusesV1List request + IncidentStatusesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ListResponse, error) + + // IncidentStatusesV1Create request with any body + IncidentStatusesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) + + IncidentStatusesV1CreateWithResponse(ctx context.Context, body IncidentStatusesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) + + // IncidentStatusesV1Delete request + IncidentStatusesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1DeleteResponse, error) + + // IncidentStatusesV1Show request + IncidentStatusesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ShowResponse, error) + + // IncidentStatusesV1Update request with any body + IncidentStatusesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) + + IncidentStatusesV1UpdateWithResponse(ctx context.Context, id string, body IncidentStatusesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) + + // IncidentTypesV1List request + IncidentTypesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTypesV1ListResponse, error) + + // IncidentTypesV1Show request + IncidentTypesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTypesV1ShowResponse, error) + + // IncidentsV1List request + IncidentsV1ListWithResponse(ctx context.Context, params *IncidentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentsV1ListResponse, error) + + // IncidentsV1Create request with any body + IncidentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) + + IncidentsV1CreateWithResponse(ctx context.Context, body IncidentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) + + // IncidentsV1Show request + IncidentsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV1ShowResponse, error) + + // UtilitiesV1OpenAPI request + UtilitiesV1OpenAPIWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIResponse, error) + + // UtilitiesV1OpenAPIV3 request + UtilitiesV1OpenAPIV3WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIV3Response, error) // SeveritiesV1List request SeveritiesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SeveritiesV1ListResponse, error) - // SeveritiesV1Create request with any body - SeveritiesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) + // SeveritiesV1Create request with any body + SeveritiesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) + + SeveritiesV1CreateWithResponse(ctx context.Context, body SeveritiesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) + + // SeveritiesV1Delete request + SeveritiesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1DeleteResponse, error) + + // SeveritiesV1Show request + SeveritiesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1ShowResponse, error) + + // SeveritiesV1Update request with any body + SeveritiesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) + + SeveritiesV1UpdateWithResponse(ctx context.Context, id string, body SeveritiesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) + + // ActionsV2List request + ActionsV2ListWithResponse(ctx context.Context, params *ActionsV2ListParams, reqEditors ...RequestEditorFn) (*ActionsV2ListResponse, error) + + // ActionsV2Show request + ActionsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV2ShowResponse, error) + + // AlertEventsV2CreateHTTP request with any body + AlertEventsV2CreateHTTPWithBodyWithResponse(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertEventsV2CreateHTTPResponse, error) + + AlertEventsV2CreateHTTPWithResponse(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertEventsV2CreateHTTPResponse, error) + + // CatalogV2ListEntries request + CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) + + // CatalogV2CreateEntry request with any body + CatalogV2CreateEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) + + CatalogV2CreateEntryWithResponse(ctx context.Context, body CatalogV2CreateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) + + // CatalogV2DestroyEntry request + CatalogV2DestroyEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyEntryResponse, error) + + // CatalogV2ShowEntry request + CatalogV2ShowEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowEntryResponse, error) + + // CatalogV2UpdateEntry request with any body + CatalogV2UpdateEntryWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) + + CatalogV2UpdateEntryWithResponse(ctx context.Context, id string, body CatalogV2UpdateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) + + // CatalogV2ListResources request + CatalogV2ListResourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListResourcesResponse, error) + + // CatalogV2ListTypes request + CatalogV2ListTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListTypesResponse, error) + + // CatalogV2CreateType request with any body + CatalogV2CreateTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) + + CatalogV2CreateTypeWithResponse(ctx context.Context, body CatalogV2CreateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) + + // CatalogV2DestroyType request + CatalogV2DestroyTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyTypeResponse, error) + + // CatalogV2ShowType request + CatalogV2ShowTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowTypeResponse, error) + + // CatalogV2UpdateType request with any body + CatalogV2UpdateTypeWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) + + CatalogV2UpdateTypeWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) + + // CatalogV2UpdateTypeSchema request with any body + CatalogV2UpdateTypeSchemaWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) + + CatalogV2UpdateTypeSchemaWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) + + // CustomFieldsV2List request + CustomFieldsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV2ListResponse, error) + + // CustomFieldsV2Create request with any body + CustomFieldsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV2CreateResponse, error) + + CustomFieldsV2CreateWithResponse(ctx context.Context, body CustomFieldsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV2CreateResponse, error) + + // CustomFieldsV2Delete request + CustomFieldsV2DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV2DeleteResponse, error) + + // CustomFieldsV2Show request + CustomFieldsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV2ShowResponse, error) + + // CustomFieldsV2Update request with any body + CustomFieldsV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV2UpdateResponse, error) + + CustomFieldsV2UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV2UpdateResponse, error) + + // FollowUpsV2List request + FollowUpsV2ListWithResponse(ctx context.Context, params *FollowUpsV2ListParams, reqEditors ...RequestEditorFn) (*FollowUpsV2ListResponse, error) + + // FollowUpsV2Show request + FollowUpsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*FollowUpsV2ShowResponse, error) + + // IncidentRolesV2List request + IncidentRolesV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV2ListResponse, error) + + // IncidentRolesV2Create request with any body + IncidentRolesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV2CreateResponse, error) + + IncidentRolesV2CreateWithResponse(ctx context.Context, body IncidentRolesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV2CreateResponse, error) + + // IncidentRolesV2Delete request + IncidentRolesV2DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV2DeleteResponse, error) + + // IncidentRolesV2Show request + IncidentRolesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV2ShowResponse, error) + + // IncidentRolesV2Update request with any body + IncidentRolesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV2UpdateResponse, error) + + IncidentRolesV2UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV2UpdateResponse, error) + + // IncidentTimestampsV2List request + IncidentTimestampsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ListResponse, error) + + // IncidentTimestampsV2Show request + IncidentTimestampsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ShowResponse, error) + + // IncidentUpdatesV2List request + IncidentUpdatesV2ListWithResponse(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*IncidentUpdatesV2ListResponse, error) + + // IncidentsV2List request + IncidentsV2ListWithResponse(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*IncidentsV2ListResponse, error) + + // IncidentsV2Create request with any body + IncidentsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) + + IncidentsV2CreateWithResponse(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) + + // IncidentsV2Show request + IncidentsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV2ShowResponse, error) + + // IncidentsV2Edit request with any body + IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + + IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) + + // UsersV2List request + UsersV2ListWithResponse(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*UsersV2ListResponse, error) + + // UsersV2Show request + UsersV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UsersV2ShowResponse, error) +} + +type ActionsV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody +} + +// Status returns HTTPResponse.Status +func (r ActionsV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ActionsV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ActionsV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody +} + +// Status returns HTTPResponse.Status +func (r ActionsV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ActionsV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldOptionsV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody3 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldOptionsV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldOptionsV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldOptionsV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ShowResponseBody3 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldOptionsV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldOptionsV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldOptionsV1DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r CustomFieldOptionsV1DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldOptionsV1DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldOptionsV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody3 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldOptionsV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldOptionsV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldOptionsV1UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody3 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldOptionsV1UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldOptionsV1UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody4 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ShowResponseBody4 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV1DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV1DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV1DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody4 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CustomFieldsV1UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody4 +} + +// Status returns HTTPResponse.Status +func (r CustomFieldsV1UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CustomFieldsV1UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UtilitiesV1IdentityResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IdentityResponseBody +} + +// Status returns HTTPResponse.Status +func (r UtilitiesV1IdentityResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UtilitiesV1IdentityResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentAttachmentsV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody7 +} + +// Status returns HTTPResponse.Status +func (r IncidentAttachmentsV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentAttachmentsV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentAttachmentsV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateResponseBody +} + +// Status returns HTTPResponse.Status +func (r IncidentAttachmentsV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentAttachmentsV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentAttachmentsV1DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r IncidentAttachmentsV1DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentAttachmentsV1DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentMembershipsV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateResponseBody2 +} + +// Status returns HTTPResponse.Status +func (r IncidentMembershipsV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentMembershipsV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentMembershipsV1RevokeResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r IncidentMembershipsV1RevokeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentMembershipsV1RevokeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentRolesV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody8 +} + +// Status returns HTTPResponse.Status +func (r IncidentRolesV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentRolesV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentRolesV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ShowResponseBody7 +} + +// Status returns HTTPResponse.Status +func (r IncidentRolesV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentRolesV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - SeveritiesV1CreateWithResponse(ctx context.Context, body SeveritiesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) +type IncidentRolesV1DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} - // SeveritiesV1Delete request - SeveritiesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1DeleteResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentRolesV1DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // SeveritiesV1Show request - SeveritiesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1ShowResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentRolesV1DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // SeveritiesV1Update request with any body - SeveritiesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) +type IncidentRolesV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody7 +} - SeveritiesV1UpdateWithResponse(ctx context.Context, id string, body SeveritiesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentRolesV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CatalogV2ListEntries request - CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentRolesV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // CatalogV2CreateEntry request with any body - CatalogV2CreateEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) +type IncidentRolesV1UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody7 +} - CatalogV2CreateEntryWithResponse(ctx context.Context, body CatalogV2CreateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentRolesV1UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CatalogV2DestroyEntry request - CatalogV2DestroyEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyEntryResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentRolesV1UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // CatalogV2ShowEntry request - CatalogV2ShowEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowEntryResponse, error) +type IncidentStatusesV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody10 +} - // CatalogV2UpdateEntry request with any body - CatalogV2UpdateEntryWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentStatusesV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - CatalogV2UpdateEntryWithResponse(ctx context.Context, id string, body CatalogV2UpdateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentStatusesV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // CatalogV2ListResources request - CatalogV2ListResourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListResourcesResponse, error) +type IncidentStatusesV1CreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ShowResponseBody9 +} - // CatalogV2ListTypes request - CatalogV2ListTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListTypesResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentStatusesV1CreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CatalogV2CreateType request with any body - CatalogV2CreateTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentStatusesV1CreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - CatalogV2CreateTypeWithResponse(ctx context.Context, body CatalogV2CreateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) +type IncidentStatusesV1DeleteResponse struct { + Body []byte + HTTPResponse *http.Response +} - // CatalogV2DestroyType request - CatalogV2DestroyTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyTypeResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentStatusesV1DeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CatalogV2ShowType request - CatalogV2ShowTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowTypeResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentStatusesV1DeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // CatalogV2UpdateType request with any body - CatalogV2UpdateTypeWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) +type IncidentStatusesV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody9 +} - CatalogV2UpdateTypeWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentStatusesV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CatalogV2UpdateTypeSchema request with any body - CatalogV2UpdateTypeSchemaWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentStatusesV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - CatalogV2UpdateTypeSchemaWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) +type IncidentStatusesV1UpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody9 +} - // IncidentTimestampsV2List request - IncidentTimestampsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ListResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentStatusesV1UpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // IncidentTimestampsV2Show request - IncidentTimestampsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ShowResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentStatusesV1UpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // IncidentUpdatesV2List request - IncidentUpdatesV2ListWithResponse(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*IncidentUpdatesV2ListResponse, error) +type IncidentTypesV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody12 +} - // IncidentsV2List request - IncidentsV2ListWithResponse(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*IncidentsV2ListResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentTypesV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // IncidentsV2Create request with any body - IncidentsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentTypesV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - IncidentsV2CreateWithResponse(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) +type IncidentTypesV1ShowResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ShowResponseBody11 +} - // IncidentsV2Show request - IncidentsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV2ShowResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentTypesV1ShowResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentTypesV1ShowResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncidentsV1ListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListResponseBody14 +} - // IncidentsV2Edit request with any body - IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) +// Status returns HTTPResponse.Status +func (r IncidentsV1ListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r IncidentsV1ListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type ActionsV1ListResponse struct { +type IncidentsV1CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody + JSON200 *ShowResponseBody12 } // Status returns HTTPResponse.Status -func (r ActionsV1ListResponse) Status() string { +func (r IncidentsV1CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5739,21 +8466,21 @@ func (r ActionsV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ActionsV1ListResponse) StatusCode() int { +func (r IncidentsV1CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ActionsV1ShowResponse struct { +type IncidentsV1ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody + JSON200 *ShowResponseBody12 } // Status returns HTTPResponse.Status -func (r ActionsV1ShowResponse) Status() string { +func (r IncidentsV1ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5761,21 +8488,21 @@ func (r ActionsV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ActionsV1ShowResponse) StatusCode() int { +func (r IncidentsV1ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldOptionsV1ListResponse struct { +type UtilitiesV1OpenAPIResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody2 + JSON200 *openapi_types.File } // Status returns HTTPResponse.Status -func (r CustomFieldOptionsV1ListResponse) Status() string { +func (r UtilitiesV1OpenAPIResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5783,21 +8510,21 @@ func (r CustomFieldOptionsV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldOptionsV1ListResponse) StatusCode() int { +func (r UtilitiesV1OpenAPIResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldOptionsV1CreateResponse struct { +type UtilitiesV1OpenAPIV3Response struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody2 + JSON200 *openapi_types.File } // Status returns HTTPResponse.Status -func (r CustomFieldOptionsV1CreateResponse) Status() string { +func (r UtilitiesV1OpenAPIV3Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5805,20 +8532,21 @@ func (r CustomFieldOptionsV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldOptionsV1CreateResponse) StatusCode() int { +func (r UtilitiesV1OpenAPIV3Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldOptionsV1DeleteResponse struct { +type SeveritiesV1ListResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListResponseBody16 } // Status returns HTTPResponse.Status -func (r CustomFieldOptionsV1DeleteResponse) Status() string { +func (r SeveritiesV1ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5826,21 +8554,21 @@ func (r CustomFieldOptionsV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldOptionsV1DeleteResponse) StatusCode() int { +func (r SeveritiesV1ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldOptionsV1ShowResponse struct { +type SeveritiesV1CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody2 + JSON201 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r CustomFieldOptionsV1ShowResponse) Status() string { +func (r SeveritiesV1CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5848,21 +8576,20 @@ func (r CustomFieldOptionsV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldOptionsV1ShowResponse) StatusCode() int { +func (r SeveritiesV1CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldOptionsV1UpdateResponse struct { +type SeveritiesV1DeleteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody2 } // Status returns HTTPResponse.Status -func (r CustomFieldOptionsV1UpdateResponse) Status() string { +func (r SeveritiesV1DeleteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5870,21 +8597,21 @@ func (r CustomFieldOptionsV1UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldOptionsV1UpdateResponse) StatusCode() int { +func (r SeveritiesV1DeleteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV1ListResponse struct { +type SeveritiesV1ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody3 + JSON200 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r CustomFieldsV1ListResponse) Status() string { +func (r SeveritiesV1ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5892,21 +8619,21 @@ func (r CustomFieldsV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV1ListResponse) StatusCode() int { +func (r SeveritiesV1ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV1CreateResponse struct { +type SeveritiesV1UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody3 + JSON200 *ShowResponseBody14 } // Status returns HTTPResponse.Status -func (r CustomFieldsV1CreateResponse) Status() string { +func (r SeveritiesV1UpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5914,20 +8641,21 @@ func (r CustomFieldsV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV1CreateResponse) StatusCode() int { +func (r SeveritiesV1UpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV1DeleteResponse struct { +type ActionsV2ListResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListResponseBody2 } // Status returns HTTPResponse.Status -func (r CustomFieldsV1DeleteResponse) Status() string { +func (r ActionsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5935,21 +8663,21 @@ func (r CustomFieldsV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV1DeleteResponse) StatusCode() int { +func (r ActionsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV1ShowResponse struct { +type ActionsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody3 + JSON200 *ShowResponseBody2 } // Status returns HTTPResponse.Status -func (r CustomFieldsV1ShowResponse) Status() string { +func (r ActionsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5957,21 +8685,21 @@ func (r CustomFieldsV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV1ShowResponse) StatusCode() int { +func (r ActionsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CustomFieldsV1UpdateResponse struct { +type AlertEventsV2CreateHTTPResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody3 + JSON202 *CreateHTTPResponseBody } // Status returns HTTPResponse.Status -func (r CustomFieldsV1UpdateResponse) Status() string { +func (r AlertEventsV2CreateHTTPResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5979,21 +8707,21 @@ func (r CustomFieldsV1UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CustomFieldsV1UpdateResponse) StatusCode() int { +func (r AlertEventsV2CreateHTTPResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UtilitiesV1IdentityResponse struct { +type CatalogV2ListEntriesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdentityResponseBody + JSON200 *ListEntriesResponseBody } // Status returns HTTPResponse.Status -func (r UtilitiesV1IdentityResponse) Status() string { +func (r CatalogV2ListEntriesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6001,21 +8729,21 @@ func (r UtilitiesV1IdentityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UtilitiesV1IdentityResponse) StatusCode() int { +func (r CatalogV2ListEntriesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentAttachmentsV1ListResponse struct { +type CatalogV2CreateEntryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody4 + JSON201 *CreateEntryResponseBody } // Status returns HTTPResponse.Status -func (r IncidentAttachmentsV1ListResponse) Status() string { +func (r CatalogV2CreateEntryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6023,21 +8751,20 @@ func (r IncidentAttachmentsV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentAttachmentsV1ListResponse) StatusCode() int { +func (r CatalogV2CreateEntryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentAttachmentsV1CreateResponse struct { +type CatalogV2DestroyEntryResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateResponseBody } // Status returns HTTPResponse.Status -func (r IncidentAttachmentsV1CreateResponse) Status() string { +func (r CatalogV2DestroyEntryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6045,20 +8772,21 @@ func (r IncidentAttachmentsV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentAttachmentsV1CreateResponse) StatusCode() int { +func (r CatalogV2DestroyEntryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentAttachmentsV1DeleteResponse struct { +type CatalogV2ShowEntryResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ShowEntryResponseBody } // Status returns HTTPResponse.Status -func (r IncidentAttachmentsV1DeleteResponse) Status() string { +func (r CatalogV2ShowEntryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6066,21 +8794,21 @@ func (r IncidentAttachmentsV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentAttachmentsV1DeleteResponse) StatusCode() int { +func (r CatalogV2ShowEntryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV1ListResponse struct { +type CatalogV2UpdateEntryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody5 + JSON200 *ShowEntryResponseBody } // Status returns HTTPResponse.Status -func (r IncidentRolesV1ListResponse) Status() string { +func (r CatalogV2UpdateEntryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6088,21 +8816,21 @@ func (r IncidentRolesV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV1ListResponse) StatusCode() int { +func (r CatalogV2UpdateEntryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV1CreateResponse struct { +type CatalogV2ListResourcesResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody4 + JSON200 *ListResourcesResponseBody } // Status returns HTTPResponse.Status -func (r IncidentRolesV1CreateResponse) Status() string { +func (r CatalogV2ListResourcesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6110,20 +8838,21 @@ func (r IncidentRolesV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV1CreateResponse) StatusCode() int { +func (r CatalogV2ListResourcesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV1DeleteResponse struct { +type CatalogV2ListTypesResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListTypesResponseBody } // Status returns HTTPResponse.Status -func (r IncidentRolesV1DeleteResponse) Status() string { +func (r CatalogV2ListTypesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6131,21 +8860,21 @@ func (r IncidentRolesV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV1DeleteResponse) StatusCode() int { +func (r CatalogV2ListTypesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV1ShowResponse struct { +type CatalogV2CreateTypeResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody4 + JSON201 *CreateTypeResponseBody } // Status returns HTTPResponse.Status -func (r IncidentRolesV1ShowResponse) Status() string { +func (r CatalogV2CreateTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6153,21 +8882,20 @@ func (r IncidentRolesV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV1ShowResponse) StatusCode() int { +func (r CatalogV2CreateTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentRolesV1UpdateResponse struct { +type CatalogV2DestroyTypeResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody4 } // Status returns HTTPResponse.Status -func (r IncidentRolesV1UpdateResponse) Status() string { +func (r CatalogV2DestroyTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6175,21 +8903,21 @@ func (r IncidentRolesV1UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentRolesV1UpdateResponse) StatusCode() int { +func (r CatalogV2DestroyTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentStatusesV1ListResponse struct { +type CatalogV2ShowTypeResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody6 + JSON200 *CreateTypeResponseBody } // Status returns HTTPResponse.Status -func (r IncidentStatusesV1ListResponse) Status() string { +func (r CatalogV2ShowTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6197,21 +8925,21 @@ func (r IncidentStatusesV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentStatusesV1ListResponse) StatusCode() int { +func (r CatalogV2ShowTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentStatusesV1CreateResponse struct { +type CatalogV2UpdateTypeResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody5 + JSON200 *CreateTypeResponseBody } // Status returns HTTPResponse.Status -func (r IncidentStatusesV1CreateResponse) Status() string { +func (r CatalogV2UpdateTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6219,20 +8947,21 @@ func (r IncidentStatusesV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentStatusesV1CreateResponse) StatusCode() int { +func (r CatalogV2UpdateTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentStatusesV1DeleteResponse struct { +type CatalogV2UpdateTypeSchemaResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *CreateTypeResponseBody } // Status returns HTTPResponse.Status -func (r IncidentStatusesV1DeleteResponse) Status() string { +func (r CatalogV2UpdateTypeSchemaResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6240,21 +8969,21 @@ func (r IncidentStatusesV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentStatusesV1DeleteResponse) StatusCode() int { +func (r CatalogV2UpdateTypeSchemaResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentStatusesV1ShowResponse struct { +type CustomFieldsV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody5 + JSON200 *ListResponseBody5 } // Status returns HTTPResponse.Status -func (r IncidentStatusesV1ShowResponse) Status() string { +func (r CustomFieldsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6262,21 +8991,21 @@ func (r IncidentStatusesV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentStatusesV1ShowResponse) StatusCode() int { +func (r CustomFieldsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentStatusesV1UpdateResponse struct { +type CustomFieldsV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody5 + JSON201 *ShowResponseBody5 } // Status returns HTTPResponse.Status -func (r IncidentStatusesV1UpdateResponse) Status() string { +func (r CustomFieldsV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6284,21 +9013,20 @@ func (r IncidentStatusesV1UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentStatusesV1UpdateResponse) StatusCode() int { +func (r CustomFieldsV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentTypesV1ListResponse struct { +type CustomFieldsV2DeleteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody8 } // Status returns HTTPResponse.Status -func (r IncidentTypesV1ListResponse) Status() string { +func (r CustomFieldsV2DeleteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6306,21 +9034,21 @@ func (r IncidentTypesV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentTypesV1ListResponse) StatusCode() int { +func (r CustomFieldsV2DeleteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentTypesV1ShowResponse struct { +type CustomFieldsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody7 + JSON200 *ShowResponseBody5 } // Status returns HTTPResponse.Status -func (r IncidentTypesV1ShowResponse) Status() string { +func (r CustomFieldsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6328,21 +9056,21 @@ func (r IncidentTypesV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentTypesV1ShowResponse) StatusCode() int { +func (r CustomFieldsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV1ListResponse struct { +type CustomFieldsV2UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody10 + JSON200 *ShowResponseBody5 } // Status returns HTTPResponse.Status -func (r IncidentsV1ListResponse) Status() string { +func (r CustomFieldsV2UpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6350,21 +9078,21 @@ func (r IncidentsV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV1ListResponse) StatusCode() int { +func (r CustomFieldsV2UpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV1CreateResponse struct { +type FollowUpsV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody8 + JSON200 *ListResponseBody6 } // Status returns HTTPResponse.Status -func (r IncidentsV1CreateResponse) Status() string { +func (r FollowUpsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6372,21 +9100,21 @@ func (r IncidentsV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV1CreateResponse) StatusCode() int { +func (r FollowUpsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncidentsV1ShowResponse struct { +type FollowUpsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody8 + JSON200 *ShowResponseBody6 } // Status returns HTTPResponse.Status -func (r IncidentsV1ShowResponse) Status() string { +func (r FollowUpsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6394,21 +9122,21 @@ func (r IncidentsV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV1ShowResponse) StatusCode() int { +func (r FollowUpsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UtilitiesV1OpenAPIResponse struct { +type IncidentRolesV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *openapi_types.File + JSON200 *ListResponseBody9 } // Status returns HTTPResponse.Status -func (r UtilitiesV1OpenAPIResponse) Status() string { +func (r IncidentRolesV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6416,21 +9144,21 @@ func (r UtilitiesV1OpenAPIResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UtilitiesV1OpenAPIResponse) StatusCode() int { +func (r IncidentRolesV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SeveritiesV1ListResponse struct { +type IncidentRolesV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResponseBody12 + JSON201 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r SeveritiesV1ListResponse) Status() string { +func (r IncidentRolesV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6438,21 +9166,20 @@ func (r SeveritiesV1ListResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SeveritiesV1ListResponse) StatusCode() int { +func (r IncidentRolesV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SeveritiesV1CreateResponse struct { +type IncidentRolesV2DeleteResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ShowResponseBody10 } // Status returns HTTPResponse.Status -func (r SeveritiesV1CreateResponse) Status() string { +func (r IncidentRolesV2DeleteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6460,20 +9187,21 @@ func (r SeveritiesV1CreateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SeveritiesV1CreateResponse) StatusCode() int { +func (r IncidentRolesV2DeleteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SeveritiesV1DeleteResponse struct { +type IncidentRolesV2ShowResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r SeveritiesV1DeleteResponse) Status() string { +func (r IncidentRolesV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6481,21 +9209,21 @@ func (r SeveritiesV1DeleteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SeveritiesV1DeleteResponse) StatusCode() int { +func (r IncidentRolesV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SeveritiesV1ShowResponse struct { +type IncidentRolesV2UpdateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody10 + JSON200 *ShowResponseBody8 } // Status returns HTTPResponse.Status -func (r SeveritiesV1ShowResponse) Status() string { +func (r IncidentRolesV2UpdateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6503,21 +9231,21 @@ func (r SeveritiesV1ShowResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SeveritiesV1ShowResponse) StatusCode() int { +func (r IncidentRolesV2UpdateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SeveritiesV1UpdateResponse struct { +type IncidentTimestampsV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowResponseBody10 + JSON200 *ListResponseBody11 } // Status returns HTTPResponse.Status -func (r SeveritiesV1UpdateResponse) Status() string { +func (r IncidentTimestampsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6525,21 +9253,21 @@ func (r SeveritiesV1UpdateResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SeveritiesV1UpdateResponse) StatusCode() int { +func (r IncidentTimestampsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2ListEntriesResponse struct { +type IncidentTimestampsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListEntriesResponseBody + JSON200 *ShowResponseBody10 } // Status returns HTTPResponse.Status -func (r CatalogV2ListEntriesResponse) Status() string { +func (r IncidentTimestampsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6547,21 +9275,21 @@ func (r CatalogV2ListEntriesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ListEntriesResponse) StatusCode() int { +func (r IncidentTimestampsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2CreateEntryResponse struct { +type IncidentUpdatesV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateEntryResponseBody + JSON200 *ListResponseBody13 } // Status returns HTTPResponse.Status -func (r CatalogV2CreateEntryResponse) Status() string { +func (r IncidentUpdatesV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6569,20 +9297,21 @@ func (r CatalogV2CreateEntryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2CreateEntryResponse) StatusCode() int { +func (r IncidentUpdatesV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2DestroyEntryResponse struct { +type IncidentsV2ListResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListResponseBody15 } // Status returns HTTPResponse.Status -func (r CatalogV2DestroyEntryResponse) Status() string { +func (r IncidentsV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6590,21 +9319,21 @@ func (r CatalogV2DestroyEntryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2DestroyEntryResponse) StatusCode() int { +func (r IncidentsV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2ShowEntryResponse struct { +type IncidentsV2CreateResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowEntryResponseBody + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r CatalogV2ShowEntryResponse) Status() string { +func (r IncidentsV2CreateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6612,21 +9341,21 @@ func (r CatalogV2ShowEntryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ShowEntryResponse) StatusCode() int { +func (r IncidentsV2CreateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2UpdateEntryResponse struct { +type IncidentsV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ShowEntryResponseBody + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r CatalogV2UpdateEntryResponse) Status() string { +func (r IncidentsV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6634,21 +9363,21 @@ func (r CatalogV2UpdateEntryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2UpdateEntryResponse) StatusCode() int { +func (r IncidentsV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2ListResourcesResponse struct { +type IncidentsV2EditResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListResourcesResponseBody + JSON200 *ShowResponseBody13 } // Status returns HTTPResponse.Status -func (r CatalogV2ListResourcesResponse) Status() string { +func (r IncidentsV2EditResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6656,21 +9385,21 @@ func (r CatalogV2ListResourcesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ListResourcesResponse) StatusCode() int { +func (r IncidentsV2EditResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2ListTypesResponse struct { +type UsersV2ListResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListTypesResponseBody + JSON200 *ListResponseBody17 } // Status returns HTTPResponse.Status -func (r CatalogV2ListTypesResponse) Status() string { +func (r UsersV2ListResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6678,21 +9407,21 @@ func (r CatalogV2ListTypesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ListTypesResponse) StatusCode() int { +func (r UsersV2ListResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2CreateTypeResponse struct { +type UsersV2ShowResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateTypeResponseBody + JSON200 *ShowResponseBody15 } // Status returns HTTPResponse.Status -func (r CatalogV2CreateTypeResponse) Status() string { +func (r UsersV2ShowResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6700,978 +9429,1349 @@ func (r CatalogV2CreateTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2CreateTypeResponse) StatusCode() int { +func (r UsersV2ShowResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CatalogV2DestroyTypeResponse struct { - Body []byte - HTTPResponse *http.Response +// ActionsV1ListWithResponse request returning *ActionsV1ListResponse +func (c *ClientWithResponses) ActionsV1ListWithResponse(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*ActionsV1ListResponse, error) { + rsp, err := c.ActionsV1List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseActionsV1ListResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CatalogV2DestroyTypeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ActionsV1ShowWithResponse request returning *ActionsV1ShowResponse +func (c *ClientWithResponses) ActionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV1ShowResponse, error) { + rsp, err := c.ActionsV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseActionsV1ShowResponse(rsp) +} + +// CustomFieldOptionsV1ListWithResponse request returning *CustomFieldOptionsV1ListResponse +func (c *ClientWithResponses) CustomFieldOptionsV1ListWithResponse(ctx context.Context, params *CustomFieldOptionsV1ListParams, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ListResponse, error) { + rsp, err := c.CustomFieldOptionsV1List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1ListResponse(rsp) +} + +// CustomFieldOptionsV1CreateWithBodyWithResponse request with arbitrary body returning *CustomFieldOptionsV1CreateResponse +func (c *ClientWithResponses) CustomFieldOptionsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) { + rsp, err := c.CustomFieldOptionsV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1CreateResponse(rsp) +} + +func (c *ClientWithResponses) CustomFieldOptionsV1CreateWithResponse(ctx context.Context, body CustomFieldOptionsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) { + rsp, err := c.CustomFieldOptionsV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1CreateResponse(rsp) +} + +// CustomFieldOptionsV1DeleteWithResponse request returning *CustomFieldOptionsV1DeleteResponse +func (c *ClientWithResponses) CustomFieldOptionsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1DeleteResponse, error) { + rsp, err := c.CustomFieldOptionsV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1DeleteResponse(rsp) +} + +// CustomFieldOptionsV1ShowWithResponse request returning *CustomFieldOptionsV1ShowResponse +func (c *ClientWithResponses) CustomFieldOptionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ShowResponse, error) { + rsp, err := c.CustomFieldOptionsV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1ShowResponse(rsp) +} + +// CustomFieldOptionsV1UpdateWithBodyWithResponse request with arbitrary body returning *CustomFieldOptionsV1UpdateResponse +func (c *ClientWithResponses) CustomFieldOptionsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) { + rsp, err := c.CustomFieldOptionsV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1UpdateResponse(rsp) +} + +func (c *ClientWithResponses) CustomFieldOptionsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldOptionsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) { + rsp, err := c.CustomFieldOptionsV1Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldOptionsV1UpdateResponse(rsp) +} + +// CustomFieldsV1ListWithResponse request returning *CustomFieldsV1ListResponse +func (c *ClientWithResponses) CustomFieldsV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV1ListResponse, error) { + rsp, err := c.CustomFieldsV1List(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1ListResponse(rsp) +} + +// CustomFieldsV1CreateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV1CreateResponse +func (c *ClientWithResponses) CustomFieldsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) { + rsp, err := c.CustomFieldsV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1CreateResponse(rsp) +} + +func (c *ClientWithResponses) CustomFieldsV1CreateWithResponse(ctx context.Context, body CustomFieldsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) { + rsp, err := c.CustomFieldsV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1CreateResponse(rsp) +} + +// CustomFieldsV1DeleteWithResponse request returning *CustomFieldsV1DeleteResponse +func (c *ClientWithResponses) CustomFieldsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1DeleteResponse, error) { + rsp, err := c.CustomFieldsV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1DeleteResponse(rsp) +} + +// CustomFieldsV1ShowWithResponse request returning *CustomFieldsV1ShowResponse +func (c *ClientWithResponses) CustomFieldsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1ShowResponse, error) { + rsp, err := c.CustomFieldsV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1ShowResponse(rsp) +} + +// CustomFieldsV1UpdateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV1UpdateResponse +func (c *ClientWithResponses) CustomFieldsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) { + rsp, err := c.CustomFieldsV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1UpdateResponse(rsp) +} + +func (c *ClientWithResponses) CustomFieldsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) { + rsp, err := c.CustomFieldsV1Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCustomFieldsV1UpdateResponse(rsp) +} + +// UtilitiesV1IdentityWithResponse request returning *UtilitiesV1IdentityResponse +func (c *ClientWithResponses) UtilitiesV1IdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1IdentityResponse, error) { + rsp, err := c.UtilitiesV1Identity(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUtilitiesV1IdentityResponse(rsp) +} + +// IncidentAttachmentsV1ListWithResponse request returning *IncidentAttachmentsV1ListResponse +func (c *ClientWithResponses) IncidentAttachmentsV1ListWithResponse(ctx context.Context, params *IncidentAttachmentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1ListResponse, error) { + rsp, err := c.IncidentAttachmentsV1List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentAttachmentsV1ListResponse(rsp) +} + +// IncidentAttachmentsV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentAttachmentsV1CreateResponse +func (c *ClientWithResponses) IncidentAttachmentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) { + rsp, err := c.IncidentAttachmentsV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentAttachmentsV1CreateResponse(rsp) +} + +func (c *ClientWithResponses) IncidentAttachmentsV1CreateWithResponse(ctx context.Context, body IncidentAttachmentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) { + rsp, err := c.IncidentAttachmentsV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentAttachmentsV1CreateResponse(rsp) +} + +// IncidentAttachmentsV1DeleteWithResponse request returning *IncidentAttachmentsV1DeleteResponse +func (c *ClientWithResponses) IncidentAttachmentsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1DeleteResponse, error) { + rsp, err := c.IncidentAttachmentsV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentAttachmentsV1DeleteResponse(rsp) +} + +// IncidentMembershipsV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentMembershipsV1CreateResponse +func (c *ClientWithResponses) IncidentMembershipsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1CreateResponse, error) { + rsp, err := c.IncidentMembershipsV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentMembershipsV1CreateResponse(rsp) +} + +func (c *ClientWithResponses) IncidentMembershipsV1CreateWithResponse(ctx context.Context, body IncidentMembershipsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1CreateResponse, error) { + rsp, err := c.IncidentMembershipsV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentMembershipsV1CreateResponse(rsp) +} + +// IncidentMembershipsV1RevokeWithBodyWithResponse request with arbitrary body returning *IncidentMembershipsV1RevokeResponse +func (c *ClientWithResponses) IncidentMembershipsV1RevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1RevokeResponse, error) { + rsp, err := c.IncidentMembershipsV1RevokeWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentMembershipsV1RevokeResponse(rsp) +} + +func (c *ClientWithResponses) IncidentMembershipsV1RevokeWithResponse(ctx context.Context, body IncidentMembershipsV1RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentMembershipsV1RevokeResponse, error) { + rsp, err := c.IncidentMembershipsV1Revoke(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentMembershipsV1RevokeResponse(rsp) +} + +// IncidentRolesV1ListWithResponse request returning *IncidentRolesV1ListResponse +func (c *ClientWithResponses) IncidentRolesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV1ListResponse, error) { + rsp, err := c.IncidentRolesV1List(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentRolesV1ListResponse(rsp) +} + +// IncidentRolesV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV1CreateResponse +func (c *ClientWithResponses) IncidentRolesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) { + rsp, err := c.IncidentRolesV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentRolesV1CreateResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2DestroyTypeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) IncidentRolesV1CreateWithResponse(ctx context.Context, body IncidentRolesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) { + rsp, err := c.IncidentRolesV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentRolesV1CreateResponse(rsp) } -type CatalogV2ShowTypeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody +// IncidentRolesV1DeleteWithResponse request returning *IncidentRolesV1DeleteResponse +func (c *ClientWithResponses) IncidentRolesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1DeleteResponse, error) { + rsp, err := c.IncidentRolesV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentRolesV1DeleteResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CatalogV2ShowTypeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// IncidentRolesV1ShowWithResponse request returning *IncidentRolesV1ShowResponse +func (c *ClientWithResponses) IncidentRolesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1ShowResponse, error) { + rsp, err := c.IncidentRolesV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentRolesV1ShowResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2ShowTypeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// IncidentRolesV1UpdateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV1UpdateResponse +func (c *ClientWithResponses) IncidentRolesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) { + rsp, err := c.IncidentRolesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentRolesV1UpdateResponse(rsp) } -type CatalogV2UpdateTypeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody +func (c *ClientWithResponses) IncidentRolesV1UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) { + rsp, err := c.IncidentRolesV1Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentRolesV1UpdateResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CatalogV2UpdateTypeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// IncidentStatusesV1ListWithResponse request returning *IncidentStatusesV1ListResponse +func (c *ClientWithResponses) IncidentStatusesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ListResponse, error) { + rsp, err := c.IncidentStatusesV1List(ctx, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentStatusesV1ListResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2UpdateTypeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// IncidentStatusesV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentStatusesV1CreateResponse +func (c *ClientWithResponses) IncidentStatusesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) { + rsp, err := c.IncidentStatusesV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentStatusesV1CreateResponse(rsp) } -type CatalogV2UpdateTypeSchemaResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CreateTypeResponseBody +func (c *ClientWithResponses) IncidentStatusesV1CreateWithResponse(ctx context.Context, body IncidentStatusesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) { + rsp, err := c.IncidentStatusesV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentStatusesV1CreateResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CatalogV2UpdateTypeSchemaResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// IncidentStatusesV1DeleteWithResponse request returning *IncidentStatusesV1DeleteResponse +func (c *ClientWithResponses) IncidentStatusesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1DeleteResponse, error) { + rsp, err := c.IncidentStatusesV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentStatusesV1DeleteResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CatalogV2UpdateTypeSchemaResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// IncidentStatusesV1ShowWithResponse request returning *IncidentStatusesV1ShowResponse +func (c *ClientWithResponses) IncidentStatusesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ShowResponse, error) { + rsp, err := c.IncidentStatusesV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentStatusesV1ShowResponse(rsp) } -type IncidentTimestampsV2ListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListResponseBody7 +// IncidentStatusesV1UpdateWithBodyWithResponse request with arbitrary body returning *IncidentStatusesV1UpdateResponse +func (c *ClientWithResponses) IncidentStatusesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) { + rsp, err := c.IncidentStatusesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentStatusesV1UpdateResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentTimestampsV2ListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) IncidentStatusesV1UpdateWithResponse(ctx context.Context, id string, body IncidentStatusesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) { + rsp, err := c.IncidentStatusesV1Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentStatusesV1UpdateResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentTimestampsV2ListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// IncidentTypesV1ListWithResponse request returning *IncidentTypesV1ListResponse +func (c *ClientWithResponses) IncidentTypesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTypesV1ListResponse, error) { + rsp, err := c.IncidentTypesV1List(ctx, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentTypesV1ListResponse(rsp) } -type IncidentTimestampsV2ShowResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ShowResponseBody6 +// IncidentTypesV1ShowWithResponse request returning *IncidentTypesV1ShowResponse +func (c *ClientWithResponses) IncidentTypesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTypesV1ShowResponse, error) { + rsp, err := c.IncidentTypesV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentTypesV1ShowResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentTimestampsV2ShowResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// IncidentsV1ListWithResponse request returning *IncidentsV1ListResponse +func (c *ClientWithResponses) IncidentsV1ListWithResponse(ctx context.Context, params *IncidentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentsV1ListResponse, error) { + rsp, err := c.IncidentsV1List(ctx, params, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentsV1ListResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentTimestampsV2ShowResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// IncidentsV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentsV1CreateResponse +func (c *ClientWithResponses) IncidentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) { + rsp, err := c.IncidentsV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseIncidentsV1CreateResponse(rsp) } -type IncidentUpdatesV2ListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListResponseBody9 +func (c *ClientWithResponses) IncidentsV1CreateWithResponse(ctx context.Context, body IncidentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) { + rsp, err := c.IncidentsV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncidentsV1CreateResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentUpdatesV2ListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// IncidentsV1ShowWithResponse request returning *IncidentsV1ShowResponse +func (c *ClientWithResponses) IncidentsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV1ShowResponse, error) { + rsp, err := c.IncidentsV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseIncidentsV1ShowResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentUpdatesV2ListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// UtilitiesV1OpenAPIWithResponse request returning *UtilitiesV1OpenAPIResponse +func (c *ClientWithResponses) UtilitiesV1OpenAPIWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIResponse, error) { + rsp, err := c.UtilitiesV1OpenAPI(ctx, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUtilitiesV1OpenAPIResponse(rsp) } -type IncidentsV2ListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListResponseBody11 +// UtilitiesV1OpenAPIV3WithResponse request returning *UtilitiesV1OpenAPIV3Response +func (c *ClientWithResponses) UtilitiesV1OpenAPIV3WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIV3Response, error) { + rsp, err := c.UtilitiesV1OpenAPIV3(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUtilitiesV1OpenAPIV3Response(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentsV2ListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// SeveritiesV1ListWithResponse request returning *SeveritiesV1ListResponse +func (c *ClientWithResponses) SeveritiesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SeveritiesV1ListResponse, error) { + rsp, err := c.SeveritiesV1List(ctx, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseSeveritiesV1ListResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2ListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// SeveritiesV1CreateWithBodyWithResponse request with arbitrary body returning *SeveritiesV1CreateResponse +func (c *ClientWithResponses) SeveritiesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) { + rsp, err := c.SeveritiesV1CreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseSeveritiesV1CreateResponse(rsp) } -type IncidentsV2CreateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ShowResponseBody9 +func (c *ClientWithResponses) SeveritiesV1CreateWithResponse(ctx context.Context, body SeveritiesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) { + rsp, err := c.SeveritiesV1Create(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSeveritiesV1CreateResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentsV2CreateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// SeveritiesV1DeleteWithResponse request returning *SeveritiesV1DeleteResponse +func (c *ClientWithResponses) SeveritiesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1DeleteResponse, error) { + rsp, err := c.SeveritiesV1Delete(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseSeveritiesV1DeleteResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2CreateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// SeveritiesV1ShowWithResponse request returning *SeveritiesV1ShowResponse +func (c *ClientWithResponses) SeveritiesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1ShowResponse, error) { + rsp, err := c.SeveritiesV1Show(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type IncidentsV2ShowResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ShowResponseBody9 + return ParseSeveritiesV1ShowResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentsV2ShowResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// SeveritiesV1UpdateWithBodyWithResponse request with arbitrary body returning *SeveritiesV1UpdateResponse +func (c *ClientWithResponses) SeveritiesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) { + rsp, err := c.SeveritiesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseSeveritiesV1UpdateResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2ShowResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) SeveritiesV1UpdateWithResponse(ctx context.Context, id string, body SeveritiesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) { + rsp, err := c.SeveritiesV1Update(ctx, id, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseSeveritiesV1UpdateResponse(rsp) } -type IncidentsV2EditResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ShowResponseBody9 +// ActionsV2ListWithResponse request returning *ActionsV2ListResponse +func (c *ClientWithResponses) ActionsV2ListWithResponse(ctx context.Context, params *ActionsV2ListParams, reqEditors ...RequestEditorFn) (*ActionsV2ListResponse, error) { + rsp, err := c.ActionsV2List(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseActionsV2ListResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncidentsV2EditResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ActionsV2ShowWithResponse request returning *ActionsV2ShowResponse +func (c *ClientWithResponses) ActionsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV2ShowResponse, error) { + rsp, err := c.ActionsV2Show(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseActionsV2ShowResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncidentsV2EditResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// AlertEventsV2CreateHTTPWithBodyWithResponse request with arbitrary body returning *AlertEventsV2CreateHTTPResponse +func (c *ClientWithResponses) AlertEventsV2CreateHTTPWithBodyWithResponse(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AlertEventsV2CreateHTTPResponse, error) { + rsp, err := c.AlertEventsV2CreateHTTPWithBody(ctx, alertSourceConfigId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseAlertEventsV2CreateHTTPResponse(rsp) } -// ActionsV1ListWithResponse request returning *ActionsV1ListResponse -func (c *ClientWithResponses) ActionsV1ListWithResponse(ctx context.Context, params *ActionsV1ListParams, reqEditors ...RequestEditorFn) (*ActionsV1ListResponse, error) { - rsp, err := c.ActionsV1List(ctx, params, reqEditors...) +func (c *ClientWithResponses) AlertEventsV2CreateHTTPWithResponse(ctx context.Context, alertSourceConfigId string, params *AlertEventsV2CreateHTTPParams, body AlertEventsV2CreateHTTPJSONRequestBody, reqEditors ...RequestEditorFn) (*AlertEventsV2CreateHTTPResponse, error) { + rsp, err := c.AlertEventsV2CreateHTTP(ctx, alertSourceConfigId, params, body, reqEditors...) if err != nil { return nil, err } - return ParseActionsV1ListResponse(rsp) + return ParseAlertEventsV2CreateHTTPResponse(rsp) } -// ActionsV1ShowWithResponse request returning *ActionsV1ShowResponse -func (c *ClientWithResponses) ActionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ActionsV1ShowResponse, error) { - rsp, err := c.ActionsV1Show(ctx, id, reqEditors...) +// CatalogV2ListEntriesWithResponse request returning *CatalogV2ListEntriesResponse +func (c *ClientWithResponses) CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) { + rsp, err := c.CatalogV2ListEntries(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseActionsV1ShowResponse(rsp) + return ParseCatalogV2ListEntriesResponse(rsp) } -// CustomFieldOptionsV1ListWithResponse request returning *CustomFieldOptionsV1ListResponse -func (c *ClientWithResponses) CustomFieldOptionsV1ListWithResponse(ctx context.Context, params *CustomFieldOptionsV1ListParams, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ListResponse, error) { - rsp, err := c.CustomFieldOptionsV1List(ctx, params, reqEditors...) +// CatalogV2CreateEntryWithBodyWithResponse request with arbitrary body returning *CatalogV2CreateEntryResponse +func (c *ClientWithResponses) CatalogV2CreateEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) { + rsp, err := c.CatalogV2CreateEntryWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1ListResponse(rsp) + return ParseCatalogV2CreateEntryResponse(rsp) } -// CustomFieldOptionsV1CreateWithBodyWithResponse request with arbitrary body returning *CustomFieldOptionsV1CreateResponse -func (c *ClientWithResponses) CustomFieldOptionsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) { - rsp, err := c.CustomFieldOptionsV1CreateWithBody(ctx, contentType, body, reqEditors...) +func (c *ClientWithResponses) CatalogV2CreateEntryWithResponse(ctx context.Context, body CatalogV2CreateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) { + rsp, err := c.CatalogV2CreateEntry(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1CreateResponse(rsp) + return ParseCatalogV2CreateEntryResponse(rsp) } -func (c *ClientWithResponses) CustomFieldOptionsV1CreateWithResponse(ctx context.Context, body CustomFieldOptionsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1CreateResponse, error) { - rsp, err := c.CustomFieldOptionsV1Create(ctx, body, reqEditors...) +// CatalogV2DestroyEntryWithResponse request returning *CatalogV2DestroyEntryResponse +func (c *ClientWithResponses) CatalogV2DestroyEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyEntryResponse, error) { + rsp, err := c.CatalogV2DestroyEntry(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1CreateResponse(rsp) + return ParseCatalogV2DestroyEntryResponse(rsp) } -// CustomFieldOptionsV1DeleteWithResponse request returning *CustomFieldOptionsV1DeleteResponse -func (c *ClientWithResponses) CustomFieldOptionsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1DeleteResponse, error) { - rsp, err := c.CustomFieldOptionsV1Delete(ctx, id, reqEditors...) +// CatalogV2ShowEntryWithResponse request returning *CatalogV2ShowEntryResponse +func (c *ClientWithResponses) CatalogV2ShowEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowEntryResponse, error) { + rsp, err := c.CatalogV2ShowEntry(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1DeleteResponse(rsp) + return ParseCatalogV2ShowEntryResponse(rsp) } -// CustomFieldOptionsV1ShowWithResponse request returning *CustomFieldOptionsV1ShowResponse -func (c *ClientWithResponses) CustomFieldOptionsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1ShowResponse, error) { - rsp, err := c.CustomFieldOptionsV1Show(ctx, id, reqEditors...) +// CatalogV2UpdateEntryWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateEntryResponse +func (c *ClientWithResponses) CatalogV2UpdateEntryWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) { + rsp, err := c.CatalogV2UpdateEntryWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1ShowResponse(rsp) + return ParseCatalogV2UpdateEntryResponse(rsp) } -// CustomFieldOptionsV1UpdateWithBodyWithResponse request with arbitrary body returning *CustomFieldOptionsV1UpdateResponse -func (c *ClientWithResponses) CustomFieldOptionsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) { - rsp, err := c.CustomFieldOptionsV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) +func (c *ClientWithResponses) CatalogV2UpdateEntryWithResponse(ctx context.Context, id string, body CatalogV2UpdateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) { + rsp, err := c.CatalogV2UpdateEntry(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1UpdateResponse(rsp) + return ParseCatalogV2UpdateEntryResponse(rsp) } -func (c *ClientWithResponses) CustomFieldOptionsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldOptionsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldOptionsV1UpdateResponse, error) { - rsp, err := c.CustomFieldOptionsV1Update(ctx, id, body, reqEditors...) +// CatalogV2ListResourcesWithResponse request returning *CatalogV2ListResourcesResponse +func (c *ClientWithResponses) CatalogV2ListResourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListResourcesResponse, error) { + rsp, err := c.CatalogV2ListResources(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldOptionsV1UpdateResponse(rsp) + return ParseCatalogV2ListResourcesResponse(rsp) } -// CustomFieldsV1ListWithResponse request returning *CustomFieldsV1ListResponse -func (c *ClientWithResponses) CustomFieldsV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV1ListResponse, error) { - rsp, err := c.CustomFieldsV1List(ctx, reqEditors...) +// CatalogV2ListTypesWithResponse request returning *CatalogV2ListTypesResponse +func (c *ClientWithResponses) CatalogV2ListTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListTypesResponse, error) { + rsp, err := c.CatalogV2ListTypes(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1ListResponse(rsp) + return ParseCatalogV2ListTypesResponse(rsp) } -// CustomFieldsV1CreateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV1CreateResponse -func (c *ClientWithResponses) CustomFieldsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) { - rsp, err := c.CustomFieldsV1CreateWithBody(ctx, contentType, body, reqEditors...) +// CatalogV2CreateTypeWithBodyWithResponse request with arbitrary body returning *CatalogV2CreateTypeResponse +func (c *ClientWithResponses) CatalogV2CreateTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) { + rsp, err := c.CatalogV2CreateTypeWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1CreateResponse(rsp) + return ParseCatalogV2CreateTypeResponse(rsp) } -func (c *ClientWithResponses) CustomFieldsV1CreateWithResponse(ctx context.Context, body CustomFieldsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1CreateResponse, error) { - rsp, err := c.CustomFieldsV1Create(ctx, body, reqEditors...) +func (c *ClientWithResponses) CatalogV2CreateTypeWithResponse(ctx context.Context, body CatalogV2CreateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) { + rsp, err := c.CatalogV2CreateType(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1CreateResponse(rsp) + return ParseCatalogV2CreateTypeResponse(rsp) } -// CustomFieldsV1DeleteWithResponse request returning *CustomFieldsV1DeleteResponse -func (c *ClientWithResponses) CustomFieldsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1DeleteResponse, error) { - rsp, err := c.CustomFieldsV1Delete(ctx, id, reqEditors...) +// CatalogV2DestroyTypeWithResponse request returning *CatalogV2DestroyTypeResponse +func (c *ClientWithResponses) CatalogV2DestroyTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyTypeResponse, error) { + rsp, err := c.CatalogV2DestroyType(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1DeleteResponse(rsp) + return ParseCatalogV2DestroyTypeResponse(rsp) } -// CustomFieldsV1ShowWithResponse request returning *CustomFieldsV1ShowResponse -func (c *ClientWithResponses) CustomFieldsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV1ShowResponse, error) { - rsp, err := c.CustomFieldsV1Show(ctx, id, reqEditors...) +// CatalogV2ShowTypeWithResponse request returning *CatalogV2ShowTypeResponse +func (c *ClientWithResponses) CatalogV2ShowTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowTypeResponse, error) { + rsp, err := c.CatalogV2ShowType(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1ShowResponse(rsp) + return ParseCatalogV2ShowTypeResponse(rsp) } -// CustomFieldsV1UpdateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV1UpdateResponse -func (c *ClientWithResponses) CustomFieldsV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) { - rsp, err := c.CustomFieldsV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) +// CatalogV2UpdateTypeWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateTypeResponse +func (c *ClientWithResponses) CatalogV2UpdateTypeWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) { + rsp, err := c.CatalogV2UpdateTypeWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1UpdateResponse(rsp) + return ParseCatalogV2UpdateTypeResponse(rsp) } -func (c *ClientWithResponses) CustomFieldsV1UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV1UpdateResponse, error) { - rsp, err := c.CustomFieldsV1Update(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) CatalogV2UpdateTypeWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) { + rsp, err := c.CatalogV2UpdateType(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseCustomFieldsV1UpdateResponse(rsp) + return ParseCatalogV2UpdateTypeResponse(rsp) } -// UtilitiesV1IdentityWithResponse request returning *UtilitiesV1IdentityResponse -func (c *ClientWithResponses) UtilitiesV1IdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1IdentityResponse, error) { - rsp, err := c.UtilitiesV1Identity(ctx, reqEditors...) +// CatalogV2UpdateTypeSchemaWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateTypeSchemaResponse +func (c *ClientWithResponses) CatalogV2UpdateTypeSchemaWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) { + rsp, err := c.CatalogV2UpdateTypeSchemaWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUtilitiesV1IdentityResponse(rsp) + return ParseCatalogV2UpdateTypeSchemaResponse(rsp) } -// IncidentAttachmentsV1ListWithResponse request returning *IncidentAttachmentsV1ListResponse -func (c *ClientWithResponses) IncidentAttachmentsV1ListWithResponse(ctx context.Context, params *IncidentAttachmentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1ListResponse, error) { - rsp, err := c.IncidentAttachmentsV1List(ctx, params, reqEditors...) +func (c *ClientWithResponses) CatalogV2UpdateTypeSchemaWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) { + rsp, err := c.CatalogV2UpdateTypeSchema(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentAttachmentsV1ListResponse(rsp) + return ParseCatalogV2UpdateTypeSchemaResponse(rsp) } -// IncidentAttachmentsV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentAttachmentsV1CreateResponse -func (c *ClientWithResponses) IncidentAttachmentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) { - rsp, err := c.IncidentAttachmentsV1CreateWithBody(ctx, contentType, body, reqEditors...) +// CustomFieldsV2ListWithResponse request returning *CustomFieldsV2ListResponse +func (c *ClientWithResponses) CustomFieldsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CustomFieldsV2ListResponse, error) { + rsp, err := c.CustomFieldsV2List(ctx, reqEditors...) if err != nil { return nil, err } - return ParseIncidentAttachmentsV1CreateResponse(rsp) + return ParseCustomFieldsV2ListResponse(rsp) } -func (c *ClientWithResponses) IncidentAttachmentsV1CreateWithResponse(ctx context.Context, body IncidentAttachmentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1CreateResponse, error) { - rsp, err := c.IncidentAttachmentsV1Create(ctx, body, reqEditors...) +// CustomFieldsV2CreateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV2CreateResponse +func (c *ClientWithResponses) CustomFieldsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV2CreateResponse, error) { + rsp, err := c.CustomFieldsV2CreateWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentAttachmentsV1CreateResponse(rsp) + return ParseCustomFieldsV2CreateResponse(rsp) } -// IncidentAttachmentsV1DeleteWithResponse request returning *IncidentAttachmentsV1DeleteResponse -func (c *ClientWithResponses) IncidentAttachmentsV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentAttachmentsV1DeleteResponse, error) { - rsp, err := c.IncidentAttachmentsV1Delete(ctx, id, reqEditors...) +func (c *ClientWithResponses) CustomFieldsV2CreateWithResponse(ctx context.Context, body CustomFieldsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV2CreateResponse, error) { + rsp, err := c.CustomFieldsV2Create(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentAttachmentsV1DeleteResponse(rsp) + return ParseCustomFieldsV2CreateResponse(rsp) } -// IncidentRolesV1ListWithResponse request returning *IncidentRolesV1ListResponse -func (c *ClientWithResponses) IncidentRolesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV1ListResponse, error) { - rsp, err := c.IncidentRolesV1List(ctx, reqEditors...) +// CustomFieldsV2DeleteWithResponse request returning *CustomFieldsV2DeleteResponse +func (c *ClientWithResponses) CustomFieldsV2DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV2DeleteResponse, error) { + rsp, err := c.CustomFieldsV2Delete(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1ListResponse(rsp) + return ParseCustomFieldsV2DeleteResponse(rsp) } -// IncidentRolesV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV1CreateResponse -func (c *ClientWithResponses) IncidentRolesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) { - rsp, err := c.IncidentRolesV1CreateWithBody(ctx, contentType, body, reqEditors...) +// CustomFieldsV2ShowWithResponse request returning *CustomFieldsV2ShowResponse +func (c *ClientWithResponses) CustomFieldsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CustomFieldsV2ShowResponse, error) { + rsp, err := c.CustomFieldsV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1CreateResponse(rsp) + return ParseCustomFieldsV2ShowResponse(rsp) } -func (c *ClientWithResponses) IncidentRolesV1CreateWithResponse(ctx context.Context, body IncidentRolesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1CreateResponse, error) { - rsp, err := c.IncidentRolesV1Create(ctx, body, reqEditors...) +// CustomFieldsV2UpdateWithBodyWithResponse request with arbitrary body returning *CustomFieldsV2UpdateResponse +func (c *ClientWithResponses) CustomFieldsV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CustomFieldsV2UpdateResponse, error) { + rsp, err := c.CustomFieldsV2UpdateWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1CreateResponse(rsp) + return ParseCustomFieldsV2UpdateResponse(rsp) } -// IncidentRolesV1DeleteWithResponse request returning *IncidentRolesV1DeleteResponse -func (c *ClientWithResponses) IncidentRolesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1DeleteResponse, error) { - rsp, err := c.IncidentRolesV1Delete(ctx, id, reqEditors...) +func (c *ClientWithResponses) CustomFieldsV2UpdateWithResponse(ctx context.Context, id string, body CustomFieldsV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*CustomFieldsV2UpdateResponse, error) { + rsp, err := c.CustomFieldsV2Update(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1DeleteResponse(rsp) + return ParseCustomFieldsV2UpdateResponse(rsp) } -// IncidentRolesV1ShowWithResponse request returning *IncidentRolesV1ShowResponse -func (c *ClientWithResponses) IncidentRolesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV1ShowResponse, error) { - rsp, err := c.IncidentRolesV1Show(ctx, id, reqEditors...) +// FollowUpsV2ListWithResponse request returning *FollowUpsV2ListResponse +func (c *ClientWithResponses) FollowUpsV2ListWithResponse(ctx context.Context, params *FollowUpsV2ListParams, reqEditors ...RequestEditorFn) (*FollowUpsV2ListResponse, error) { + rsp, err := c.FollowUpsV2List(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1ShowResponse(rsp) + return ParseFollowUpsV2ListResponse(rsp) } -// IncidentRolesV1UpdateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV1UpdateResponse -func (c *ClientWithResponses) IncidentRolesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) { - rsp, err := c.IncidentRolesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) +// FollowUpsV2ShowWithResponse request returning *FollowUpsV2ShowResponse +func (c *ClientWithResponses) FollowUpsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*FollowUpsV2ShowResponse, error) { + rsp, err := c.FollowUpsV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1UpdateResponse(rsp) + return ParseFollowUpsV2ShowResponse(rsp) } -func (c *ClientWithResponses) IncidentRolesV1UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV1UpdateResponse, error) { - rsp, err := c.IncidentRolesV1Update(ctx, id, body, reqEditors...) +// IncidentRolesV2ListWithResponse request returning *IncidentRolesV2ListResponse +func (c *ClientWithResponses) IncidentRolesV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentRolesV2ListResponse, error) { + rsp, err := c.IncidentRolesV2List(ctx, reqEditors...) if err != nil { return nil, err } - return ParseIncidentRolesV1UpdateResponse(rsp) + return ParseIncidentRolesV2ListResponse(rsp) } -// IncidentStatusesV1ListWithResponse request returning *IncidentStatusesV1ListResponse -func (c *ClientWithResponses) IncidentStatusesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ListResponse, error) { - rsp, err := c.IncidentStatusesV1List(ctx, reqEditors...) +// IncidentRolesV2CreateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV2CreateResponse +func (c *ClientWithResponses) IncidentRolesV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV2CreateResponse, error) { + rsp, err := c.IncidentRolesV2CreateWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1ListResponse(rsp) + return ParseIncidentRolesV2CreateResponse(rsp) } -// IncidentStatusesV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentStatusesV1CreateResponse -func (c *ClientWithResponses) IncidentStatusesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) { - rsp, err := c.IncidentStatusesV1CreateWithBody(ctx, contentType, body, reqEditors...) +func (c *ClientWithResponses) IncidentRolesV2CreateWithResponse(ctx context.Context, body IncidentRolesV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV2CreateResponse, error) { + rsp, err := c.IncidentRolesV2Create(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1CreateResponse(rsp) + return ParseIncidentRolesV2CreateResponse(rsp) } -func (c *ClientWithResponses) IncidentStatusesV1CreateWithResponse(ctx context.Context, body IncidentStatusesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1CreateResponse, error) { - rsp, err := c.IncidentStatusesV1Create(ctx, body, reqEditors...) +// IncidentRolesV2DeleteWithResponse request returning *IncidentRolesV2DeleteResponse +func (c *ClientWithResponses) IncidentRolesV2DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV2DeleteResponse, error) { + rsp, err := c.IncidentRolesV2Delete(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1CreateResponse(rsp) + return ParseIncidentRolesV2DeleteResponse(rsp) } -// IncidentStatusesV1DeleteWithResponse request returning *IncidentStatusesV1DeleteResponse -func (c *ClientWithResponses) IncidentStatusesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1DeleteResponse, error) { - rsp, err := c.IncidentStatusesV1Delete(ctx, id, reqEditors...) +// IncidentRolesV2ShowWithResponse request returning *IncidentRolesV2ShowResponse +func (c *ClientWithResponses) IncidentRolesV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentRolesV2ShowResponse, error) { + rsp, err := c.IncidentRolesV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1DeleteResponse(rsp) + return ParseIncidentRolesV2ShowResponse(rsp) } -// IncidentStatusesV1ShowWithResponse request returning *IncidentStatusesV1ShowResponse -func (c *ClientWithResponses) IncidentStatusesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentStatusesV1ShowResponse, error) { - rsp, err := c.IncidentStatusesV1Show(ctx, id, reqEditors...) +// IncidentRolesV2UpdateWithBodyWithResponse request with arbitrary body returning *IncidentRolesV2UpdateResponse +func (c *ClientWithResponses) IncidentRolesV2UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentRolesV2UpdateResponse, error) { + rsp, err := c.IncidentRolesV2UpdateWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1ShowResponse(rsp) + return ParseIncidentRolesV2UpdateResponse(rsp) } -// IncidentStatusesV1UpdateWithBodyWithResponse request with arbitrary body returning *IncidentStatusesV1UpdateResponse -func (c *ClientWithResponses) IncidentStatusesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) { - rsp, err := c.IncidentStatusesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) +func (c *ClientWithResponses) IncidentRolesV2UpdateWithResponse(ctx context.Context, id string, body IncidentRolesV2UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentRolesV2UpdateResponse, error) { + rsp, err := c.IncidentRolesV2Update(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1UpdateResponse(rsp) + return ParseIncidentRolesV2UpdateResponse(rsp) } -func (c *ClientWithResponses) IncidentStatusesV1UpdateWithResponse(ctx context.Context, id string, body IncidentStatusesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentStatusesV1UpdateResponse, error) { - rsp, err := c.IncidentStatusesV1Update(ctx, id, body, reqEditors...) +// IncidentTimestampsV2ListWithResponse request returning *IncidentTimestampsV2ListResponse +func (c *ClientWithResponses) IncidentTimestampsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ListResponse, error) { + rsp, err := c.IncidentTimestampsV2List(ctx, reqEditors...) if err != nil { return nil, err } - return ParseIncidentStatusesV1UpdateResponse(rsp) + return ParseIncidentTimestampsV2ListResponse(rsp) } -// IncidentTypesV1ListWithResponse request returning *IncidentTypesV1ListResponse -func (c *ClientWithResponses) IncidentTypesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTypesV1ListResponse, error) { - rsp, err := c.IncidentTypesV1List(ctx, reqEditors...) +// IncidentTimestampsV2ShowWithResponse request returning *IncidentTimestampsV2ShowResponse +func (c *ClientWithResponses) IncidentTimestampsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ShowResponse, error) { + rsp, err := c.IncidentTimestampsV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentTypesV1ListResponse(rsp) + return ParseIncidentTimestampsV2ShowResponse(rsp) } -// IncidentTypesV1ShowWithResponse request returning *IncidentTypesV1ShowResponse -func (c *ClientWithResponses) IncidentTypesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTypesV1ShowResponse, error) { - rsp, err := c.IncidentTypesV1Show(ctx, id, reqEditors...) +// IncidentUpdatesV2ListWithResponse request returning *IncidentUpdatesV2ListResponse +func (c *ClientWithResponses) IncidentUpdatesV2ListWithResponse(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*IncidentUpdatesV2ListResponse, error) { + rsp, err := c.IncidentUpdatesV2List(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseIncidentTypesV1ShowResponse(rsp) + return ParseIncidentUpdatesV2ListResponse(rsp) } -// IncidentsV1ListWithResponse request returning *IncidentsV1ListResponse -func (c *ClientWithResponses) IncidentsV1ListWithResponse(ctx context.Context, params *IncidentsV1ListParams, reqEditors ...RequestEditorFn) (*IncidentsV1ListResponse, error) { - rsp, err := c.IncidentsV1List(ctx, params, reqEditors...) +// IncidentsV2ListWithResponse request returning *IncidentsV2ListResponse +func (c *ClientWithResponses) IncidentsV2ListWithResponse(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*IncidentsV2ListResponse, error) { + rsp, err := c.IncidentsV2List(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV1ListResponse(rsp) + return ParseIncidentsV2ListResponse(rsp) } -// IncidentsV1CreateWithBodyWithResponse request with arbitrary body returning *IncidentsV1CreateResponse -func (c *ClientWithResponses) IncidentsV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) { - rsp, err := c.IncidentsV1CreateWithBody(ctx, contentType, body, reqEditors...) +// IncidentsV2CreateWithBodyWithResponse request with arbitrary body returning *IncidentsV2CreateResponse +func (c *ClientWithResponses) IncidentsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) { + rsp, err := c.IncidentsV2CreateWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV1CreateResponse(rsp) + return ParseIncidentsV2CreateResponse(rsp) } -func (c *ClientWithResponses) IncidentsV1CreateWithResponse(ctx context.Context, body IncidentsV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV1CreateResponse, error) { - rsp, err := c.IncidentsV1Create(ctx, body, reqEditors...) +func (c *ClientWithResponses) IncidentsV2CreateWithResponse(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) { + rsp, err := c.IncidentsV2Create(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV1CreateResponse(rsp) + return ParseIncidentsV2CreateResponse(rsp) } -// IncidentsV1ShowWithResponse request returning *IncidentsV1ShowResponse -func (c *ClientWithResponses) IncidentsV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV1ShowResponse, error) { - rsp, err := c.IncidentsV1Show(ctx, id, reqEditors...) +// IncidentsV2ShowWithResponse request returning *IncidentsV2ShowResponse +func (c *ClientWithResponses) IncidentsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV2ShowResponse, error) { + rsp, err := c.IncidentsV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseIncidentsV1ShowResponse(rsp) + return ParseIncidentsV2ShowResponse(rsp) } -// UtilitiesV1OpenAPIWithResponse request returning *UtilitiesV1OpenAPIResponse -func (c *ClientWithResponses) UtilitiesV1OpenAPIWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UtilitiesV1OpenAPIResponse, error) { - rsp, err := c.UtilitiesV1OpenAPI(ctx, reqEditors...) +// IncidentsV2EditWithBodyWithResponse request with arbitrary body returning *IncidentsV2EditResponse +func (c *ClientWithResponses) IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { + rsp, err := c.IncidentsV2EditWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUtilitiesV1OpenAPIResponse(rsp) + return ParseIncidentsV2EditResponse(rsp) } -// SeveritiesV1ListWithResponse request returning *SeveritiesV1ListResponse -func (c *ClientWithResponses) SeveritiesV1ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SeveritiesV1ListResponse, error) { - rsp, err := c.SeveritiesV1List(ctx, reqEditors...) +func (c *ClientWithResponses) IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { + rsp, err := c.IncidentsV2Edit(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseSeveritiesV1ListResponse(rsp) + return ParseIncidentsV2EditResponse(rsp) } -// SeveritiesV1CreateWithBodyWithResponse request with arbitrary body returning *SeveritiesV1CreateResponse -func (c *ClientWithResponses) SeveritiesV1CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) { - rsp, err := c.SeveritiesV1CreateWithBody(ctx, contentType, body, reqEditors...) +// UsersV2ListWithResponse request returning *UsersV2ListResponse +func (c *ClientWithResponses) UsersV2ListWithResponse(ctx context.Context, params *UsersV2ListParams, reqEditors ...RequestEditorFn) (*UsersV2ListResponse, error) { + rsp, err := c.UsersV2List(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseSeveritiesV1CreateResponse(rsp) + return ParseUsersV2ListResponse(rsp) } -func (c *ClientWithResponses) SeveritiesV1CreateWithResponse(ctx context.Context, body SeveritiesV1CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1CreateResponse, error) { - rsp, err := c.SeveritiesV1Create(ctx, body, reqEditors...) +// UsersV2ShowWithResponse request returning *UsersV2ShowResponse +func (c *ClientWithResponses) UsersV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UsersV2ShowResponse, error) { + rsp, err := c.UsersV2Show(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseSeveritiesV1CreateResponse(rsp) + return ParseUsersV2ShowResponse(rsp) } -// SeveritiesV1DeleteWithResponse request returning *SeveritiesV1DeleteResponse -func (c *ClientWithResponses) SeveritiesV1DeleteWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1DeleteResponse, error) { - rsp, err := c.SeveritiesV1Delete(ctx, id, reqEditors...) +// ParseActionsV1ListResponse parses an HTTP response from a ActionsV1ListWithResponse call +func ParseActionsV1ListResponse(rsp *http.Response) (*ActionsV1ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseSeveritiesV1DeleteResponse(rsp) + + response := &ActionsV1ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// SeveritiesV1ShowWithResponse request returning *SeveritiesV1ShowResponse -func (c *ClientWithResponses) SeveritiesV1ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SeveritiesV1ShowResponse, error) { - rsp, err := c.SeveritiesV1Show(ctx, id, reqEditors...) +// ParseActionsV1ShowResponse parses an HTTP response from a ActionsV1ShowWithResponse call +func ParseActionsV1ShowResponse(rsp *http.Response) (*ActionsV1ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseSeveritiesV1ShowResponse(rsp) + + response := &ActionsV1ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// SeveritiesV1UpdateWithBodyWithResponse request with arbitrary body returning *SeveritiesV1UpdateResponse -func (c *ClientWithResponses) SeveritiesV1UpdateWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) { - rsp, err := c.SeveritiesV1UpdateWithBody(ctx, id, contentType, body, reqEditors...) +// ParseCustomFieldOptionsV1ListResponse parses an HTTP response from a CustomFieldOptionsV1ListWithResponse call +func ParseCustomFieldOptionsV1ListResponse(rsp *http.Response) (*CustomFieldOptionsV1ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseSeveritiesV1UpdateResponse(rsp) + + response := &CustomFieldOptionsV1ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody3 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -func (c *ClientWithResponses) SeveritiesV1UpdateWithResponse(ctx context.Context, id string, body SeveritiesV1UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SeveritiesV1UpdateResponse, error) { - rsp, err := c.SeveritiesV1Update(ctx, id, body, reqEditors...) +// ParseCustomFieldOptionsV1CreateResponse parses an HTTP response from a CustomFieldOptionsV1CreateWithResponse call +func ParseCustomFieldOptionsV1CreateResponse(rsp *http.Response) (*CustomFieldOptionsV1CreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseSeveritiesV1UpdateResponse(rsp) + + response := &CustomFieldOptionsV1CreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowResponseBody3 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil } -// CatalogV2ListEntriesWithResponse request returning *CatalogV2ListEntriesResponse -func (c *ClientWithResponses) CatalogV2ListEntriesWithResponse(ctx context.Context, params *CatalogV2ListEntriesParams, reqEditors ...RequestEditorFn) (*CatalogV2ListEntriesResponse, error) { - rsp, err := c.CatalogV2ListEntries(ctx, params, reqEditors...) +// ParseCustomFieldOptionsV1DeleteResponse parses an HTTP response from a CustomFieldOptionsV1DeleteWithResponse call +func ParseCustomFieldOptionsV1DeleteResponse(rsp *http.Response) (*CustomFieldOptionsV1DeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2ListEntriesResponse(rsp) + + response := &CustomFieldOptionsV1DeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// CatalogV2CreateEntryWithBodyWithResponse request with arbitrary body returning *CatalogV2CreateEntryResponse -func (c *ClientWithResponses) CatalogV2CreateEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) { - rsp, err := c.CatalogV2CreateEntryWithBody(ctx, contentType, body, reqEditors...) +// ParseCustomFieldOptionsV1ShowResponse parses an HTTP response from a CustomFieldOptionsV1ShowWithResponse call +func ParseCustomFieldOptionsV1ShowResponse(rsp *http.Response) (*CustomFieldOptionsV1ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2CreateEntryResponse(rsp) + + response := &CustomFieldOptionsV1ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody3 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -func (c *ClientWithResponses) CatalogV2CreateEntryWithResponse(ctx context.Context, body CatalogV2CreateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateEntryResponse, error) { - rsp, err := c.CatalogV2CreateEntry(ctx, body, reqEditors...) +// ParseCustomFieldOptionsV1UpdateResponse parses an HTTP response from a CustomFieldOptionsV1UpdateWithResponse call +func ParseCustomFieldOptionsV1UpdateResponse(rsp *http.Response) (*CustomFieldOptionsV1UpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2CreateEntryResponse(rsp) + + response := &CustomFieldOptionsV1UpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody3 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// CatalogV2DestroyEntryWithResponse request returning *CatalogV2DestroyEntryResponse -func (c *ClientWithResponses) CatalogV2DestroyEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyEntryResponse, error) { - rsp, err := c.CatalogV2DestroyEntry(ctx, id, reqEditors...) +// ParseCustomFieldsV1ListResponse parses an HTTP response from a CustomFieldsV1ListWithResponse call +func ParseCustomFieldsV1ListResponse(rsp *http.Response) (*CustomFieldsV1ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2DestroyEntryResponse(rsp) + + response := &CustomFieldsV1ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody4 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// CatalogV2ShowEntryWithResponse request returning *CatalogV2ShowEntryResponse -func (c *ClientWithResponses) CatalogV2ShowEntryWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowEntryResponse, error) { - rsp, err := c.CatalogV2ShowEntry(ctx, id, reqEditors...) +// ParseCustomFieldsV1CreateResponse parses an HTTP response from a CustomFieldsV1CreateWithResponse call +func ParseCustomFieldsV1CreateResponse(rsp *http.Response) (*CustomFieldsV1CreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2ShowEntryResponse(rsp) -} -// CatalogV2UpdateEntryWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateEntryResponse -func (c *ClientWithResponses) CatalogV2UpdateEntryWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) { - rsp, err := c.CatalogV2UpdateEntryWithBody(ctx, id, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &CustomFieldsV1CreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCatalogV2UpdateEntryResponse(rsp) -} -func (c *ClientWithResponses) CatalogV2UpdateEntryWithResponse(ctx context.Context, id string, body CatalogV2UpdateEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateEntryResponse, error) { - rsp, err := c.CatalogV2UpdateEntry(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowResponseBody4 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + } - return ParseCatalogV2UpdateEntryResponse(rsp) + + return response, nil } -// CatalogV2ListResourcesWithResponse request returning *CatalogV2ListResourcesResponse -func (c *ClientWithResponses) CatalogV2ListResourcesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListResourcesResponse, error) { - rsp, err := c.CatalogV2ListResources(ctx, reqEditors...) +// ParseCustomFieldsV1DeleteResponse parses an HTTP response from a CustomFieldsV1DeleteWithResponse call +func ParseCustomFieldsV1DeleteResponse(rsp *http.Response) (*CustomFieldsV1DeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2ListResourcesResponse(rsp) -} -// CatalogV2ListTypesWithResponse request returning *CatalogV2ListTypesResponse -func (c *ClientWithResponses) CatalogV2ListTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CatalogV2ListTypesResponse, error) { - rsp, err := c.CatalogV2ListTypes(ctx, reqEditors...) - if err != nil { - return nil, err + response := &CustomFieldsV1DeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCatalogV2ListTypesResponse(rsp) + + return response, nil } -// CatalogV2CreateTypeWithBodyWithResponse request with arbitrary body returning *CatalogV2CreateTypeResponse -func (c *ClientWithResponses) CatalogV2CreateTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) { - rsp, err := c.CatalogV2CreateTypeWithBody(ctx, contentType, body, reqEditors...) +// ParseCustomFieldsV1ShowResponse parses an HTTP response from a CustomFieldsV1ShowWithResponse call +func ParseCustomFieldsV1ShowResponse(rsp *http.Response) (*CustomFieldsV1ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2CreateTypeResponse(rsp) -} -func (c *ClientWithResponses) CatalogV2CreateTypeWithResponse(ctx context.Context, body CatalogV2CreateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2CreateTypeResponse, error) { - rsp, err := c.CatalogV2CreateType(ctx, body, reqEditors...) - if err != nil { - return nil, err + response := &CustomFieldsV1ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCatalogV2CreateTypeResponse(rsp) -} -// CatalogV2DestroyTypeWithResponse request returning *CatalogV2DestroyTypeResponse -func (c *ClientWithResponses) CatalogV2DestroyTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2DestroyTypeResponse, error) { - rsp, err := c.CatalogV2DestroyType(ctx, id, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody4 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseCatalogV2DestroyTypeResponse(rsp) + + return response, nil } -// CatalogV2ShowTypeWithResponse request returning *CatalogV2ShowTypeResponse -func (c *ClientWithResponses) CatalogV2ShowTypeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*CatalogV2ShowTypeResponse, error) { - rsp, err := c.CatalogV2ShowType(ctx, id, reqEditors...) +// ParseCustomFieldsV1UpdateResponse parses an HTTP response from a CustomFieldsV1UpdateWithResponse call +func ParseCustomFieldsV1UpdateResponse(rsp *http.Response) (*CustomFieldsV1UpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2ShowTypeResponse(rsp) -} -// CatalogV2UpdateTypeWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateTypeResponse -func (c *ClientWithResponses) CatalogV2UpdateTypeWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) { - rsp, err := c.CatalogV2UpdateTypeWithBody(ctx, id, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &CustomFieldsV1UpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCatalogV2UpdateTypeResponse(rsp) -} -func (c *ClientWithResponses) CatalogV2UpdateTypeWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeResponse, error) { - rsp, err := c.CatalogV2UpdateType(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody4 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseCatalogV2UpdateTypeResponse(rsp) + + return response, nil } -// CatalogV2UpdateTypeSchemaWithBodyWithResponse request with arbitrary body returning *CatalogV2UpdateTypeSchemaResponse -func (c *ClientWithResponses) CatalogV2UpdateTypeSchemaWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) { - rsp, err := c.CatalogV2UpdateTypeSchemaWithBody(ctx, id, contentType, body, reqEditors...) +// ParseUtilitiesV1IdentityResponse parses an HTTP response from a UtilitiesV1IdentityWithResponse call +func ParseUtilitiesV1IdentityResponse(rsp *http.Response) (*UtilitiesV1IdentityResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCatalogV2UpdateTypeSchemaResponse(rsp) -} -func (c *ClientWithResponses) CatalogV2UpdateTypeSchemaWithResponse(ctx context.Context, id string, body CatalogV2UpdateTypeSchemaJSONRequestBody, reqEditors ...RequestEditorFn) (*CatalogV2UpdateTypeSchemaResponse, error) { - rsp, err := c.CatalogV2UpdateTypeSchema(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + response := &UtilitiesV1IdentityResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCatalogV2UpdateTypeSchemaResponse(rsp) -} -// IncidentTimestampsV2ListWithResponse request returning *IncidentTimestampsV2ListResponse -func (c *ClientWithResponses) IncidentTimestampsV2ListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ListResponse, error) { - rsp, err := c.IncidentTimestampsV2List(ctx, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IdentityResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseIncidentTimestampsV2ListResponse(rsp) + + return response, nil } -// IncidentTimestampsV2ShowWithResponse request returning *IncidentTimestampsV2ShowResponse -func (c *ClientWithResponses) IncidentTimestampsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentTimestampsV2ShowResponse, error) { - rsp, err := c.IncidentTimestampsV2Show(ctx, id, reqEditors...) +// ParseIncidentAttachmentsV1ListResponse parses an HTTP response from a IncidentAttachmentsV1ListWithResponse call +func ParseIncidentAttachmentsV1ListResponse(rsp *http.Response) (*IncidentAttachmentsV1ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseIncidentTimestampsV2ShowResponse(rsp) -} -// IncidentUpdatesV2ListWithResponse request returning *IncidentUpdatesV2ListResponse -func (c *ClientWithResponses) IncidentUpdatesV2ListWithResponse(ctx context.Context, params *IncidentUpdatesV2ListParams, reqEditors ...RequestEditorFn) (*IncidentUpdatesV2ListResponse, error) { - rsp, err := c.IncidentUpdatesV2List(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &IncidentAttachmentsV1ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseIncidentUpdatesV2ListResponse(rsp) -} -// IncidentsV2ListWithResponse request returning *IncidentsV2ListResponse -func (c *ClientWithResponses) IncidentsV2ListWithResponse(ctx context.Context, params *IncidentsV2ListParams, reqEditors ...RequestEditorFn) (*IncidentsV2ListResponse, error) { - rsp, err := c.IncidentsV2List(ctx, params, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody7 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseIncidentsV2ListResponse(rsp) + + return response, nil } -// IncidentsV2CreateWithBodyWithResponse request with arbitrary body returning *IncidentsV2CreateResponse -func (c *ClientWithResponses) IncidentsV2CreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) { - rsp, err := c.IncidentsV2CreateWithBody(ctx, contentType, body, reqEditors...) +// ParseIncidentAttachmentsV1CreateResponse parses an HTTP response from a IncidentAttachmentsV1CreateWithResponse call +func ParseIncidentAttachmentsV1CreateResponse(rsp *http.Response) (*IncidentAttachmentsV1CreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseIncidentsV2CreateResponse(rsp) -} -func (c *ClientWithResponses) IncidentsV2CreateWithResponse(ctx context.Context, body IncidentsV2CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2CreateResponse, error) { - rsp, err := c.IncidentsV2Create(ctx, body, reqEditors...) - if err != nil { - return nil, err + response := &IncidentAttachmentsV1CreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseIncidentsV2CreateResponse(rsp) -} -// IncidentsV2ShowWithResponse request returning *IncidentsV2ShowResponse -func (c *ClientWithResponses) IncidentsV2ShowWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*IncidentsV2ShowResponse, error) { - rsp, err := c.IncidentsV2Show(ctx, id, reqEditors...) - if err != nil { - return nil, err + 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 ParseIncidentsV2ShowResponse(rsp) + + return response, nil } -// IncidentsV2EditWithBodyWithResponse request with arbitrary body returning *IncidentsV2EditResponse -func (c *ClientWithResponses) IncidentsV2EditWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { - rsp, err := c.IncidentsV2EditWithBody(ctx, id, contentType, body, reqEditors...) +// ParseIncidentAttachmentsV1DeleteResponse parses an HTTP response from a IncidentAttachmentsV1DeleteWithResponse call +func ParseIncidentAttachmentsV1DeleteResponse(rsp *http.Response) (*IncidentAttachmentsV1DeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseIncidentsV2EditResponse(rsp) -} -func (c *ClientWithResponses) IncidentsV2EditWithResponse(ctx context.Context, id string, body IncidentsV2EditJSONRequestBody, reqEditors ...RequestEditorFn) (*IncidentsV2EditResponse, error) { - rsp, err := c.IncidentsV2Edit(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + response := &IncidentAttachmentsV1DeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseIncidentsV2EditResponse(rsp) + + return response, nil } -// ParseActionsV1ListResponse parses an HTTP response from a ActionsV1ListWithResponse call -func ParseActionsV1ListResponse(rsp *http.Response) (*ActionsV1ListResponse, error) { +// ParseIncidentMembershipsV1CreateResponse parses an HTTP response from a IncidentMembershipsV1CreateWithResponse call +func ParseIncidentMembershipsV1CreateResponse(rsp *http.Response) (*IncidentMembershipsV1CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ActionsV1ListResponse{ + response := &IncidentMembershipsV1CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateResponseBody2 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest } return response, nil } -// ParseActionsV1ShowResponse parses an HTTP response from a ActionsV1ShowWithResponse call -func ParseActionsV1ShowResponse(rsp *http.Response) (*ActionsV1ShowResponse, error) { +// ParseIncidentMembershipsV1RevokeResponse parses an HTTP response from a IncidentMembershipsV1RevokeWithResponse call +func ParseIncidentMembershipsV1RevokeResponse(rsp *http.Response) (*IncidentMembershipsV1RevokeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ActionsV1ShowResponse{ + response := &IncidentMembershipsV1RevokeResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - } - return response, nil } -// ParseCustomFieldOptionsV1ListResponse parses an HTTP response from a CustomFieldOptionsV1ListWithResponse call -func ParseCustomFieldOptionsV1ListResponse(rsp *http.Response) (*CustomFieldOptionsV1ListResponse, error) { +// ParseIncidentRolesV1ListResponse parses an HTTP response from a IncidentRolesV1ListWithResponse call +func ParseIncidentRolesV1ListResponse(rsp *http.Response) (*IncidentRolesV1ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldOptionsV1ListResponse{ + response := &IncidentRolesV1ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody2 + var dest ListResponseBody8 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7682,22 +10782,22 @@ func ParseCustomFieldOptionsV1ListResponse(rsp *http.Response) (*CustomFieldOpti return response, nil } -// ParseCustomFieldOptionsV1CreateResponse parses an HTTP response from a CustomFieldOptionsV1CreateWithResponse call -func ParseCustomFieldOptionsV1CreateResponse(rsp *http.Response) (*CustomFieldOptionsV1CreateResponse, error) { +// ParseIncidentRolesV1CreateResponse parses an HTTP response from a IncidentRolesV1CreateWithResponse call +func ParseIncidentRolesV1CreateResponse(rsp *http.Response) (*IncidentRolesV1CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldOptionsV1CreateResponse{ + response := &IncidentRolesV1CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody2 + var dest ShowResponseBody7 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7708,15 +10808,15 @@ func ParseCustomFieldOptionsV1CreateResponse(rsp *http.Response) (*CustomFieldOp return response, nil } -// ParseCustomFieldOptionsV1DeleteResponse parses an HTTP response from a CustomFieldOptionsV1DeleteWithResponse call -func ParseCustomFieldOptionsV1DeleteResponse(rsp *http.Response) (*CustomFieldOptionsV1DeleteResponse, error) { +// ParseIncidentRolesV1DeleteResponse parses an HTTP response from a IncidentRolesV1DeleteWithResponse call +func ParseIncidentRolesV1DeleteResponse(rsp *http.Response) (*IncidentRolesV1DeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldOptionsV1DeleteResponse{ + response := &IncidentRolesV1DeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7724,22 +10824,22 @@ func ParseCustomFieldOptionsV1DeleteResponse(rsp *http.Response) (*CustomFieldOp return response, nil } -// ParseCustomFieldOptionsV1ShowResponse parses an HTTP response from a CustomFieldOptionsV1ShowWithResponse call -func ParseCustomFieldOptionsV1ShowResponse(rsp *http.Response) (*CustomFieldOptionsV1ShowResponse, error) { +// ParseIncidentRolesV1ShowResponse parses an HTTP response from a IncidentRolesV1ShowWithResponse call +func ParseIncidentRolesV1ShowResponse(rsp *http.Response) (*IncidentRolesV1ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldOptionsV1ShowResponse{ + response := &IncidentRolesV1ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody2 + var dest ShowResponseBody7 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7750,22 +10850,22 @@ func ParseCustomFieldOptionsV1ShowResponse(rsp *http.Response) (*CustomFieldOpti return response, nil } -// ParseCustomFieldOptionsV1UpdateResponse parses an HTTP response from a CustomFieldOptionsV1UpdateWithResponse call -func ParseCustomFieldOptionsV1UpdateResponse(rsp *http.Response) (*CustomFieldOptionsV1UpdateResponse, error) { +// ParseIncidentRolesV1UpdateResponse parses an HTTP response from a IncidentRolesV1UpdateWithResponse call +func ParseIncidentRolesV1UpdateResponse(rsp *http.Response) (*IncidentRolesV1UpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldOptionsV1UpdateResponse{ + response := &IncidentRolesV1UpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody2 + var dest ShowResponseBody7 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7776,22 +10876,22 @@ func ParseCustomFieldOptionsV1UpdateResponse(rsp *http.Response) (*CustomFieldOp return response, nil } -// ParseCustomFieldsV1ListResponse parses an HTTP response from a CustomFieldsV1ListWithResponse call -func ParseCustomFieldsV1ListResponse(rsp *http.Response) (*CustomFieldsV1ListResponse, error) { +// ParseIncidentStatusesV1ListResponse parses an HTTP response from a IncidentStatusesV1ListWithResponse call +func ParseIncidentStatusesV1ListResponse(rsp *http.Response) (*IncidentStatusesV1ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldsV1ListResponse{ + response := &IncidentStatusesV1ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody3 + var dest ListResponseBody10 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7802,22 +10902,22 @@ func ParseCustomFieldsV1ListResponse(rsp *http.Response) (*CustomFieldsV1ListRes return response, nil } -// ParseCustomFieldsV1CreateResponse parses an HTTP response from a CustomFieldsV1CreateWithResponse call -func ParseCustomFieldsV1CreateResponse(rsp *http.Response) (*CustomFieldsV1CreateResponse, error) { +// ParseIncidentStatusesV1CreateResponse parses an HTTP response from a IncidentStatusesV1CreateWithResponse call +func ParseIncidentStatusesV1CreateResponse(rsp *http.Response) (*IncidentStatusesV1CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldsV1CreateResponse{ + response := &IncidentStatusesV1CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody3 + var dest ShowResponseBody9 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7828,15 +10928,15 @@ func ParseCustomFieldsV1CreateResponse(rsp *http.Response) (*CustomFieldsV1Creat return response, nil } -// ParseCustomFieldsV1DeleteResponse parses an HTTP response from a CustomFieldsV1DeleteWithResponse call -func ParseCustomFieldsV1DeleteResponse(rsp *http.Response) (*CustomFieldsV1DeleteResponse, error) { +// ParseIncidentStatusesV1DeleteResponse parses an HTTP response from a IncidentStatusesV1DeleteWithResponse call +func ParseIncidentStatusesV1DeleteResponse(rsp *http.Response) (*IncidentStatusesV1DeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldsV1DeleteResponse{ + response := &IncidentStatusesV1DeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7844,22 +10944,22 @@ func ParseCustomFieldsV1DeleteResponse(rsp *http.Response) (*CustomFieldsV1Delet return response, nil } -// ParseCustomFieldsV1ShowResponse parses an HTTP response from a CustomFieldsV1ShowWithResponse call -func ParseCustomFieldsV1ShowResponse(rsp *http.Response) (*CustomFieldsV1ShowResponse, error) { +// ParseIncidentStatusesV1ShowResponse parses an HTTP response from a IncidentStatusesV1ShowWithResponse call +func ParseIncidentStatusesV1ShowResponse(rsp *http.Response) (*IncidentStatusesV1ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldsV1ShowResponse{ + response := &IncidentStatusesV1ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody3 + var dest ShowResponseBody9 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7870,22 +10970,22 @@ func ParseCustomFieldsV1ShowResponse(rsp *http.Response) (*CustomFieldsV1ShowRes return response, nil } -// ParseCustomFieldsV1UpdateResponse parses an HTTP response from a CustomFieldsV1UpdateWithResponse call -func ParseCustomFieldsV1UpdateResponse(rsp *http.Response) (*CustomFieldsV1UpdateResponse, error) { +// ParseIncidentStatusesV1UpdateResponse parses an HTTP response from a IncidentStatusesV1UpdateWithResponse call +func ParseIncidentStatusesV1UpdateResponse(rsp *http.Response) (*IncidentStatusesV1UpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CustomFieldsV1UpdateResponse{ + response := &IncidentStatusesV1UpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody3 + var dest ShowResponseBody9 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7896,22 +10996,22 @@ func ParseCustomFieldsV1UpdateResponse(rsp *http.Response) (*CustomFieldsV1Updat return response, nil } -// ParseUtilitiesV1IdentityResponse parses an HTTP response from a UtilitiesV1IdentityWithResponse call -func ParseUtilitiesV1IdentityResponse(rsp *http.Response) (*UtilitiesV1IdentityResponse, error) { +// ParseIncidentTypesV1ListResponse parses an HTTP response from a IncidentTypesV1ListWithResponse call +func ParseIncidentTypesV1ListResponse(rsp *http.Response) (*IncidentTypesV1ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UtilitiesV1IdentityResponse{ + response := &IncidentTypesV1ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IdentityResponseBody + var dest ListResponseBody12 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7922,22 +11022,22 @@ func ParseUtilitiesV1IdentityResponse(rsp *http.Response) (*UtilitiesV1IdentityR return response, nil } -// ParseIncidentAttachmentsV1ListResponse parses an HTTP response from a IncidentAttachmentsV1ListWithResponse call -func ParseIncidentAttachmentsV1ListResponse(rsp *http.Response) (*IncidentAttachmentsV1ListResponse, error) { +// ParseIncidentTypesV1ShowResponse parses an HTTP response from a IncidentTypesV1ShowWithResponse call +func ParseIncidentTypesV1ShowResponse(rsp *http.Response) (*IncidentTypesV1ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentAttachmentsV1ListResponse{ + response := &IncidentTypesV1ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody4 + var dest ShowResponseBody11 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -7948,64 +11048,74 @@ func ParseIncidentAttachmentsV1ListResponse(rsp *http.Response) (*IncidentAttach return response, nil } -// ParseIncidentAttachmentsV1CreateResponse parses an HTTP response from a IncidentAttachmentsV1CreateWithResponse call -func ParseIncidentAttachmentsV1CreateResponse(rsp *http.Response) (*IncidentAttachmentsV1CreateResponse, error) { +// ParseIncidentsV1ListResponse parses an HTTP response from a IncidentsV1ListWithResponse call +func ParseIncidentsV1ListResponse(rsp *http.Response) (*IncidentsV1ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentAttachmentsV1CreateResponse{ + response := &IncidentsV1ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateResponseBody + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody14 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest } return response, nil } -// ParseIncidentAttachmentsV1DeleteResponse parses an HTTP response from a IncidentAttachmentsV1DeleteWithResponse call -func ParseIncidentAttachmentsV1DeleteResponse(rsp *http.Response) (*IncidentAttachmentsV1DeleteResponse, error) { +// ParseIncidentsV1CreateResponse parses an HTTP response from a IncidentsV1CreateWithResponse call +func ParseIncidentsV1CreateResponse(rsp *http.Response) (*IncidentsV1CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentAttachmentsV1DeleteResponse{ + response := &IncidentsV1CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody12 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + return response, nil } -// ParseIncidentRolesV1ListResponse parses an HTTP response from a IncidentRolesV1ListWithResponse call -func ParseIncidentRolesV1ListResponse(rsp *http.Response) (*IncidentRolesV1ListResponse, error) { +// ParseIncidentsV1ShowResponse parses an HTTP response from a IncidentsV1ShowWithResponse call +func ParseIncidentsV1ShowResponse(rsp *http.Response) (*IncidentsV1ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentRolesV1ListResponse{ + response := &IncidentsV1ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody5 + var dest ShowResponseBody12 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8016,64 +11126,74 @@ func ParseIncidentRolesV1ListResponse(rsp *http.Response) (*IncidentRolesV1ListR return response, nil } -// ParseIncidentRolesV1CreateResponse parses an HTTP response from a IncidentRolesV1CreateWithResponse call -func ParseIncidentRolesV1CreateResponse(rsp *http.Response) (*IncidentRolesV1CreateResponse, error) { +// ParseUtilitiesV1OpenAPIResponse parses an HTTP response from a UtilitiesV1OpenAPIWithResponse call +func ParseUtilitiesV1OpenAPIResponse(rsp *http.Response) (*UtilitiesV1OpenAPIResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentRolesV1CreateResponse{ + response := &UtilitiesV1OpenAPIResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody4 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest openapi_types.File if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest } return response, nil } -// ParseIncidentRolesV1DeleteResponse parses an HTTP response from a IncidentRolesV1DeleteWithResponse call -func ParseIncidentRolesV1DeleteResponse(rsp *http.Response) (*IncidentRolesV1DeleteResponse, error) { +// ParseUtilitiesV1OpenAPIV3Response parses an HTTP response from a UtilitiesV1OpenAPIV3WithResponse call +func ParseUtilitiesV1OpenAPIV3Response(rsp *http.Response) (*UtilitiesV1OpenAPIV3Response, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentRolesV1DeleteResponse{ + response := &UtilitiesV1OpenAPIV3Response{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest openapi_types.File + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + return response, nil } -// ParseIncidentRolesV1ShowResponse parses an HTTP response from a IncidentRolesV1ShowWithResponse call -func ParseIncidentRolesV1ShowResponse(rsp *http.Response) (*IncidentRolesV1ShowResponse, error) { +// ParseSeveritiesV1ListResponse parses an HTTP response from a SeveritiesV1ListWithResponse call +func ParseSeveritiesV1ListResponse(rsp *http.Response) (*SeveritiesV1ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentRolesV1ShowResponse{ + response := &SeveritiesV1ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody4 + var dest ListResponseBody16 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8084,48 +11204,64 @@ func ParseIncidentRolesV1ShowResponse(rsp *http.Response) (*IncidentRolesV1ShowR return response, nil } -// ParseIncidentRolesV1UpdateResponse parses an HTTP response from a IncidentRolesV1UpdateWithResponse call -func ParseIncidentRolesV1UpdateResponse(rsp *http.Response) (*IncidentRolesV1UpdateResponse, error) { +// ParseSeveritiesV1CreateResponse parses an HTTP response from a SeveritiesV1CreateWithResponse call +func ParseSeveritiesV1CreateResponse(rsp *http.Response) (*SeveritiesV1CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentRolesV1UpdateResponse{ + response := &SeveritiesV1CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody4 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowResponseBody14 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest } return response, nil } -// ParseIncidentStatusesV1ListResponse parses an HTTP response from a IncidentStatusesV1ListWithResponse call -func ParseIncidentStatusesV1ListResponse(rsp *http.Response) (*IncidentStatusesV1ListResponse, error) { +// ParseSeveritiesV1DeleteResponse parses an HTTP response from a SeveritiesV1DeleteWithResponse call +func ParseSeveritiesV1DeleteResponse(rsp *http.Response) (*SeveritiesV1DeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentStatusesV1ListResponse{ + response := &SeveritiesV1DeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseSeveritiesV1ShowResponse parses an HTTP response from a SeveritiesV1ShowWithResponse call +func ParseSeveritiesV1ShowResponse(rsp *http.Response) (*SeveritiesV1ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SeveritiesV1ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody6 + var dest ShowResponseBody14 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8136,64 +11272,74 @@ func ParseIncidentStatusesV1ListResponse(rsp *http.Response) (*IncidentStatusesV return response, nil } -// ParseIncidentStatusesV1CreateResponse parses an HTTP response from a IncidentStatusesV1CreateWithResponse call -func ParseIncidentStatusesV1CreateResponse(rsp *http.Response) (*IncidentStatusesV1CreateResponse, error) { +// ParseSeveritiesV1UpdateResponse parses an HTTP response from a SeveritiesV1UpdateWithResponse call +func ParseSeveritiesV1UpdateResponse(rsp *http.Response) (*SeveritiesV1UpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentStatusesV1CreateResponse{ + response := &SeveritiesV1UpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody5 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody14 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest } return response, nil } -// ParseIncidentStatusesV1DeleteResponse parses an HTTP response from a IncidentStatusesV1DeleteWithResponse call -func ParseIncidentStatusesV1DeleteResponse(rsp *http.Response) (*IncidentStatusesV1DeleteResponse, error) { +// ParseActionsV2ListResponse parses an HTTP response from a ActionsV2ListWithResponse call +func ParseActionsV2ListResponse(rsp *http.Response) (*ActionsV2ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentStatusesV1DeleteResponse{ + response := &ActionsV2ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody2 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + return response, nil } -// ParseIncidentStatusesV1ShowResponse parses an HTTP response from a IncidentStatusesV1ShowWithResponse call -func ParseIncidentStatusesV1ShowResponse(rsp *http.Response) (*IncidentStatusesV1ShowResponse, error) { +// ParseActionsV2ShowResponse parses an HTTP response from a ActionsV2ShowWithResponse call +func ParseActionsV2ShowResponse(rsp *http.Response) (*ActionsV2ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentStatusesV1ShowResponse{ + response := &ActionsV2ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody5 + var dest ShowResponseBody2 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8204,22 +11350,48 @@ func ParseIncidentStatusesV1ShowResponse(rsp *http.Response) (*IncidentStatusesV return response, nil } -// ParseIncidentStatusesV1UpdateResponse parses an HTTP response from a IncidentStatusesV1UpdateWithResponse call -func ParseIncidentStatusesV1UpdateResponse(rsp *http.Response) (*IncidentStatusesV1UpdateResponse, error) { +// ParseAlertEventsV2CreateHTTPResponse parses an HTTP response from a AlertEventsV2CreateHTTPWithResponse call +func ParseAlertEventsV2CreateHTTPResponse(rsp *http.Response) (*AlertEventsV2CreateHTTPResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AlertEventsV2CreateHTTPResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest CreateHTTPResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &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) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentStatusesV1UpdateResponse{ + response := &CatalogV2ListEntriesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody5 + var dest ListEntriesResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8230,74 +11402,64 @@ func ParseIncidentStatusesV1UpdateResponse(rsp *http.Response) (*IncidentStatuse return response, nil } -// ParseIncidentTypesV1ListResponse parses an HTTP response from a IncidentTypesV1ListWithResponse call -func ParseIncidentTypesV1ListResponse(rsp *http.Response) (*IncidentTypesV1ListResponse, error) { +// ParseCatalogV2CreateEntryResponse parses an HTTP response from a CatalogV2CreateEntryWithResponse call +func ParseCatalogV2CreateEntryResponse(rsp *http.Response) (*CatalogV2CreateEntryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentTypesV1ListResponse{ + response := &CatalogV2CreateEntryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody8 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateEntryResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest } return response, nil } -// ParseIncidentTypesV1ShowResponse parses an HTTP response from a IncidentTypesV1ShowWithResponse call -func ParseIncidentTypesV1ShowResponse(rsp *http.Response) (*IncidentTypesV1ShowResponse, error) { +// ParseCatalogV2DestroyEntryResponse parses an HTTP response from a CatalogV2DestroyEntryWithResponse call +func ParseCatalogV2DestroyEntryResponse(rsp *http.Response) (*CatalogV2DestroyEntryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentTypesV1ShowResponse{ + response := &CatalogV2DestroyEntryResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody7 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - } - return response, nil } -// ParseIncidentsV1ListResponse parses an HTTP response from a IncidentsV1ListWithResponse call -func ParseIncidentsV1ListResponse(rsp *http.Response) (*IncidentsV1ListResponse, error) { +// ParseCatalogV2ShowEntryResponse parses an HTTP response from a CatalogV2ShowEntryWithResponse call +func ParseCatalogV2ShowEntryResponse(rsp *http.Response) (*CatalogV2ShowEntryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentsV1ListResponse{ + response := &CatalogV2ShowEntryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody10 + var dest ShowEntryResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8308,22 +11470,22 @@ func ParseIncidentsV1ListResponse(rsp *http.Response) (*IncidentsV1ListResponse, return response, nil } -// ParseIncidentsV1CreateResponse parses an HTTP response from a IncidentsV1CreateWithResponse call -func ParseIncidentsV1CreateResponse(rsp *http.Response) (*IncidentsV1CreateResponse, error) { +// ParseCatalogV2UpdateEntryResponse parses an HTTP response from a CatalogV2UpdateEntryWithResponse call +func ParseCatalogV2UpdateEntryResponse(rsp *http.Response) (*CatalogV2UpdateEntryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentsV1CreateResponse{ + response := &CatalogV2UpdateEntryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody8 + var dest ShowEntryResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8334,22 +11496,22 @@ func ParseIncidentsV1CreateResponse(rsp *http.Response) (*IncidentsV1CreateRespo return response, nil } -// ParseIncidentsV1ShowResponse parses an HTTP response from a IncidentsV1ShowWithResponse call -func ParseIncidentsV1ShowResponse(rsp *http.Response) (*IncidentsV1ShowResponse, error) { +// ParseCatalogV2ListResourcesResponse parses an HTTP response from a CatalogV2ListResourcesWithResponse call +func ParseCatalogV2ListResourcesResponse(rsp *http.Response) (*CatalogV2ListResourcesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &IncidentsV1ShowResponse{ + response := &CatalogV2ListResourcesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody8 + var dest ListResourcesResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8360,22 +11522,22 @@ func ParseIncidentsV1ShowResponse(rsp *http.Response) (*IncidentsV1ShowResponse, return response, nil } -// ParseUtilitiesV1OpenAPIResponse parses an HTTP response from a UtilitiesV1OpenAPIWithResponse call -func ParseUtilitiesV1OpenAPIResponse(rsp *http.Response) (*UtilitiesV1OpenAPIResponse, error) { +// ParseCatalogV2ListTypesResponse parses an HTTP response from a CatalogV2ListTypesWithResponse call +func ParseCatalogV2ListTypesResponse(rsp *http.Response) (*CatalogV2ListTypesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UtilitiesV1OpenAPIResponse{ + response := &CatalogV2ListTypesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest openapi_types.File + var dest ListTypesResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8386,90 +11548,90 @@ func ParseUtilitiesV1OpenAPIResponse(rsp *http.Response) (*UtilitiesV1OpenAPIRes return response, nil } -// ParseSeveritiesV1ListResponse parses an HTTP response from a SeveritiesV1ListWithResponse call -func ParseSeveritiesV1ListResponse(rsp *http.Response) (*SeveritiesV1ListResponse, error) { +// ParseCatalogV2CreateTypeResponse parses an HTTP response from a CatalogV2CreateTypeWithResponse call +func ParseCatalogV2CreateTypeResponse(rsp *http.Response) (*CatalogV2CreateTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SeveritiesV1ListResponse{ + response := &CatalogV2CreateTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody12 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateTypeResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest } return response, nil } -// ParseSeveritiesV1CreateResponse parses an HTTP response from a SeveritiesV1CreateWithResponse call -func ParseSeveritiesV1CreateResponse(rsp *http.Response) (*SeveritiesV1CreateResponse, error) { +// ParseCatalogV2DestroyTypeResponse parses an HTTP response from a CatalogV2DestroyTypeWithResponse call +func ParseCatalogV2DestroyTypeResponse(rsp *http.Response) (*CatalogV2DestroyTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SeveritiesV1CreateResponse{ + response := &CatalogV2DestroyTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ShowResponseBody10 - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - } - return response, nil } -// ParseSeveritiesV1DeleteResponse parses an HTTP response from a SeveritiesV1DeleteWithResponse call -func ParseSeveritiesV1DeleteResponse(rsp *http.Response) (*SeveritiesV1DeleteResponse, error) { +// ParseCatalogV2ShowTypeResponse parses an HTTP response from a CatalogV2ShowTypeWithResponse call +func ParseCatalogV2ShowTypeResponse(rsp *http.Response) (*CatalogV2ShowTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SeveritiesV1DeleteResponse{ + response := &CatalogV2ShowTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CreateTypeResponseBody + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + return response, nil } -// ParseSeveritiesV1ShowResponse parses an HTTP response from a SeveritiesV1ShowWithResponse call -func ParseSeveritiesV1ShowResponse(rsp *http.Response) (*SeveritiesV1ShowResponse, error) { +// ParseCatalogV2UpdateTypeResponse parses an HTTP response from a CatalogV2UpdateTypeWithResponse call +func ParseCatalogV2UpdateTypeResponse(rsp *http.Response) (*CatalogV2UpdateTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SeveritiesV1ShowResponse{ + response := &CatalogV2UpdateTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody10 + var dest CreateTypeResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8480,22 +11642,22 @@ func ParseSeveritiesV1ShowResponse(rsp *http.Response) (*SeveritiesV1ShowRespons return response, nil } -// ParseSeveritiesV1UpdateResponse parses an HTTP response from a SeveritiesV1UpdateWithResponse call -func ParseSeveritiesV1UpdateResponse(rsp *http.Response) (*SeveritiesV1UpdateResponse, error) { +// ParseCatalogV2UpdateTypeSchemaResponse parses an HTTP response from a CatalogV2UpdateTypeSchemaWithResponse call +func ParseCatalogV2UpdateTypeSchemaResponse(rsp *http.Response) (*CatalogV2UpdateTypeSchemaResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SeveritiesV1UpdateResponse{ + response := &CatalogV2UpdateTypeSchemaResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody10 + var dest CreateTypeResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8506,22 +11668,22 @@ func ParseSeveritiesV1UpdateResponse(rsp *http.Response) (*SeveritiesV1UpdateRes return response, nil } -// ParseCatalogV2ListEntriesResponse parses an HTTP response from a CatalogV2ListEntriesWithResponse call -func ParseCatalogV2ListEntriesResponse(rsp *http.Response) (*CatalogV2ListEntriesResponse, error) { +// ParseCustomFieldsV2ListResponse parses an HTTP response from a CustomFieldsV2ListWithResponse call +func ParseCustomFieldsV2ListResponse(rsp *http.Response) (*CustomFieldsV2ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2ListEntriesResponse{ + response := &CustomFieldsV2ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListEntriesResponseBody + var dest ListResponseBody5 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8532,22 +11694,22 @@ func ParseCatalogV2ListEntriesResponse(rsp *http.Response) (*CatalogV2ListEntrie return response, nil } -// ParseCatalogV2CreateEntryResponse parses an HTTP response from a CatalogV2CreateEntryWithResponse call -func ParseCatalogV2CreateEntryResponse(rsp *http.Response) (*CatalogV2CreateEntryResponse, error) { +// ParseCustomFieldsV2CreateResponse parses an HTTP response from a CustomFieldsV2CreateWithResponse call +func ParseCustomFieldsV2CreateResponse(rsp *http.Response) (*CustomFieldsV2CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2CreateEntryResponse{ + response := &CustomFieldsV2CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateEntryResponseBody + var dest ShowResponseBody5 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8558,15 +11720,15 @@ func ParseCatalogV2CreateEntryResponse(rsp *http.Response) (*CatalogV2CreateEntr return response, nil } -// ParseCatalogV2DestroyEntryResponse parses an HTTP response from a CatalogV2DestroyEntryWithResponse call -func ParseCatalogV2DestroyEntryResponse(rsp *http.Response) (*CatalogV2DestroyEntryResponse, error) { +// ParseCustomFieldsV2DeleteResponse parses an HTTP response from a CustomFieldsV2DeleteWithResponse call +func ParseCustomFieldsV2DeleteResponse(rsp *http.Response) (*CustomFieldsV2DeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2DestroyEntryResponse{ + response := &CustomFieldsV2DeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -8574,22 +11736,22 @@ func ParseCatalogV2DestroyEntryResponse(rsp *http.Response) (*CatalogV2DestroyEn return response, nil } -// ParseCatalogV2ShowEntryResponse parses an HTTP response from a CatalogV2ShowEntryWithResponse call -func ParseCatalogV2ShowEntryResponse(rsp *http.Response) (*CatalogV2ShowEntryResponse, error) { +// ParseCustomFieldsV2ShowResponse parses an HTTP response from a CustomFieldsV2ShowWithResponse call +func ParseCustomFieldsV2ShowResponse(rsp *http.Response) (*CustomFieldsV2ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2ShowEntryResponse{ + response := &CustomFieldsV2ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowEntryResponseBody + var dest ShowResponseBody5 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8600,22 +11762,22 @@ func ParseCatalogV2ShowEntryResponse(rsp *http.Response) (*CatalogV2ShowEntryRes return response, nil } -// ParseCatalogV2UpdateEntryResponse parses an HTTP response from a CatalogV2UpdateEntryWithResponse call -func ParseCatalogV2UpdateEntryResponse(rsp *http.Response) (*CatalogV2UpdateEntryResponse, error) { +// ParseCustomFieldsV2UpdateResponse parses an HTTP response from a CustomFieldsV2UpdateWithResponse call +func ParseCustomFieldsV2UpdateResponse(rsp *http.Response) (*CustomFieldsV2UpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2UpdateEntryResponse{ + response := &CustomFieldsV2UpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowEntryResponseBody + var dest ShowResponseBody5 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8626,22 +11788,22 @@ func ParseCatalogV2UpdateEntryResponse(rsp *http.Response) (*CatalogV2UpdateEntr return response, nil } -// ParseCatalogV2ListResourcesResponse parses an HTTP response from a CatalogV2ListResourcesWithResponse call -func ParseCatalogV2ListResourcesResponse(rsp *http.Response) (*CatalogV2ListResourcesResponse, error) { +// ParseFollowUpsV2ListResponse parses an HTTP response from a FollowUpsV2ListWithResponse call +func ParseFollowUpsV2ListResponse(rsp *http.Response) (*FollowUpsV2ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2ListResourcesResponse{ + response := &FollowUpsV2ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResourcesResponseBody + var dest ListResponseBody6 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8652,22 +11814,22 @@ func ParseCatalogV2ListResourcesResponse(rsp *http.Response) (*CatalogV2ListReso return response, nil } -// ParseCatalogV2ListTypesResponse parses an HTTP response from a CatalogV2ListTypesWithResponse call -func ParseCatalogV2ListTypesResponse(rsp *http.Response) (*CatalogV2ListTypesResponse, error) { +// ParseFollowUpsV2ShowResponse parses an HTTP response from a FollowUpsV2ShowWithResponse call +func ParseFollowUpsV2ShowResponse(rsp *http.Response) (*FollowUpsV2ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2ListTypesResponse{ + response := &FollowUpsV2ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTypesResponseBody + var dest ShowResponseBody6 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8678,90 +11840,90 @@ func ParseCatalogV2ListTypesResponse(rsp *http.Response) (*CatalogV2ListTypesRes return response, nil } -// ParseCatalogV2CreateTypeResponse parses an HTTP response from a CatalogV2CreateTypeWithResponse call -func ParseCatalogV2CreateTypeResponse(rsp *http.Response) (*CatalogV2CreateTypeResponse, error) { +// ParseIncidentRolesV2ListResponse parses an HTTP response from a IncidentRolesV2ListWithResponse call +func ParseIncidentRolesV2ListResponse(rsp *http.Response) (*IncidentRolesV2ListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2CreateTypeResponse{ + response := &IncidentRolesV2ListResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateTypeResponseBody + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody9 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest } return response, nil } -// ParseCatalogV2DestroyTypeResponse parses an HTTP response from a CatalogV2DestroyTypeWithResponse call -func ParseCatalogV2DestroyTypeResponse(rsp *http.Response) (*CatalogV2DestroyTypeResponse, error) { +// ParseIncidentRolesV2CreateResponse parses an HTTP response from a IncidentRolesV2CreateWithResponse call +func ParseIncidentRolesV2CreateResponse(rsp *http.Response) (*IncidentRolesV2CreateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2DestroyTypeResponse{ + response := &IncidentRolesV2CreateResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ShowResponseBody8 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + return response, nil } -// ParseCatalogV2ShowTypeResponse parses an HTTP response from a CatalogV2ShowTypeWithResponse call -func ParseCatalogV2ShowTypeResponse(rsp *http.Response) (*CatalogV2ShowTypeResponse, error) { +// ParseIncidentRolesV2DeleteResponse parses an HTTP response from a IncidentRolesV2DeleteWithResponse call +func ParseIncidentRolesV2DeleteResponse(rsp *http.Response) (*IncidentRolesV2DeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2ShowTypeResponse{ + response := &IncidentRolesV2DeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CreateTypeResponseBody - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - } - return response, nil } -// ParseCatalogV2UpdateTypeResponse parses an HTTP response from a CatalogV2UpdateTypeWithResponse call -func ParseCatalogV2UpdateTypeResponse(rsp *http.Response) (*CatalogV2UpdateTypeResponse, error) { +// ParseIncidentRolesV2ShowResponse parses an HTTP response from a IncidentRolesV2ShowWithResponse call +func ParseIncidentRolesV2ShowResponse(rsp *http.Response) (*IncidentRolesV2ShowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2UpdateTypeResponse{ + response := &IncidentRolesV2ShowResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CreateTypeResponseBody + var dest ShowResponseBody8 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8772,22 +11934,22 @@ func ParseCatalogV2UpdateTypeResponse(rsp *http.Response) (*CatalogV2UpdateTypeR return response, nil } -// ParseCatalogV2UpdateTypeSchemaResponse parses an HTTP response from a CatalogV2UpdateTypeSchemaWithResponse call -func ParseCatalogV2UpdateTypeSchemaResponse(rsp *http.Response) (*CatalogV2UpdateTypeSchemaResponse, error) { +// ParseIncidentRolesV2UpdateResponse parses an HTTP response from a IncidentRolesV2UpdateWithResponse call +func ParseIncidentRolesV2UpdateResponse(rsp *http.Response) (*IncidentRolesV2UpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CatalogV2UpdateTypeSchemaResponse{ + response := &IncidentRolesV2UpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CreateTypeResponseBody + var dest ShowResponseBody8 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8813,7 +11975,7 @@ func ParseIncidentTimestampsV2ListResponse(rsp *http.Response) (*IncidentTimesta switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody7 + var dest ListResponseBody11 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8839,7 +12001,7 @@ func ParseIncidentTimestampsV2ShowResponse(rsp *http.Response) (*IncidentTimesta switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody6 + var dest ShowResponseBody10 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8865,7 +12027,7 @@ func ParseIncidentUpdatesV2ListResponse(rsp *http.Response) (*IncidentUpdatesV2L switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody9 + var dest ListResponseBody13 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8891,7 +12053,7 @@ func ParseIncidentsV2ListResponse(rsp *http.Response) (*IncidentsV2ListResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListResponseBody11 + var dest ListResponseBody15 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8917,7 +12079,7 @@ func ParseIncidentsV2CreateResponse(rsp *http.Response) (*IncidentsV2CreateRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody9 + var dest ShowResponseBody13 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8943,7 +12105,7 @@ func ParseIncidentsV2ShowResponse(rsp *http.Response) (*IncidentsV2ShowResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody9 + var dest ShowResponseBody13 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8969,7 +12131,59 @@ func ParseIncidentsV2EditResponse(rsp *http.Response) (*IncidentsV2EditResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ShowResponseBody9 + var dest ShowResponseBody13 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUsersV2ListResponse parses an HTTP response from a UsersV2ListWithResponse call +func ParseUsersV2ListResponse(rsp *http.Response) (*UsersV2ListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UsersV2ListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListResponseBody17 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUsersV2ShowResponse parses an HTTP response from a UsersV2ShowWithResponse call +func ParseUsersV2ShowResponse(rsp *http.Response) (*UsersV2ShowResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UsersV2ShowResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ShowResponseBody15 if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/client/openapi3.json b/client/openapi3.json index 9291f85..035339a 100644 --- a/client/openapi3.json +++ b/client/openapi3.json @@ -13,68 +13,60 @@ "paths": { "/v1/actions": { "get": { - "tags": [ - "Actions V1" - ], - "summary": "List Actions V1", "description": "List all actions for an organisation.", "operationId": "Actions V1#List", "parameters": [ { - "name": "incident_id", - "in": "query", - "description": "Find actions related to this incident", "allowEmptyValue": true, + "description": "Find actions related to this incident", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "query", + "name": "incident_id", "schema": { - "type": "string", "description": "Find actions related to this incident", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } }, { - "name": "is_follow_up", - "in": "query", - "description": "Filter to actions marked as being follow up actions", "allowEmptyValue": true, + "description": "Filter to actions marked as being follow up actions", + "example": true, + "in": "query", + "name": "is_follow_up", "schema": { - "type": "boolean", "description": "Filter to actions marked as being follow up actions", - "example": true - }, - "example": true + "example": true, + "type": "boolean" + } }, { - "name": "incident_mode", - "in": "query", - "description": "Filter to actions from incidents of the given mode. If not set, only actions from `real` incidents are returned", "allowEmptyValue": true, + "description": "Filter to actions from incidents of the given mode. If not set, only actions from `real` incidents are returned", + "examples": { + "default": { + "summary": "default", + "value": "real" + } + }, + "in": "query", + "name": "incident_mode", "schema": { - "type": "string", "description": "Filter to actions from incidents of the given mode. If not set, only actions from `real` incidents are returned", - "example": "real", "enum": [ "real", "test", "tutorial" - ] - }, - "examples": { - "default": { - "summary": "default", - "value": "real" - } + ], + "example": "real", + "type": "string" } } ], "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponseBody" - }, "example": { "actions": [ { @@ -100,43 +92,44 @@ "updated_at": "2021-08-17T13:28:57.801578Z" } ] + }, + "schema": { + "$ref": "#/components/schemas/ListResponseBody" } } - } + }, + "description": "OK response." } - } + }, + "summary": "List Actions V1", + "tags": [ + "Actions V1" + ], + "deprecated": true } }, "/v1/actions/{id}": { "get": { - "tags": [ - "Actions V1" - ], - "summary": "Show Actions V1", "description": "Get a single incident action.", "operationId": "Actions V1#Show", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the action", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody" - }, "example": { "action": { "assignee": { @@ -160,11 +153,20 @@ "status": "outstanding", "updated_at": "2021-08-17T13:28:57.801578Z" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody" } } - } + }, + "description": "OK response." } - } + }, + "summary": "Show Actions V1", + "tags": [ + "Actions V1" + ], + "deprecated": true } }, "/v1/custom_field_options": { @@ -222,7 +224,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody2" + "$ref": "#/components/schemas/ListResponseBody3" }, "example": { "custom_field_options": [ @@ -232,7 +234,11 @@ "sort_key": 10, "value": "Product" } - ] + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + } } } } @@ -267,7 +273,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody2" + "$ref": "#/components/schemas/ShowResponseBody3" }, "example": { "custom_field_option": { @@ -338,7 +344,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody2" + "$ref": "#/components/schemas/ShowResponseBody3" }, "example": { "custom_field_option": { @@ -394,7 +400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody2" + "$ref": "#/components/schemas/ShowResponseBody3" }, "example": { "custom_field_option": { @@ -412,23 +418,16 @@ }, "/v1/custom_fields": { "get": { - "tags": [ - "Custom Fields V1" - ], - "summary": "List Custom Fields V1", "description": "List all custom fields for an organisation.", "operationId": "Custom Fields V1#List", "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponseBody3" - }, "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", @@ -443,6 +442,7 @@ } ], "required": "never", + "required_v2": "never", "show_before_closure": true, "show_before_creation": true, "show_before_update": true, @@ -450,49 +450,52 @@ "updated_at": "2021-08-17T13:28:57.801578Z" } ] + }, + "schema": { + "$ref": "#/components/schemas/ListResponseBody4" } } - } + }, + "description": "OK response." } - } - }, - "post": { + }, + "summary": "List Custom Fields V1", "tags": [ "Custom Fields V1" ], - "summary": "Create Custom Fields V1", + "deprecated": true + }, + "post": { "description": "Create a new custom field", "operationId": "Custom Fields V1#Create", "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRequestBody2" - }, "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 + }, + "schema": { + "$ref": "#/components/schemas/CreateRequestBody2" } } - } + }, + "required": true }, "responses": { "201": { - "description": "Created response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody3" - }, "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", @@ -507,78 +510,82 @@ } ], "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" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody4" } } - } + }, + "description": "Created response." } - } + }, + "summary": "Create Custom Fields V1", + "tags": [ + "Custom Fields V1" + ], + "deprecated": true } }, "/v1/custom_fields/{id}": { "delete": { - "tags": [ - "Custom Fields V1" - ], - "summary": "Delete Custom Fields V1", "description": "Delete a custom field", "operationId": "Custom Fields V1#Delete", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "responses": { "204": { "description": "No Content response." } - } - }, - "get": { + }, + "summary": "Delete Custom Fields V1", "tags": [ "Custom Fields V1" ], - "summary": "Show Custom Fields V1", + "deprecated": true + }, + "get": { "description": "Get a single custom field.", "operationId": "Custom Fields V1#Show", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody3" - }, "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", @@ -593,68 +600,72 @@ } ], "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" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody4" } } - } + }, + "description": "OK response." } - } - }, - "put": { + }, + "summary": "Show Custom Fields V1", "tags": [ "Custom Fields V1" ], - "summary": "Update Custom Fields V1", + "deprecated": true + }, + "put": { "description": "Update the details of a custom field", "operationId": "Custom Fields V1#Update", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the custom field", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRequestBody2" - }, "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 + }, + "schema": { + "$ref": "#/components/schemas/UpdateRequestBody2" } } - } + }, + "required": true }, "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody3" - }, "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", @@ -669,17 +680,27 @@ } ], "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" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody4" } } - } + }, + "description": "OK response." } - } + }, + "summary": "Update Custom Fields V1", + "tags": [ + "Custom Fields V1" + ], + "deprecated": true } }, "/v1/identity": { @@ -700,6 +721,7 @@ }, "example": { "identity": { + "dashboard_url": "https://app.incident.io/my-org", "name": "Alertmanager token", "roles": [ "incident_creator" @@ -759,9 +781,12 @@ "opsgenie_alert", "datadog_monitor_alert", "github_pull_request", + "gitlab_merge_request", "sentry_issue", "atlassian_statuspage_incident", "zendesk_ticket", + "google_calendar_event", + "scrubbed", "statuspage_incident" ] }, @@ -779,7 +804,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody4" + "$ref": "#/components/schemas/ListResponseBody7" }, "example": { "incident_attachments": [ @@ -812,7 +837,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody3" + "$ref": "#/components/schemas/CreateRequestBody4" }, "example": { "incident_id": "01FDAG4SAP5TYPT98WGR2N7W91", @@ -879,22 +904,94 @@ } } }, - "/v1/incident_roles": { - "get": { + "/v1/incident_memberships": { + "post": { "tags": [ - "Incident Roles V1" + "Incident Memberships V1" ], - "summary": "List Incident Roles V1", + "summary": "Create Incident Memberships V1", + "description": "Makes a user a member of a private incident", + "operationId": "Incident Memberships V1#Create", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRequestBody5" + }, + "example": { + "incident_id": "01ET65M7ZADYFCKD4K1AE2QNMC", + "user_id": "01FCQSP07Z74QMMYPDDGQB9FTG" + } + } + } + }, + "responses": { + "201": { + "description": "Created response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResponseBody2" + }, + "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" + } + } + } + } + } + } + } + } + }, + "/v1/incident_memberships/actions/revoke": { + "post": { + "tags": [ + "Incident Memberships V1" + ], + "summary": "Revoke Incident Memberships V1", + "description": "Revoke a user's membership of a private incident", + "operationId": "Incident Memberships V1#Revoke", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRequestBody5" + }, + "example": { + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "user_id": "01FCQSP07Z74QMMYPDDGQB9FTG" + } + } + } + }, + "responses": { + "204": { + "description": "No Content response." + } + } + } + }, + "/v1/incident_roles": { + "get": { "description": "List all incident roles for an organisation.", "operationId": "Incident Roles V1#List", "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResponseBody5" - }, "example": { "incident_roles": [ { @@ -903,50 +1000,51 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } ] + }, + "schema": { + "$ref": "#/components/schemas/ListResponseBody8" } } - } + }, + "description": "OK response." } - } - }, - "post": { + }, + "summary": "List Incident Roles V1", "tags": [ "Incident Roles V1" ], - "summary": "Create Incident Roles V1", + "deprecated": true + }, + "post": { "description": "Create a new incident role", "operationId": "Incident Roles V1#Create", "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRequestBody4" - }, "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": true, + "required": false, "shortform": "lead" + }, + "schema": { + "$ref": "#/components/schemas/CreateRequestBody6" } } - } + }, + "required": true }, "responses": { "201": { - "description": "Created response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody4" - }, "example": { "incident_role": { "created_at": "2021-08-17T13:28:57.801578Z", @@ -954,75 +1052,77 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody7" } } - } + }, + "description": "Created response." } - } + }, + "summary": "Create Incident Roles V1", + "tags": [ + "Incident Roles V1" + ], + "deprecated": true } }, "/v1/incident_roles/{id}": { "delete": { - "tags": [ - "Incident Roles V1" - ], - "summary": "Delete Incident Roles V1", "description": "Removes an existing role", "operationId": "Incident Roles V1#Delete", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "responses": { "204": { "description": "No Content response." } - } - }, - "get": { + }, + "summary": "Delete Incident Roles V1", "tags": [ "Incident Roles V1" ], - "summary": "Show Incident Roles V1", + "deprecated": true + }, + "get": { "description": "Get a single incident role.", "operationId": "Incident Roles V1#Show", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody4" - }, "example": { "incident_role": { "created_at": "2021-08-17T13:28:57.801578Z", @@ -1030,63 +1130,64 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody7" } } - } + }, + "description": "OK response." } - } - }, - "put": { + }, + "summary": "Show Incident Roles V1", "tags": [ "Incident Roles V1" ], - "summary": "Update Incident Roles V1", + "deprecated": true + }, + "put": { "description": "Update an existing incident role", "operationId": "Incident Roles V1#Update", "parameters": [ { - "name": "id", - "in": "path", "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "example": "01FCNDV6P870EA6S7TK1DSYDG0", + "type": "string" + } } ], "requestBody": { - "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRequestBody3" - }, "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": true, + "required": false, "shortform": "lead" + }, + "schema": { + "$ref": "#/components/schemas/UpdateRequestBody4" } } - } + }, + "required": true }, "responses": { "200": { - "description": "OK response.", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody4" - }, "example": { "incident_role": { "created_at": "2021-08-17T13:28:57.801578Z", @@ -1094,33 +1195,42 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } + }, + "schema": { + "$ref": "#/components/schemas/ShowResponseBody7" } } - } + }, + "description": "OK response." } - } + }, + "summary": "Update Incident Roles V1", + "tags": [ + "Incident Roles V1" + ], + "deprecated": true } }, "/v1/incident_statuses": { "get": { "tags": [ - "IncidentStatuses V1" + "Incident Statuses V1" ], - "summary": "List IncidentStatuses V1", + "summary": "List Incident Statuses V1", "description": "List all incident statuses for an organisation.", - "operationId": "IncidentStatuses V1#List", + "operationId": "Incident Statuses V1#List", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody6" + "$ref": "#/components/schemas/ListResponseBody10" }, "example": { "incident_statuses": [ @@ -1142,17 +1252,17 @@ }, "post": { "tags": [ - "IncidentStatuses V1" + "Incident Statuses V1" ], - "summary": "Create IncidentStatuses V1", + "summary": "Create Incident Statuses V1", "description": "Create a new incident status", - "operationId": "IncidentStatuses V1#Create", + "operationId": "Incident Statuses V1#Create", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody5" + "$ref": "#/components/schemas/CreateRequestBody8" }, "example": { "category": "live", @@ -1168,7 +1278,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/ShowResponseBody9" }, "example": { "incident_status": { @@ -1190,11 +1300,11 @@ "/v1/incident_statuses/{id}": { "delete": { "tags": [ - "IncidentStatuses V1" + "Incident Statuses V1" ], - "summary": "Delete IncidentStatuses V1", + "summary": "Delete Incident Statuses V1", "description": "Delete an incident status", - "operationId": "IncidentStatuses V1#Delete", + "operationId": "Incident Statuses V1#Delete", "parameters": [ { "name": "id", @@ -1217,11 +1327,11 @@ }, "get": { "tags": [ - "IncidentStatuses V1" + "Incident Statuses V1" ], - "summary": "Show IncidentStatuses V1", + "summary": "Show Incident Statuses V1", "description": "Get a single incident status.", - "operationId": "IncidentStatuses V1#Show", + "operationId": "Incident Statuses V1#Show", "parameters": [ { "name": "id", @@ -1242,7 +1352,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/ShowResponseBody9" }, "example": { "incident_status": { @@ -1262,11 +1372,11 @@ }, "put": { "tags": [ - "IncidentStatuses V1" + "Incident Statuses V1" ], - "summary": "Update IncidentStatuses V1", + "summary": "Update Incident Statuses V1", "description": "Update an existing incident status", - "operationId": "IncidentStatuses V1#Update", + "operationId": "Incident Statuses V1#Update", "parameters": [ { "name": "id", @@ -1286,7 +1396,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRequestBody4" + "$ref": "#/components/schemas/UpdateRequestBody6" }, "example": { "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", @@ -1301,7 +1411,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody5" + "$ref": "#/components/schemas/ShowResponseBody9" }, "example": { "incident_status": { @@ -1334,7 +1444,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody8" + "$ref": "#/components/schemas/ListResponseBody12" }, "example": { "incident_types": [ @@ -1384,7 +1494,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody7" + "$ref": "#/components/schemas/ShowResponseBody11" }, "example": { "incident_type": { @@ -1419,6 +1529,7 @@ "default": 25, "description": "Integer number of records to return", "example": 25, + "format": "int64", "maximum": 500, "type": "integer" } @@ -1501,6 +1612,15 @@ }, "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": { @@ -1530,7 +1650,7 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" @@ -1582,7 +1702,7 @@ } }, "schema": { - "$ref": "#/components/schemas/ListResponseBody10" + "$ref": "#/components/schemas/ListResponseBody14" } } }, @@ -1608,6 +1728,7 @@ "values": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", "value_link": "https://google.com/", "value_numeric": "123.456", "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", @@ -1640,7 +1761,7 @@ "visibility": "public" }, "schema": { - "$ref": "#/components/schemas/CreateRequestBody6" + "$ref": "#/components/schemas/CreateRequestBody9" } } }, @@ -1685,6 +1806,15 @@ }, "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": { @@ -1714,7 +1844,7 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" @@ -1760,7 +1890,7 @@ } }, "schema": { - "$ref": "#/components/schemas/ShowResponseBody8" + "$ref": "#/components/schemas/ShowResponseBody12" } } }, @@ -1831,6 +1961,15 @@ }, "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": { @@ -1860,7 +1999,7 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" @@ -1906,7 +2045,7 @@ } }, "schema": { - "$ref": "#/components/schemas/ShowResponseBody8" + "$ref": "#/components/schemas/ShowResponseBody12" } } }, @@ -1945,6 +2084,31 @@ } } }, + "/v1/openapiV3.json": { + "get": { + "tags": [ + "Utilities V1" + ], + "summary": "OpenAPIV3 Utilities V1", + "description": "Get the OpenAPI (v3) definition.", + "operationId": "Utilities V1#OpenAPIV3", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "{}", + "format": "binary" + }, + "example": "{}" + } + } + } + } + } + }, "/v1/severities": { "get": { "tags": [ @@ -1959,7 +2123,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody12" + "$ref": "#/components/schemas/ListResponseBody16" }, "example": { "severities": [ @@ -1990,7 +2154,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody8" + "$ref": "#/components/schemas/CreateRequestBody11" }, "example": { "description": "Issues with **low impact**.", @@ -2006,7 +2170,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody10" + "$ref": "#/components/schemas/ShowResponseBody14" }, "example": { "severity": { @@ -2079,7 +2243,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody10" + "$ref": "#/components/schemas/ShowResponseBody14" }, "example": { "severity": { @@ -2122,7 +2286,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestBody8" + "$ref": "#/components/schemas/CreateRequestBody11" }, "example": { "description": "Issues with **low impact**.", @@ -2138,7 +2302,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody10" + "$ref": "#/components/schemas/ShowResponseBody14" }, "example": { "severity": { @@ -2156,10 +2320,219 @@ } } }, - "/v2/catalog_entries": { + "/v2/actions": { "get": { "tags": [ - "Catalog V2" + "Actions V2" + ], + "summary": "List Actions V2", + "description": "List all actions for an organisation.", + "operationId": "Actions V2#List", + "parameters": [ + { + "name": "incident_id", + "in": "query", + "description": "Find actions related to this incident", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "Find actions related to this incident", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + { + "name": "incident_mode", + "in": "query", + "description": "Filter to actions from incidents of the given mode. If not set, only actions from `standard` and `retrospective` incidents are returned", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "Filter to actions from incidents of the given mode. If not set, only actions from `standard` and `retrospective` incidents are returned", + "example": "standard", + "enum": [ + "standard", + "retrospective", + "test", + "tutorial" + ] + }, + "examples": { + "default": { + "summary": "default", + "value": "standard" + } + } + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseBody2" + }, + "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" + } + ] + } + } + } + } + } + } + }, + "/v2/actions/{id}": { + "get": { + "tags": [ + "Actions V2" + ], + "summary": "Show Actions V2", + "description": "Get a single incident action.", + "operationId": "Actions V2#Show", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier for the action", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody2" + }, + "example": { + "action": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + } + } + } + } + } + }, + "/v2/alert_events/http/{alert_source_config_id}": { + "post": { + "tags": [ + "Alert Events V2" + ], + "summary": "CreateHTTP Alert Events V2", + "description": "Create an alert event using an HTTP source.", + "operationId": "Alert Events V2#CreateHTTP", + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Token used to authenticate the request, generated when configuring the alert source. Will be consumed via a URL query string parameter", + "allowEmptyValue": true, + "schema": { + "type": "string", + "description": "Token used to authenticate the request, generated when configuring the alert source. Will be consumed via a URL query string parameter", + "example": "some-random-string" + }, + "example": "some-random-string" + }, + { + "name": "alert_source_config_id", + "in": "path", + "description": "Which alert source config produced this alert", + "required": true, + "schema": { + "type": "string", + "description": "Which alert source config produced this alert", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "example": "01GW2G3V0S59R238FAHPDS1R66" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHTTPRequestBody" + }, + "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" + } + } + } + }, + "responses": { + "202": { + "description": "Accepted response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHTTPResponseBody" + }, + "example": { + "deduplication_key": "unique-key", + "message": "Event accepted for processing", + "status": "success" + } + } + } + } + } + } + }, + "/v2/catalog_entries": { + "get": { + "tags": [ + "Catalog V2" ], "summary": "ListEntries Catalog V2", "description": "List entries for a catalog type.", @@ -2188,7 +2561,8 @@ "description": "Integer number of records to return", "default": 25, "example": 25, - "maximum": 500 + "format": "int64", + "maximum": 250 }, "example": 25 }, @@ -2220,33 +2594,44 @@ "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", - "sort_key": "000020" + "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", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" } } }, @@ -2263,16 +2648,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2280,7 +2667,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2288,6 +2677,7 @@ "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" }, @@ -2306,7 +2696,7 @@ "Catalog V2" ], "summary": "CreateEntry Catalog V2", - "description": "Create an entry for a type in the catalog.", + "description": "Create an entry within the catalog. We support a maximum of 50,000 entries per type.", "operationId": "Catalog V2#CreateEntry", "requestBody": { "required": true, @@ -2324,11 +2714,13 @@ "abc123": { "array_value": [ { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } ], "value": { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } } }, @@ -2354,33 +2746,44 @@ "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", - "sort_key": "000020" + "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", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" } } }, @@ -2411,11 +2814,11 @@ { "name": "id", "in": "path", - "description": "ID of this resource", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2438,11 +2841,11 @@ { "name": "id", "in": "path", - "description": "ID of this resource", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2462,33 +2865,44 @@ "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", - "sort_key": "000020" + "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", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" } } }, @@ -2504,16 +2918,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2521,7 +2937,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2529,6 +2947,7 @@ "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" } @@ -2549,11 +2968,11 @@ { "name": "id", "in": "path", - "description": "ID of this resource", + "description": "ID of this catalog entry", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog entry", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2575,11 +2994,13 @@ "abc123": { "array_value": [ { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } ], "value": { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } } }, @@ -2604,33 +3025,44 @@ "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", - "sort_key": "000020" + "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", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" } } }, @@ -2646,16 +3078,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2663,7 +3097,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2671,6 +3107,7 @@ "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" } @@ -2687,7 +3124,7 @@ "Catalog V2" ], "summary": "ListResources Catalog V2", - "description": "List available engine resources for the catalog", + "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": { @@ -2736,16 +3173,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2753,7 +3192,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2761,6 +3202,7 @@ "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" } @@ -2776,7 +3218,7 @@ "Catalog V2" ], "summary": "CreateType Catalog V2", - "description": "Create a catalog type.", + "description": "Create a catalog type. The schema must be updated using the UpdateTypeSchema endpoint.", "operationId": "Catalog V2#CreateType", "requestBody": { "required": true, @@ -2789,12 +3231,12 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "color": "yellow", "description": "Represents Kubernetes clusters that we run inside of GKE.", "icon": "bolt", "name": "Kubernetes Cluster", "ranked": true, - "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", "type_name": "Custom[\"BackstageGroup\"]" } } @@ -2813,16 +3255,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2830,7 +3274,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2838,6 +3284,7 @@ "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" } @@ -2860,11 +3307,11 @@ { "name": "id", "in": "path", - "description": "ID of this resource", + "description": "ID of this catalog type", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2887,11 +3334,11 @@ { "name": "id", "in": "path", - "description": "ID of this resource", + "description": "ID of this catalog type", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2910,16 +3357,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -2927,7 +3376,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -2935,6 +3386,7 @@ "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" } @@ -2949,17 +3401,17 @@ "Catalog V2" ], "summary": "UpdateType Catalog V2", - "description": "Updates an existing catalog type.", + "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 resource", + "description": "ID of this catalog type", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -2976,12 +3428,12 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "color": "yellow", "description": "Represents Kubernetes clusters that we run inside of GKE.", "icon": "bolt", "name": "Kubernetes Cluster", "ranked": true, - "semantic_type": "custom" + "source_repo_url": "https://github.com/my-company/incident-io-catalog" } } } @@ -2999,16 +3451,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -3016,7 +3470,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -3024,6 +3480,7 @@ "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" } @@ -3040,17 +3497,17 @@ "Catalog V2" ], "summary": "UpdateTypeSchema Catalog V2", - "description": "Update an existing catalog types schema, adding or removing attributes.", + "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 resource", + "description": "ID of this catalog type", "required": true, "schema": { "type": "string", - "description": "ID of this resource", + "description": "ID of this catalog type", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, "example": "01FCNDV6P870EA6S7TK1DSYDG0" @@ -3067,7 +3524,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -3090,16 +3549,18 @@ "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -3107,7 +3568,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -3115,6 +3578,7 @@ "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" } @@ -3125,28 +3589,32 @@ } } }, - "/v2/incident_timestamps": { + "/v2/custom_fields": { "get": { "tags": [ - "Incident Timestamps V2" + "Custom Fields V2" ], - "summary": "List Incident Timestamps V2", - "description": "List all incident timestamps for an organisation.", - "operationId": "Incident Timestamps 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/ListResponseBody7" + "$ref": "#/components/schemas/ListResponseBody5" }, "example": { - "incident_timestamps": [ + "custom_fields": [ { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "updated_at": "2021-08-17T13:28:57.801578Z" } ] } @@ -3154,97 +3622,225 @@ } } } - } - }, - "/v2/incident_timestamps/{id}": { - "get": { + }, + "post": { "tags": [ - "Incident Timestamps V2" + "Custom Fields 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" + "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/CreateRequestBody3" + }, + "example": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "name": "Affected Team" + } + } } - ], + }, "responses": { - "200": { - "description": "OK response.", + "201": { + "description": "Created response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody6" + "$ref": "#/components/schemas/ShowResponseBody5" }, "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } - } - } - } + "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" + } + } + } + } } } } }, - "/v2/incident_updates": { + "/v2/custom_fields/{id}": { + "delete": { + "tags": [ + "Custom Fields V2" + ], + "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 custom field", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "204": { + "description": "No Content response." + } + } + }, "get": { "tags": [ - "Incident Updates V2" + "Custom Fields 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": "Show Custom Fields V2", + "description": "Get a single custom field.", + "operationId": "Custom Fields V2#Show", "parameters": [ { - "name": "incident_id", - "in": "query", - "description": "Incident whose updates you want to list", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "Unique identifier for the custom field", + "required": true, "schema": { "type": "string", - "description": "Incident whose updates you want to list", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" - }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody5" + }, + "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" + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Custom Fields V2" + ], + "summary": "Update Custom Fields V2", + "description": "Update the details of a custom field", + "operationId": "Custom Fields V2#Update", + "parameters": [ { - "name": "page_size", + "name": "id", + "in": "path", + "description": "Unique identifier for the custom field", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the custom field", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRequestBody3" + }, + "example": { + "description": "Which team is impacted by this issue", + "name": "Affected Team" + } + } + } + }, + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody5" + }, + "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" + } + } + } + } + } + } + } + }, + "/v2/follow_ups": { + "get": { + "tags": [ + "Follow-ups V2" + ], + "summary": "List Follow-ups V2", + "description": "List all follow-ups for an organisation.", + "operationId": "Follow-ups V2#List", + "parameters": [ + { + "name": "incident_id", "in": "query", - "description": "Integer number of records to return", + "description": "Find follow-ups related to this incident", "allowEmptyValue": true, "schema": { - "type": "integer", - "description": "Integer number of records to return", - "default": 25, - "example": 25, - "maximum": 500 + "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 record's ID. This endpoint will return a list of records 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 record's ID. This endpoint will return a list of records 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" + ] }, - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "example": "standard" } ], "responses": { @@ -3253,51 +3849,39 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody9" + "$ref": "#/components/schemas/ListResponseBody6" }, "example": { - "incident_updates": [ + "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", - "message": "The cat is getting irritable, best rescue it soon", - "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" + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 }, - "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" - } - } + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } + ] } } } @@ -3305,361 +3889,223 @@ } } }, - "/v2/incidents": { + "/v2/follow_ups/{id}": { "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 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 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": "Show Follow-ups V2", + "description": "Get a single incident follow-up.", + "operationId": "Follow-ups V2#Show", "parameters": [ { - "name": "page_size", - "in": "query", - "description": "number of records to return", - "allowEmptyValue": true, - "schema": { - "type": "integer", - "description": "number of records to return", - "default": 25, - "example": 25, - "format": "int64" - }, - "example": 25 - }, - { - "name": "after", - "in": "query", - "description": "An incident's ID. This endpoint will return a list of incidents after this ID in relation to the API response order.", - "allowEmptyValue": true, + "name": "id", + "in": "path", + "description": "Unique identifier for the follow-up", + "required": 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": "Unique identifier for the follow-up", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "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": "value" - }, - "example": [ - "value" - ] - } - }, - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - } - }, - { - "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": "value" + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody6" }, - "example": [ - "value" - ] + "example": { + "follow_up": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } } - }, - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] } - }, - { - "name": "incident_type", - "in": "query", - "description": "Filter on incident type. The accepted operator is 'one_of'.", - "allowEmptyValue": true, - "schema": { - "type": "object", - "description": "Filter on incident type. The accepted operator is 'one_of'.", - "example": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "value" + } + } + } + }, + "/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/ListResponseBody9" }, - "example": [ - "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": { - "key": [ - "value" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "value" - }, - "example": [ - "value" + "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" + } ] } } - }, - "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" - ] - } + } + } + }, + "post": { + "tags": [ + "Incident Roles V2" + ], + "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/CreateRequestBody7" }, - "additionalProperties": { - "type": "object", - "example": { - "key": [ - "value" - ] - }, - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": "value" - }, - "example": [ - "value" - ] - } - } - }, - "example": { - "01GBSQF3FHF7FWZQNWGHAVQ804": { - "one_of": [ - "01GBSQF3FHF7FWZQNWGHAVQ804", - "01ET65M7ZARSFZ6TFDFVQDN9AA" - ] + "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" } } } - ], + }, "responses": { - "200": { - "description": "OK response.", + "201": { + "description": "Created response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseBody11" + "$ref": "#/components/schemas/ShowResponseBody8" }, "example": { - "incidents": [ - { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_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" - } - ] - } - ], - "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": true, - "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" - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + "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" + } + } + } + } + } + } + } + }, + "/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": [ + "Incident Roles V2" + ], + "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 role", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody8" + }, + "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" } } } @@ -3667,65 +4113,39 @@ } } }, - "post": { + "put": { "tags": [ - "Incidents V2" + "Incident Roles V2" + ], + "summary": "Update Incident Roles V2", + "description": "Update an existing incident role", + "operationId": "Incident Roles V2#Update", + "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" + } ], - "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/CreateRequestBody7" + "$ref": "#/components/schemas/UpdateRequestBody5" }, "example": { - "custom_field_entries": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ - { - "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": { - "slack_channel_id": "abc123" - }, - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "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" } } } @@ -3736,134 +4156,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody9" + "$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_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" - } - ] - } - ], - "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": true, - "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" + "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" } } } @@ -3872,23 +4176,124 @@ } } }, - "/v2/incidents/{id}": { + "/v2/incident_timestamps": { "get": { "tags": [ - "Incidents V2" + "Incident Timestamps V2" ], - "summary": "Show Incidents V2", - "description": "Get a single incident.", - "operationId": "Incidents V2#Show", + "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" + }, + "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 identifier for the incident", + "description": "Unique ID of this incident timestamp", "required": true, "schema": { "type": "string", - "description": "Unique identifier for the incident", + "description": "Unique ID of this incident timestamp", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + }, + "example": "01FCNDV6P870EA6S7TK1DSYD5H" + } + ], + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowResponseBody10" + }, + "example": { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + } + } + } + } + } + } + }, + "/v2/incident_updates": { + "get": { + "tags": [ + "Incident Updates V2" + ], + "summary": "List Incident Updates V2", + "description": "List all incident updates for an organisation, or for a specific incident.", + "operationId": "Incident Updates V2#List", + "parameters": [ + { + "name": "incident_id", + "in": "query", + "description": "Incident whose updates you want to list", + "allowEmptyValue": 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 + }, + "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" @@ -3900,134 +4305,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShowResponseBody9" + "$ref": "#/components/schemas/ListResponseBody13" }, "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", + "incident_updates": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "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", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "name": "My test API key" }, - "values": [ - { - "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" - } - ] - } - ], - "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": { + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "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" + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 } } } @@ -4036,2147 +4357,6426 @@ } } }, - "/v2/incidents/{id}/actions/edit": { - "post": { + "/v2/incidents": { + "get": { "tags": [ "Incidents V2" ], - "summary": "Edit Incidents V2", - "description": "Edit an existing incident.\n\nThis endpoint allows you to edit the properties of an existing incident: e.g. set the severity or update custom fields.\n\nWhen using this endpoint, only fields that are provided will be edited (omitted fields \nwill be ignored).\n", - "operationId": "Incidents V2#Edit", + "summary": "List Incidents V2", + "description": "List all incidents for an organisation.\n\nThis endpoint supports a number of filters, which can help find incidents matching certain\ncriteria.\n\nFilters are provided as query parameters, but due to the dynamic nature of what you can\nquery by (different accounts have different custom fields, statuses, etc) they are more\ncomplex than most.\n\nTo help, here are some exemplar curl requests with a human description of what they search\nfor.\n\nNote that:\n- Filters may be used together, and the result will be incidents that match all filters.\n- IDs are normally in UUID format, but have been replaced with shorter strings to improve\nreadability.\n- All query parameters must be URI encoded.\n\n### By status\n\nWith status of id=ABC, find all incidents that are set to that status:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[one_of]=ABC'\n\nOr all incidents that are not set to status with id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status[not_in]=ABC'\n\n### By status category\n\nFind all incidents that are in a status category. Possible values are \"triage\",\n\"declined\", \"merged\", \"canceled\", \"live\", \"learning\" and \"closed\":\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[one_of]=live'\n\nOr all incidents that are not in a status category:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'status_category[not_in]=live'\n\n\n### By severity\n\nWith severity of id=ABC, find all incidents that are set to that severity:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[one_of]=ABC'\n\nOr all incidents where severity rank is greater-than-or-equal-to the rank of severity\nid=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[gte]=ABC'\n\nOr all incidents where severity rank is less-than-or-equal-to the rank of severity id=ABC:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'severity[lte]=ABC'\n\n### By incident type\n\nWith incident type of id=ABC, find all incidents that are of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[one_of]=ABC'\n\nOr all incidents not of that type:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_type[not_in]=ABC'\n\n### By incident mode\n\nBy default, we return standard and retrospective incidents. This means that test and\ntutorial incidents are filtered out. To override this behaviour, you can use the\nmode filter to specify which modes you want to get.\n\nTo find incidents of all modes:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=standard&mode[one_of]=retrospective&mode[one_of]=test&mode[one_of]=tutorial'\n\nTo find just test incidents:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'mode[one_of]=test'\n\n\n### By incident role\n\nRoles and custom fields have another nested layer in the query parameter, to account for\noperations against any of the roles or custom fields created in the account.\n\nWith incident role id=ABC, find all incidents where that role is unset:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=true'\n\nOr where the role has been set:\n\n\t\tcurl --get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'incident_role[ABC][is_blank]=false'\n\n### By option custom fields\n\nWith an option custom field id=ABC, all incidents that have field ABC set to the custom\nfield option of id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][one_of]=XYZ'\n\nOr all incidents that do not have custom field id=ABC set to option id=XYZ:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents' \\\n\t\t\t--data 'custom_field[ABC][not_in]=XYZ'\n", + "operationId": "Incidents V2#List", "parameters": [ { - "name": "id", - "in": "path", - "description": "The unique identifier of the incident that you want to edit", - "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": "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": "The unique identifier of the incident that you want to edit", - "example": "01G18REBY9AYH6CMWCJ2CVCYCH" + "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": "01G18REBY9AYH6CMWCJ2CVCYCH" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EditRequestBody" - }, + "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": { - "incident": { - "custom_field_entries": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ - { - "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_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." + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" }, - "notify_incident_channel": true + "example": [ + "some_value" + ] } + }, + "example": { + "one_of": [ + "01GBSQF3FHF7FWZQNWGHAVQ804" + ] } - } - }, - "responses": { - "200": { - "description": "OK response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShowResponseBody9" + }, + { + "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": { + "one_of": [ + "active" + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "some_value" }, - "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", + "example": [ + "some_value" + ] + } + }, + "example": { + "one_of": [ + "active" + ] + } + }, + { + "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" + ] + } + }, + "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" + ] + }, + "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" + ] + } + } + }, + "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/ListResponseBody15" + }, + "example": { + "incidents": [ + { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + "name": "My test API key" }, - "values": [ - { - "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" - } - ] - } - ], - "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": { + "user": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "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" + }, + "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" + } + ] } - } - ], - "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" + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 } } } } } } - } - } - }, - "components": { - "schemas": { - "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" + }, + "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/CreateRequestBody10" + }, + "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": { + "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" + } + } } }, - "example": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "required": [ - "id", - "name", - "roles", - "created_by" - ] - }, - "ActionV1": { + "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": [ + { + "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 + } + } + } + } + } + } + } + }, + "/v2/incidents/{id}": { + "get": { + "tags": [ + "Incidents V2" + ], + "summary": "Show Incidents V2", + "description": "Get a single incident.\n\nThe ID supplied can be either the incident's full ID, or the numeric part of its\nreference. For example, to get INC-123, you could use either its full ID or:\n\n\t\tcurl \\\n\t\t\t--get 'https://api.incident.io/v2/incidents/123\n", + "operationId": "Incidents V2#Show", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique identifier for the incident", + "required": true, + "schema": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + } + ], + "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": [ + { + "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 + } + } + } + } + } + } + } + }, + "/v2/incidents/{id}/actions/edit": { + "post": { + "tags": [ + "Incidents V2" + ], + "summary": "Edit Incidents V2", + "description": "Edit an existing incident.\n\nThis endpoint allows you to edit the properties of an existing incident: e.g. set the severity or update custom fields.\n\nWhen using this endpoint, only fields that are provided will be edited (omitted fields\nwill be ignored).\n", + "operationId": "Incidents V2#Edit", + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditRequestBody" + }, + "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 + } + } + } + }, + "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": [ + { + "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 + } + } + } + } + } + } + } + }, + "/v2/users": { + "get": { + "tags": [ + "Users V2" + ], + "summary": "List Users V2", + "description": "List users for an organisation.", + "operationId": "Users V2#List", + "parameters": [ + { + "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/ListResponseBody17" + }, + "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/ShowResponseBody15" + }, + "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" + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIKeyCreatedV1ResponseBody": { + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "api_key.created" + }, + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" + }, + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" + }, + "occurred_at": { + "type": "string", + "description": "When the entry occurred", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogTargetV2" + }, + "description": "The custom field that was created", + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Development API Key", + "type": "api_key" + } + ] + }, + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" + } + }, + "example": { + "action": "api_key.created", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Development API Key", + "type": "api_key" + } + ], + "version": 1 + }, + "required": [ + "action", + "occurred_at", + "version", + "actor", + "targets", + "context" + ] + }, + "APIKeyV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this API key", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "The name of the API key, for the user's reference", + "example": "My test API key" + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "required": [ + "id", + "name", + "roles", + "created_by" + ] + }, + "ActionV1": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/UserV1" + }, + "completed_at": { + "type": "string", + "description": "When the action was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Description of the action", + "example": "Call the fire brigade" + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV1" + }, + "follow_up": { + "type": "boolean", + "description": "Whether an action is marked as follow-up", + "example": true + }, + "id": { + "type": "string", + "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident the action belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "status": { + "type": "string", + "description": "Status of the action", + "example": "outstanding", + "enum": [ + "outstanding", + "completed", + "deleted", + "not_doing" + ] + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "incident_id", + "status", + "follow_up", + "created_at", + "updated_at" + ] + }, + "ActionV2": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/UserV1" + }, + "completed_at": { + "type": "string", + "description": "When the action was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Description of the action", + "example": "Call the fire brigade" + }, + "id": { + "type": "string", + "description": "Unique identifier for the action", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "incident_id": { + "type": "string", + "description": "Unique identifier of the incident the action belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "status": { + "type": "string", + "description": "Status of the action", + "example": "outstanding", + "enum": [ + "outstanding", + "completed", + "deleted", + "not_doing" + ] + }, + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "incident_id", + "description", + "status", + "created_at", + "updated_at" + ] + }, + "ActorV2": { + "type": "object", + "properties": { + "api_key": { + "$ref": "#/components/schemas/APIKeyV2" + }, + "user": { + "$ref": "#/components/schemas/UserV1" + } + }, + "example": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } + }, + "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/IncidentV2" + }, + "public_incident.incident_status_updated_v2": { + "$ref": "#/components/schemas/IncidentWithStatusChangeV2" + }, + "public_incident.incident_updated_v2": { + "$ref": "#/components/schemas/IncidentV2" + } + }, + "example": { + "event_type": "public_incident.incident_created_v2", + "private_incident.action_created_v1": { + "id": "abc123" + }, + "private_incident.action_updated_v1": { + "id": "abc123" + }, + "private_incident.follow_up_created_v1": { + "id": "abc123" + }, + "private_incident.follow_up_updated_v1": { + "id": "abc123" + }, + "private_incident.incident_created_v2": { + "id": "abc123" + }, + "private_incident.incident_updated_v2": { + "id": "abc123" + }, + "private_incident.membership_granted_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + }, + "private_incident.membership_revoked_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + }, + "public_incident.action_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.action_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.follow_up_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.follow_up_updated_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "public_incident.incident_created_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "public_incident.incident_status_updated_v2": { + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "new_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "public_incident.incident_updated_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + } + }, + "required": [ + "event_type" + ] + }, + "AuditLogActorMetadataV2": { + "type": "object", + "properties": { + "api_key_roles": { + "type": "string", + "description": "The roles that the API key has, separated by commas (if it's an API key actor)", + "example": "abc123" + }, + "external_resource_external_id": { + "type": "string", + "description": "The ID of the external resource in the 3rd party system (if it's an external resource actor)", + "example": "q1234" + }, + "external_resource_type": { + "type": "string", + "description": "The type of the external resource (if it's an external resource actor)", + "example": "pager_duty_incident" + }, + "user_base_role_slug": { + "type": "string", + "description": "The base role slug of the user (if it's a user actor)", + "example": "admin" + }, + "user_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user, separated by commas (if it's a user actor)", + "example": "engineering,security" + } + }, + "example": { + "api_key_roles": "abc123", + "external_resource_external_id": "q1234", + "external_resource_type": "pager_duty_incident", + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + } + }, + "AuditLogActorV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the actor", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "metadata": { + "$ref": "#/components/schemas/AuditLogActorMetadataV2" + }, + "name": { + "type": "string", + "description": "The name of the actor", + "example": "John Doe" + }, + "type": { + "type": "string", + "description": "The type of actor", + "example": "user", + "enum": [ + "user", + "system", + "api_key", + "workflow", + "external_resource" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "required": [ + "id", + "type" + ] + }, + "AuditLogEntryContextV2": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The location of the actor that performed this action", + "example": "1.2.3.4" + }, + "user_agent": { + "type": "string", + "description": "The user agent of the actor that performed this action", + "example": "Chrome/91.0.4472.114" + } + }, + "example": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "required": [ + "location" + ] + }, + "AuditLogPrivateIncidentAccessAttemptedMetadataV2": { + "type": "object", + "properties": { + "outcome": { + "type": "string", + "description": "Whether or not the user was able to access the private incident", + "example": "granted", + "enum": [ + "granted", + "denied" + ] + } + }, + "example": { + "outcome": "granted" + } + }, + "AuditLogTargetV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the target", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "The name of the target", + "example": "John Doe" + }, + "type": { + "type": "string", + "description": "The type of target", + "example": "user", + "enum": [ + "api_key", + "alert_route", + "alert_schema", + "alert_source", + "announcement_rule", + "catalog_type", + "custom_field", + "debrief_invite_rule", + "escalation_path", + "follow_up_priority", + "incident", + "incident_duration_metric", + "incident_role", + "incident_status", + "incident_timestamp", + "incident_type", + "integration", + "internal_status_page", + "nudge", + "policy", + "private_incident_membership", + "rbac_role", + "schedule", + "scim_group", + "severity", + "status_page", + "status_page_sub_page", + "status_page_template", + "user", + "workflow" + ] + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "John Doe", + "type": "user" + }, + "required": [ + "id", + "type" + ] + }, + "AuditLogUserRoleMembershipChangedMetadataV2": { + "type": "object", + "properties": { + "after_base_role_slug": { + "type": "string", + "description": "The base role slug of the user after their role memberships changed", + "example": "owner" + }, + "after_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user after their role memberships changed, separated by commas", + "example": "engineering,data" + }, + "before_base_role_slug": { + "type": "string", + "description": "The base role slug of the user before their role memberships changed", + "example": "admin" + }, + "before_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of the user before their role memberships changed, separated by commas", + "example": "engineering,security" + } + }, + "example": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + }, + "required": [ + "before_base_role_slug", + "before_custom_role_slugs", + "after_base_role_slug", + "after_custom_role_slugs" + ] + }, + "AuditLogUserSCIMGroupMappingChangedMetadataV2": { + "type": "object", + "properties": { + "after_base_role_slug": { + "type": "string", + "description": "The base role slug of this SCIM group after the mapping was changed (if any)", + "example": "owner" + }, + "after_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of this SCIM group after the mapping was changed (if any), separated by commas", + "example": "engineering,data" + }, + "before_base_role_slug": { + "type": "string", + "description": "The base role slug assigned to this SCIM group before the mapping was changed (if any)", + "example": "admin" + }, + "before_custom_role_slugs": { + "type": "string", + "description": "The custom role slugs of this SCIM group before the mapping was changed (if any), separated by commas", + "example": "engineering,security" + } + }, + "example": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" + } + }, + "CatalogEntryReferenceV2": { + "type": "object", + "properties": { + "archived_at": { + "type": "string", + "description": "When this entry was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "catalog_entry_id": { + "type": "string", + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "catalog_entry_name": { + "type": "string", + "description": "The name of this entry", + "example": "Primary escalation" + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + } + }, + "example": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "required": [ + "catalog_type_id", + "catalog_entry_id", + "catalog_entry_name" + ] + }, + "CatalogEntryV2": { + "type": "object", + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": [ + "lawrence@incident.io", + "lawrence" + ] + }, + "archived_at": { + "type": "string", + "description": "When this entry was archived", + "example": "2021-08-17T14:28:57.801578Z", + "format": "date-time" + }, + "attribute_values": { + "type": "object", + "description": "Values of this entry", + "example": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingV2" + } + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "created_at": { + "type": "string", + "description": "When this entry was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "external_id": { + "type": "string", + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + }, + "id": { + "type": "string", + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" + }, + "rank": { + "type": "integer", + "description": "When catalog type is ranked, this is used to help order things", + "example": 3, + "format": "int32" + }, + "updated_at": { + "type": "string", + "description": "When this entry was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "catalog_type_id", + "name", + "aliases", + "rank", + "attribute_values", + "created_at", + "updated_at" + ] + }, + "CatalogResourceV2": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Which category of resource", + "example": "custom", + "enum": [ + "primitive", + "custom", + "external" + ] + }, + "description": { + "type": "string", + "description": "Human readable description for this resource", + "example": "Boolean true or false value" + }, + "label": { + "type": "string", + "description": "Label for this catalog resource type", + "example": "GitHub Repository" + }, + "type": { + "type": "string", + "description": "Catalog type name for this resource", + "example": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]" + }, + "value_docstring": { + "type": "string", + "description": "Documentation for the literal string value of this resource", + "example": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + } + }, + "example": { + "category": "custom", + "description": "Boolean true or false value", + "label": "GitHub Repository", + "type": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]", + "value_docstring": "Either the GraphQL node ID of the repository or a string of /, e.g. incident-io/website" + }, + "required": [ + "type", + "label", + "description", + "value_docstring", + "category", + "config", + "is_user_link" + ] + }, + "CatalogTypeAttributePayloadV2": { + "type": "object", + "properties": { + "array": { + "type": "boolean", + "description": "Whether this attribute is an array", + "example": false + }, + "backlink_attribute": { + "type": "string", + "description": "The attribute to use (if this is a backlink)", + "example": "abc123" + }, + "id": { + "type": "string", + "description": "The ID of this attribute", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "mode": { + "type": "string", + "description": "Controls how this attribute is modified", + "example": "manual", + "enum": [ + "", + "manual", + "external", + "internal", + "dynamic", + "backlink" + ] + }, + "name": { + "type": "string", + "description": "Unique name of this attribute", + "example": "tier" + }, + "type": { + "type": "string", + "description": "Catalog type name for this attribute", + "example": "Custom[\"Service\"]" + } + }, + "example": { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + }, + "required": [ + "name", + "type", + "array" + ] + }, + "CatalogTypeAttributeV2": { + "type": "object", + "properties": { + "array": { + "type": "boolean", + "description": "Whether this attribute is an array", + "example": false + }, + "backlink_attribute": { + "type": "string", + "description": "The attribute to use (if this is a backlink)", + "example": "abc123" + }, + "id": { + "type": "string", + "description": "The ID of this attribute", + "example": "01GW2G3V0S59R238FAHPDS1R66" + }, + "mode": { + "type": "string", + "description": "Controls how this attribute is modified", + "example": "manual", + "enum": [ + "", + "manual", + "external", + "internal", + "dynamic", + "backlink" + ] + }, + "name": { + "type": "string", + "description": "Unique name of this attribute", + "example": "tier" + }, + "type": { + "type": "string", + "description": "Catalog type name for this attribute", + "example": "Custom[\"Service\"]" + } + }, + "example": { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + }, + "required": [ + "id", + "mode", + "name", + "type", + "array" + ] + }, + "CatalogTypeSchemaV2": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogTypeAttributeV2" + }, + "description": "Attributes of this catalog type", + "example": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + } + ] + }, + "version": { + "type": "integer", + "description": "The version number of this schema", + "example": 1, + "format": "int64" + } + }, + "example": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "required": [ + "attributes", + "version" + ] + }, + "CatalogTypeV2": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "color": { + "type": "string", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] + }, + "created_at": { + "type": "string", + "description": "When this type was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." + }, + "dynamic_resource_parameter": { + "type": "string", + "description": "If this is a dynamic catalog type, this will be the unique parameter for identitfying this resource externally.", + "example": "abc123" + }, + "estimated_count": { + "type": "integer", + "description": "If populated, gives an estimated count of entries for this type", + "example": 7, + "format": "int64" + }, + "icon": { + "type": "string", + "description": "Sets the display icon of this type in the dashboard", + "example": "bolt", + "enum": [ + "bolt", + "box", + "briefcase", + "browser", + "bulb", + "calendar", + "clock", + "cog", + "components", + "database", + "doc", + "email", + "files", + "flag", + "folder", + "globe", + "money", + "server", + "severity", + "store", + "star", + "tag", + "user", + "users" + ] + }, + "id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "is_editable": { + "type": "boolean", + "description": "Catalog types that are synced with external resources can't be edited", + "example": false + }, + "last_synced_at": { + "type": "string", + "description": "When this type was last synced (if it's ever been sync'd)", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" + }, + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true + }, + "registry_type": { + "type": "string", + "description": "The registry resource this type is synced from, if any", + "example": "PagerDutyService" + }, + "required_integrations": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "If populated, the integrations required for this type", + "example": [ + "pager_duty" + ] + }, + "schema": { + "$ref": "#/components/schemas/CatalogTypeSchemaV2" + }, + "semantic_type": { + "type": "string", + "description": "Semantic type of this resource (unused)", + "example": "custom" + }, + "source_repo_url": { + "type": "string", + "description": "The url of the external repository where this type is managed", + "example": "https://github.com/my-company/incident-io-catalog" + }, + "type_name": { + "type": "string", + "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", + "example": "Custom[\"BackstageGroup\"]" + }, + "updated_at": { + "type": "string", + "description": "When this type was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": [ + "pager_duty" + ], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "id", + "name", + "description", + "type_name", + "semantic_type", + "ranked", + "schema", + "icon", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "mode" + ] + }, + "CreateEntryRequestBody": { + "type": "object", + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string", + "example": "abc123" + }, + "description": "Optional aliases that can be used to reference this entry", + "example": [ + "lawrence@incident.io", + "lawrence" + ] + }, + "attribute_values": { + "type": "object", + "description": "Values of this entry", + "example": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/EngineParamBindingPayloadV2" + } + }, + "catalog_type_id": { + "type": "string", + "description": "ID of this catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "external_id": { + "type": "string", + "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + }, + "name": { + "type": "string", + "description": "Name is the human readable name of this entry", + "example": "Primary On-call" + }, + "rank": { + "type": "integer", + "description": "When catalog type is ranked, this is used to help order things", + "example": 3, + "format": "int32" + } + }, + "example": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "attribute_values": { + "abc123": { + "array_value": [ + { + "literal": "SEV123", + "reference": "incident.severity" + } + ], + "value": { + "literal": "SEV123", + "reference": "incident.severity" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "name": "Primary On-call", + "rank": 3 + }, + "required": [ + "catalog_type_id", + "name", + "attribute_values" + ] + }, + "CreateEntryResponseBody": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryV2" + } + }, + "example": { + "catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "archived_at": "2021-08-17T14:28:57.801578Z", + "attribute_values": { + "abc123": { + "array_value": [ + { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + ], + "value": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "catalog_entry" + ] + }, + "CreateHTTPRequestBody": { + "type": "object", + "properties": { + "deduplication_key": { + "type": "string", + "description": "A deduplication key can be provided to uniquely reference this alert from your alert source. If you send an event with the same deduplication_key multiple times, only one alert will be created in incident.io for this alert source config.", + "example": "4293868629" + }, + "description": { + "type": "string", + "description": "Description that optionally adds more detail to title ", + "example": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix..." + }, + "metadata": { + "type": "object", + "description": "Any additional metadata that you've configured your alert source to parse", + "example": { + "service": "hello.world.com", + "team": [ + "my-team" + ] + }, + "additionalProperties": true + }, + "source_url": { + "type": "string", + "description": "If applicable, a link to the alert in the upstream system", + "example": "https://www.my-alerting-platform.com/alerts/my-alert-123" + }, + "status": { + "type": "string", + "description": "Current status of this alert", + "example": "firing", + "enum": [ + "firing", + "resolved" + ] + }, + "title": { + "type": "string", + "description": "Alert title which is used when summarising the alert", + "example": "*errors.withMessage: PG::Error failed to connect" + } + }, + "example": { + "deduplication_key": "4293868629", + "description": "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", + "metadata": { + "service": "hello.world.com", + "team": [ + "my-team" + ] + }, + "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", + "status": "firing", + "title": "*errors.withMessage: PG::Error failed to connect" + }, + "required": [ + "title", + "status" + ] + }, + "CreateHTTPResponseBody": { + "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" + ] + }, + "CreateRequestBody": { + "type": "object", + "properties": { + "custom_field_id": { + "type": "string", + "description": "ID of the custom field this option belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "sort_key": { + "type": "integer", + "description": "Sort key used to order the custom field options correctly", + "default": 1000, + "example": 10, + "format": "int64" + }, + "value": { + "type": "string", + "description": "Human readable name for the custom field option", + "example": "Product" + } + }, + "example": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "required": [ + "custom_field_id", + "value" + ] + }, + "CreateRequestBody10": { + "type": "object", + "properties": { + "custom_field_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldEntryPayloadV1" + }, + "description": "Set the incident's custom fields to these values", + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ] + }, + "id": { + "type": "string", + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" + }, + "idempotency_key": { + "type": "string", + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ] + }, + "incident_status_id": { + "type": "string", + "description": "Incident status to assign to the incident", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + }, + "incident_timestamp_values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + }, + "description": "Assign the incident's timestamps to these values", + "example": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "incident_type_id": { + "type": "string", + "description": "Incident type to create this incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "mode": { + "type": "string", + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", + "example": "standard", + "enum": [ + "standard", + "retrospective", + "test", + "tutorial" + ] + }, + "name": { + "type": "string", + "description": "Explanation of the incident", + "example": "Our database is sad" + }, + "retrospective_incident_options": { + "$ref": "#/components/schemas/RetrospectiveIncidentOptionsV2" + }, + "severity_id": { + "type": "string", + "description": "Severity to create incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + }, + "slack_channel_name_override": { + "type": "string", + "description": "Name of the Slack channel to create for this incident", + "example": "inc-123-database-down" + }, + "slack_team_id": { + "type": "string", + "description": "Slack Team to create the incident in", + "example": "T02A1FSLE8J" + }, + "summary": { + "type": "string", + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." + }, + "visibility": { + "type": "string", + "description": "Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access).", + "example": "public", + "enum": [ + "public", + "private" + ] + } + }, + "example": { + "custom_field_entries": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "idempotency_key": "alert-uuid", + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_status_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "incident_timestamp_values": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ], + "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "mode": "standard", + "name": "Our database is sad", + "retrospective_incident_options": { + "slack_channel_id": "abc123" + }, + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "slack_channel_name_override": "inc-123-database-down", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "visibility": "public" + }, + "required": [ + "idempotency_key", + "visibility" + ] + }, + "CreateRequestBody11": { + "type": "object", + "properties": { + "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": { - "assignee": { - "$ref": "#/components/schemas/UserV1" + "incident_id": { + "type": "string", + "description": "ID of the incident to add an attachment to", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "completed_at": { + "resource": { + "type": "object", + "properties": { + "external_id": { + "type": "string", + "description": "ID of the resource in the external system", + "example": "123" + }, + "resource_type": { + "type": "string", + "description": "E.g. PagerDuty: the external system that holds the resource", + "example": "pager_duty_incident", + "enum": [ + "pager_duty_incident", + "opsgenie_alert", + "datadog_monitor_alert", + "github_pull_request", + "gitlab_merge_request", + "sentry_issue", + "atlassian_statuspage_incident", + "zendesk_ticket", + "google_calendar_event", + "scrubbed", + "statuspage_incident" + ] + } + }, + "example": { + "external_id": "123", + "resource_type": "pager_duty_incident" + }, + "required": [ + "id", + "permalink", + "external_id", + "title", + "resource_type", + "resource_type_label", + "created_at", + "updated_at" + ] + } + }, + "example": { + "incident_id": "01FDAG4SAP5TYPT98WGR2N7W91", + "resource": { + "external_id": "123", + "resource_type": "pager_duty_incident" + } + }, + "required": [ + "incident_id", + "resource" + ] + }, + "CreateRequestBody5": { + "type": "object", + "properties": { + "incident_id": { "type": "string", - "description": "When the action was completed", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "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", + "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", + "example": "lead", + "minLength": 1 + } + }, + "example": { + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "shortform": "lead" + }, + "required": [ + "name", + "shortform", + "description", + "instructions", + "required", + "conditions", + "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", + "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", + "example": "lead", + "minLength": 1 + } + }, + "example": { + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "shortform": "lead" + }, + "required": [ + "name", + "shortform", + "description", + "instructions", + "conditions", + "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": { + "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": "" + } + ] + } + ] + }, + "idempotency_key": { + "type": "string", + "description": "Unique string used to de-duplicate incident create requests", + "example": "alert-uuid" + }, + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "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" }, - "created_at": { + "mode": { "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Whether the incident is real or test", + "example": "real", + "enum": [ + "real", + "test" + ] }, - "description": { + "name": { "type": "string", - "description": "Description of the action", - "example": "Call the fire brigade" + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "external_issue_reference": { - "$ref": "#/components/schemas/ExternalIssueReferenceV1" + "severity_id": { + "type": "string", + "description": "Severity to create incident as", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "follow_up": { - "type": "boolean", - "description": "Whether an action is marked as follow-up", - "example": true + "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" }, - "id": { + "source_message_channel_id": { "type": "string", - "description": "Unique identifier for the action", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Channel ID of the source message, if this incident was created from one", + "example": "C02AW36C1M5" }, - "incident_id": { + "source_message_timestamp": { "type": "string", - "description": "Unique identifier of the incident the action belongs to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Timestamp of the source message, if this incident was created from one", + "example": "1653650280.526509" }, "status": { "type": "string", - "description": "Status of the action", - "example": "outstanding", + "description": "Current status of the incident", + "example": "triage", "enum": [ - "outstanding", - "completed", - "deleted", - "not_doing" + "triage", + "investigating", + "fixing", + "monitoring", + "closed", + "declined" ] }, - "updated_at": { + "summary": { "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." + }, + "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": { - "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" + "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": [ - "id", - "incident_id", - "status", - "follow_up", - "created_at", - "updated_at" + "idempotency_key", + "visibility" ] }, - "ActorV2": { + "CreateResponseBody": { "type": "object", "properties": { - "api_key": { - "$ref": "#/components/schemas/APIKeyV2" - }, - "user": { - "$ref": "#/components/schemas/UserV1" + "incident_attachment": { + "$ref": "#/components/schemas/IncidentAttachmentV1" } }, "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" + "incident_attachment": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } } - } + }, + "required": [ + "incident_attachment" + ] }, - "AllResponseBody": { + "CreateResponseBody2": { "type": "object", "properties": { - "event_type": { + "incident_membership": { + "$ref": "#/components/schemas/IncidentMembership" + } + }, + "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" + } + } + }, + "required": [ + "incident_membership" + ] + }, + "CreateTypeRequestBody": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "color": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_created_v2", + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_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" + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" ] }, - "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" + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." }, - "private_incident.incident_updated_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "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" + ] }, - "public_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" }, - "public_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/ActionV1" + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true }, - "public_incident.incident_created_v2": { - "$ref": "#/components/schemas/IncidentV2" + "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" }, - "public_incident.incident_updated_v2": { - "$ref": "#/components/schemas/IncidentV2" + "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": { - "event_type": "public_incident.incident_created_v2", - "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" - }, - "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" + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "public_incident.follow_up_updated_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "bolt", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]" + }, + "required": [ + "name", + "description" + ] + }, + "CreateTypeResponseBody": { + "type": "object", + "properties": { + "catalog_type": { + "$ref": "#/components/schemas/CatalogTypeV2" + } + }, + "example": { + "catalog_type": { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" }, - "completed_at": "2021-08-17T13:28:57.801578Z", + "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": "bolt", "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_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" - } - ] - } - ], - "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - } + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": [ + "pager_duty" ], - "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" + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" } - } - ], - "incident_type": { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "mode": "standard", - "name": "Our database is sad", - "permalink": "https://app.incident.io/incidents/123", - "postmortem_document_url": "https://docs.google.com/my_doc_id", - "reference": "INC-123", - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + ], + "version": 1 }, - "slack_channel_id": "C02AW36C1M5", - "slack_channel_name": "inc-165-green-parrot", - "slack_team_id": "T02A1FSLE8J", - "summary": "Our database is really really sad, and we don't know why yet.", - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" - }, - "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" - } + "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" + ] + }, + "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" }, - "custom_field_entries": [ + "description": "List of values to associate with this entry. Use an empty array to unset the value of the custom field.", + "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_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": "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": "" } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + ] + } + }, + "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" }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "description": "List of custom field values set on this entry", + "example": [ { - "assignee": { - "email": "lisa@incident.io", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "name": "Primary On-call" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } - ], - "incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "incident_timestamp_values": [ + ] + } + }, + "example": { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ { - "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", - "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" + ] + }, + "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" + ] + }, + "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" + ] + }, + "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" }, - "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" + "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": [ - "event_type" + "id", + "organisation_id", + "name", + "description", + "dynamic_options", + "rank", + "field_type", + "cannot_be_unset", + "options", + "is_usable", + "conditions", + "field_mode", + "created_at", + "updated_at" ] }, - "AnnouncementRuleCreatedV1ResponseBody": { + "CustomFieldV1": { "type": "object", "properties": { - "action": { + "catalog_type_id": { "type": "string", - "description": "The type of log entry that this is", - "example": "announcement_rule.created" - }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" - }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" + "description": "For catalog fields, the ID of the associated catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "occurred_at": { + "created_at": { "type": "string", - "description": "When the entry occurred", + "description": "When the action was created", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" }, - "targets": { + "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/AuditLogTargetV2" + "$ref": "#/components/schemas/CustomFieldOptionV1" }, - "description": "The custom field that was created", + "description": "What options are available for this custom field, if this field has options", "example": [ { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#engineering", - "type": "announcement_rule" + "sort_key": 10, + "value": "Product" } ] }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" + "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": { - "action": "announcement_rule.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": [ + "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": "#engineering", - "type": "announcement_rule" + "sort_key": 10, + "value": "Product" } ], - "version": 1 + "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": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context" + "id", + "name", + "description", + "field_type", + "show_before_creation", + "show_before_closure", + "show_before_update", + "options", + "created_at", + "updated_at" ] }, - "AuditLogActorMetadataV2": { + "CustomFieldV2": { "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": { + "catalog_type_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": "For catalog fields, the ID of the associated catalog type", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "external_resource_type": { + "created_at": { "type": "string", - "description": "The type of the external resource (if it's an external resource actor)", - "example": "pager_duty_incident" + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "user_base_role_slug": { + "description": { "type": "string", - "description": "The base role slug of the user (if it's a user actor)", - "example": "admin" + "description": "Description of the custom field", + "example": "Which team is impacted by this issue" }, - "user_custom_role_slugs": { + "field_type": { "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": { + "description": "Type of custom field", + "example": "single_select", + "enum": [ + "single_select", + "multi_select", + "text", + "link", + "numeric" + ] + }, "id": { "type": "string", - "description": "The ID of the actor", + "description": "Unique identifier for the custom field", "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "metadata": { - "$ref": "#/components/schemas/AuditLogActorMetadataV2" - }, "name": { "type": "string", - "description": "The name of the actor", - "example": "John Doe" + "description": "Human readable name for the custom field", + "example": "Affected Team", + "maxLength": 50 }, - "type": { + "updated_at": { "type": "string", - "description": "The type of actor", - "example": "user", - "enum": [ - "user", - "system", - "api_key", - "workflow", - "external_resource" - ] + "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", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "name": "John Doe", - "type": "user" + "name": "Affected Team", + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ "id", - "type" + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" ] }, - "AuditLogEntryContextV2": { + "CustomFieldValuePayloadV1": { "type": "object", "properties": { - "location": { + "id": { "type": "string", - "description": "The location of the actor that performed this action", - "example": "1.2.3.4" + "description": "Unique identifier for the custom field value", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "user_agent": { + "value_catalog_entry_id": { "type": "string", - "description": "The user agent of the actor that performed this action", - "example": "Chrome/91.0.4472.114" - } - }, - "example": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "required": [ - "location" - ] - }, - "AuditLogPrivateIncidentAccessAttemptedMetadataV2": { - "type": "object", - "properties": { - "outcome": { + "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": "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": { + "description": "If the custom field type is 'link', this will contain the value assigned.", + "example": "https://google.com/" + }, + "value_numeric": { "type": "string", - "description": "The ID of the target", + "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" }, - "name": { + "value_text": { "type": "string", - "description": "The name of the target", - "example": "John Doe" + "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" }, - "type": { + "value_timestamp": { "type": "string", - "description": "The type of target", - "example": "user", - "enum": [ - "announcement_rule", - "api_key", - "custom_field", - "follow_up_priority", - "incident", - "incident_duration_metric", - "incident_role", - "incident_status", - "incident_timestamp", - "incident_type", - "integration", - "policy", - "private_incident_membership", - "rbac_role", - "scim_group", - "severity", - "status_page", - "user", - "workflow" - ] + "description": "Deprecated: please use incident timestamp values instead", + "example": "" } }, "example": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "John Doe", - "type": "user" - }, - "required": [ - "id", - "type" - ] + "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": "" + } }, - "AuditLogUserRoleMembershipChangedMetadataV2": { + "CustomFieldValueV1": { "type": "object", "properties": { - "after_base_role_slug": { - "type": "string", - "description": "The base role slug of the user after their role memberships changed", - "example": "owner" + "value_catalog_entry": { + "$ref": "#/components/schemas/EmbeddedCatalogEntryV1" }, - "after_custom_role_slugs": { + "value_link": { "type": "string", - "description": "The custom role slugs of the user after their role memberships changed, separated by commas", - "example": "engineering,data" + "description": "If the custom field type is 'link', this will contain the value assigned.", + "example": "https://google.com/" }, - "before_base_role_slug": { + "value_numeric": { "type": "string", - "description": "The base role slug of the user before their role memberships changed", - "example": "admin" + "description": "If the custom field type is 'numeric', this will contain the value assigned.", + "example": "123.456" }, - "before_custom_role_slugs": { + "value_option": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "value_text": { "type": "string", - "description": "The custom role slugs of the user before their role memberships changed, separated by commas", - "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": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_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" + } + }, + "EditRequestBody": { + "type": "object", + "properties": { + "incident": { + "$ref": "#/components/schemas/IncidentEditPayloadV2" + }, + "notify_incident_channel": { + "type": "boolean", + "description": "Should we send Slack channel notifications to inform responders of this update? Note that this won't work if the Slack channel has already been archived.", + "example": true + } + }, + "example": { + "incident": { + "call_url": "https://zoom.us/foo", + "custom_field_entries": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "values": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_text": "This is my text field, I hope you like it", + "value_timestamp": "" + } + ] + } + ], + "incident_role_assignments": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ], + "incident_status_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "incident_timestamp_values": [ + { + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + } + ], + "name": "Our database is sad", + "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "summary": "Our database is really really sad, and we don't know why yet." + }, + "notify_incident_channel": true }, "required": [ - "before_base_role_slug", - "before_custom_role_slugs", - "after_base_role_slug", - "after_custom_role_slugs" + "incident", + "notify_incident_channel" ] }, - "AuditLogUserSCIMGroupMappingChangedMetadataV2": { + "EmbeddedCatalogEntryV1": { "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" + "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" + ] }, - "after_custom_role_slugs": { + "external_id": { "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": "An optional alternative ID for this entry, which is ensured to be unique for the type", + "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" }, - "before_base_role_slug": { + "id": { "type": "string", - "description": "The base role slug assigned to this SCIM group before the mapping was changed (if any)", - "example": "admin" + "description": "ID of this catalog entry", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "before_custom_role_slugs": { + "name": { "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": "Name is the human readable name of this entry", + "example": "Primary On-call" } }, "example": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - } + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "required": [ + "id", + "name", + "catalog_type_id" + ] }, - "CatalogAttributeBindingPayloadV2": { + "EngineParamBindingPayloadV2": { "type": "object", "properties": { "array_value": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogAttributeValuePayloadV2" + "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" }, - "description": "If set, this is the array value of the attribute", + "description": "If set, this is the array value of the step parameter", "example": [ { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } ] }, "value": { - "$ref": "#/components/schemas/CatalogAttributeValuePayloadV2" + "$ref": "#/components/schemas/EngineParamBindingValuePayloadV2" } }, "example": { "array_value": [ { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } ], "value": { - "literal": "SEV123" + "literal": "SEV123", + "reference": "incident.severity" } } }, - "CatalogAttributeBindingV2": { + "EngineParamBindingV2": { "type": "object", "properties": { "array_value": { "type": "array", "items": { - "$ref": "#/components/schemas/CatalogAttributeValueV2" + "$ref": "#/components/schemas/EngineParamBindingValueV2" }, "description": "If array_value is set, this helps render the values", "example": [ { "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", "catalog_entry_name": "Primary escalation", "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" }, + "helptext": "Collection of standalone automations like auto-closing incidents.", "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", "is_image_slack_icon": false, "label": "Lawrence Jones", "literal": "SEV123", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" } ] }, "value": { - "$ref": "#/components/schemas/CatalogAttributeValueV2" + "$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", - "sort_key": "000020" + "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", - "sort_key": "000020" + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + } + } + }, + "EngineParamBindingValuePayloadV2": { + "type": "object", + "properties": { + "literal": { + "type": "string", + "description": "If set, this is the literal value of the step parameter", + "example": "SEV123" + }, + "reference": { + "type": "string", + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" } + }, + "example": { + "literal": "SEV123", + "reference": "incident.severity" } }, - "CatalogAttributeValuePayloadV2": { + "EngineParamBindingValueV2": { "type": "object", "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryReferenceV2" + }, + "helptext": { + "type": "string", + "description": "Gives a description of the option to the user", + "example": "Collection of standalone automations like auto-closing incidents." + }, + "image_url": { + "type": "string", + "description": "If appropriate, URL to an image that can be displayed alongside the option", + "example": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg" + }, + "is_image_slack_icon": { + "type": "boolean", + "description": "If true, the image_url is a Slack icon and should be displayed as such", + "example": false + }, + "label": { + "type": "string", + "description": "Human readable label to be displayed for user to select", + "example": "Lawrence Jones" + }, "literal": { "type": "string", - "description": "The literal value of this attribute", + "description": "If set, this is the literal value of the step parameter", "example": "SEV123" + }, + "reference": { + "type": "string", + "description": "If set, this is the reference into the trigger scope that is the value of this parameter", + "example": "incident.severity" + }, + "sort_key": { + "type": "string", + "description": "Gives an indication of how to sort the options when displayed to the user", + "example": "000020" + }, + "unavailable": { + "type": "boolean", + "description": "Unavailable is true if we've failed to build the value for this binding", + "example": false + }, + "value": { + "type": "string", + "description": "Either the reference or the literal: this field is designed purely to make working with react-select easier", + "example": "abc123" + } + }, + "example": { + "catalog_entry": { + "archived_at": "2021-08-17T14:28:57.801578Z", + "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "catalog_entry_name": "Primary escalation", + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "helptext": "Collection of standalone automations like auto-closing incidents.", + "image_url": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg", + "is_image_slack_icon": false, + "label": "Lawrence Jones", + "literal": "SEV123", + "reference": "incident.severity", + "sort_key": "000020", + "unavailable": false, + "value": "abc123" + }, + "required": [ + "label", + "sort_key" + ] + }, + "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" + ] + }, + "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", + "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" + }, + "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." + }, + "id": { + "type": "string", + "description": "Unique identifier for the follow-up priority option", + "example": "01GNW4BAQ7XRMFF6FHKNXDFPRW" + }, + "name": { + "type": "string", + "description": "Name of the follow-up priority option", + "example": "Urgent" + }, + "rank": { + "type": "integer", + "description": "Rank is used to order the follow-up priority options correctly", + "example": 10, + "format": "int64" } }, "example": { - "literal": "SEV123" - } + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "required": [ + "id", + "name", + "rank" + ] }, - "CatalogAttributeValueV2": { + "FollowUpV2": { "type": "object", "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryReferenceV2" + "assignee": { + "$ref": "#/components/schemas/UserV1" }, - "image_url": { + "completed_at": { "type": "string", - "description": "If appropriate, URL to an image that can be displayed alongside the option", - "example": "https://avatars.slack-edge.com/2021-08-09/2372763167857_6f65d94928b0a0ac590b_192.jpg" + "description": "When the follow-up was completed", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "is_image_slack_icon": { - "type": "boolean", - "description": "If true, the image_url is a Slack icon and should be displayed as such", - "example": false + "created_at": { + "type": "string", + "description": "When the follow-up was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "label": { + "description": { "type": "string", - "description": "Human readable label to be displayed for user to select", - "example": "Lawrence Jones" + "description": "Description of the follow-up", + "example": "Call the fire brigade" }, - "literal": { + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, + "id": { "type": "string", - "description": "If set, this is the literal value of the step parameter", - "example": "SEV123" + "description": "Unique identifier for the follow-up", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "sort_key": { + "incident_id": { "type": "string", - "description": "Gives an indication of how to sort the options when displayed to the user", - "example": "000020" + "description": "Unique identifier of the incident the follow-up belongs to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "priority": { + "$ref": "#/components/schemas/FollowUpPriorityV2" + }, + "status": { + "type": "string", + "description": "Status of the follow-up", + "example": "outstanding", + "enum": [ + "outstanding", + "completed", + "deleted", + "not_doing" + ] + }, + "title": { + "type": "string", + "description": "Title of the follow-up", + "example": "Cat is stuck in the tree" + }, + "updated_at": { + "type": "string", + "description": "When the follow-up was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "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" + "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": [ - "label", - "sort_key" + "id", + "incident_id", + "title", + "status", + "created_at", + "updated_at" ] }, - "CatalogEntryReferenceV2": { + "IdentityResponseBody": { "type": "object", "properties": { - "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" + "identity": { + "$ref": "#/components/schemas/IdentityV1" } }, "example": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + "identity": { + "dashboard_url": "https://app.incident.io/my-org", + "name": "Alertmanager token", + "roles": [ + "incident_creator" + ] + } }, "required": [ - "catalog_type_id", - "catalog_entry_id", - "catalog_entry_name" + "identity" ] }, - "CatalogEntryV2": { + "IdentityV1": { "type": "object", "properties": { - "aliases": { + "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": { "type": "array", "items": { "type": "string", - "example": "abc123" + "example": "incident_creator", + "enum": [ + "viewer", + "incident_creator", + "incident_editor", + "manage_settings", + "global_access", + "catalog_viewer", + "catalog_editor", + "incident_memberships_editor" + ] }, - "description": "Optional aliases that can be used to reference this entry", + "description": "Which roles have been enabled for this key", "example": [ - "lawrence@incident.io", - "lawrence" + "incident_creator" ] - }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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/CatalogAttributeBindingV2" - } - }, - "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" - }, + } + }, + "example": { + "dashboard_url": "https://app.incident.io/my-org", + "name": "Alertmanager token", + "roles": [ + "incident_creator" + ] + }, + "required": [ + "name", + "roles", + "dashboard_url" + ] + }, + "IncidentAttachmentV1": { + "type": "object", + "properties": { "id": { "type": "string", - "description": "ID of this resource", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Unique identifier of this incident membership", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "name": { + "incident_id": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + "description": "Unique identifier of the incident", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "rank": { - "type": "integer", - "description": "When catalog type is ranked, this is used to help order things", - "example": 3, - "format": "int32" + "resource": { + "$ref": "#/components/schemas/ExternalResourceV1" + } + }, + "example": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } + }, + "required": [ + "id", + "organisation_id", + "incident_id", + "resource", + "creator", + "created_at" + ] + }, + "IncidentDurationMetricV2": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique ID of this incident duration metric", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "updated_at": { + "name": { "type": "string", - "description": "When this entry was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "description": "Unique name of this duration metric", + "example": "Lasted" } }, "example": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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" - } - } - }, - "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": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" }, "required": [ "id", - "catalog_type_id", "name", - "aliases", "rank", - "attribute_values", + "from_timestamp_id", + "to_timestamp_id", + "metric_type", + "calculation_mode", "created_at", - "updated_at" + "updated_at", + "validate" ] }, - "CatalogResourceV2": { + "IncidentDurationMetricWithValueV2": { "type": "object", "properties": { - "category": { + "duration_metric": { + "$ref": "#/components/schemas/IncidentDurationMetricV2" + }, + "value_seconds": { + "type": "integer", + "description": "The calculated durations for this metric", + "example": 1, + "format": "int64" + } + }, + "example": { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + }, + "required": [ + "duration_metric" + ] + }, + "IncidentEditPayloadV2": { + "type": "object", + "properties": { + "call_url": { "type": "string", - "description": "Which category of resource", - "example": "custom", - "enum": [ - "primitive", - "custom", - "external" + "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": "" + } + ] + } ] }, - "description": { + "incident_role_assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + }, + "description": "Assign incident roles to these people", + "example": [ + { + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + } + ] + }, + "incident_status_id": { "type": "string", - "description": "Human readable description for this resource", - "example": "Boolean true or false value" + "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" }, - "label": { + "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" + } + ] + }, + "name": { "type": "string", - "description": "Label for this catalog resource type", - "example": "GitHub Repository" + "description": "Explanation of the incident", + "example": "Our database is sad" }, - "type": { + "severity_id": { "type": "string", - "description": "Catalog type name for this resource", - "example": "CatalogEntry[\"01GVGYJSD39FRKVDWACK9NDS4E\"]" + "description": "Severity to change incident to", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" }, - "value_docstring": { + "summary": { "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": "Detailed description of the incident", + "example": "Our database is really really sad, and we don't know why yet." } }, "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" - ] + "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." + } }, - "CatalogTypeAttributePayloadV2": { + "IncidentMembership": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "Whether this attribute is an array", - "example": false + "created_at": { + "type": "string", + "description": "When the membership was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, "id": { "type": "string", - "description": "The ID of this attribute", - "example": "01GW2G3V0S59R238FAHPDS1R66" + "description": "Unique identifier of this incident membership", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "name": { + "incident_id": { "type": "string", - "description": "Unique name of this attribute", - "example": "tier" + "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/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" + } + }, + "required": [ + "id", + "user", + "incident_id", + "created_at", + "updated_at" + ] + }, + "IncidentRoleAssignmentPayloadV1": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV1" }, - "type": { + "incident_role_id": { "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "description": "Unique ID of an incident role", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" }, "required": [ - "name", - "type", - "array" + "incident_role_id", + "assignee" ] }, - "CatalogTypeAttributeV2": { + "IncidentRoleAssignmentPayloadV2": { "type": "object", "properties": { - "array": { - "type": "boolean", - "description": "Whether this attribute is an array", - "example": false - }, - "id": { - "type": "string", - "description": "The ID of this attribute", - "example": "01GW2G3V0S59R238FAHPDS1R66" - }, - "name": { - "type": "string", - "description": "Unique name of this attribute", - "example": "tier" + "assignee": { + "$ref": "#/components/schemas/UserReferencePayloadV1" }, - "type": { + "incident_role_id": { "type": "string", - "description": "Catalog type name for this attribute", - "example": "Custom[\"Service\"]" + "description": "Unique ID of an incident role", + "example": "01FH5TZRWMNAFB0DZ23FD1TV96" } }, "example": { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" + "assignee": { + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + }, + "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" }, "required": [ - "id", - "name", - "type", - "array" + "incident_role_id" ] }, - "CatalogTypeSchemaV2": { + "IncidentRoleAssignmentV1": { "type": "object", "properties": { - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogTypeAttributeV2" - }, - "description": "Attributes of this catalog type", - "example": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ] + "assignee": { + "$ref": "#/components/schemas/UserV1" }, - "version": { - "type": "integer", - "description": "The version number of this schema", - "example": 1, - "format": "int64" + "role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "example": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 + "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": [ - "attributes", - "version" + "role" ] }, - "CatalogTypeV2": { + "IncidentRoleV1": { "type": "object", "properties": { - "annotations": { - "type": "object", - "description": "Annotations that can track metadata about this type", - "example": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "additionalProperties": { - "type": "string", - "example": "abc123" - } - }, - "color": { - "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "slate", - "enum": [ - "slate", - "red", - "yellow", - "green", - "blue", - "violet" - ] - }, "created_at": { "type": "string", - "description": "When this type was created", + "description": "When the action 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." + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "estimated_count": { - "type": "integer", - "description": "If populated, gives an estimated count of entries for this type", - "example": 7, - "format": "int64" + "id": { + "type": "string", + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "external_type": { + "instructions": { "type": "string", - "description": "The external resource this type is synced from, if any", - "example": "PagerDutyService" + "description": "Provided to whoever is nominated for the role", + "example": "Take point on the incident; Make sure people are clear on responsibilities" }, - "icon": { + "name": { "type": "string", - "description": "Sets the display icon of this type in the dashboard", - "example": "bolt", + "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": [ - "bolt", - "box", - "briefcase", - "browser", - "bulb", - "clock", - "cog", - "database", - "doc", - "email", - "server", - "severity", - "star", - "tag", - "user", - "users" + "lead", + "reporter", + "custom" ] }, - "id": { + "shortform": { "type": "string", - "description": "ID of this resource", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Short human readable name for Slack", + "example": "lead", + "minLength": 1 }, - "is_editable": { - "type": "boolean", - "description": "Catalog types that are synced with external resources can't be edited", - "example": false + "updated_at": { + "type": "string", + "description": "When the action was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "conditions", + "id", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" + ] + }, + "IncidentRoleV2": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "When the action was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "name": { + "description": { "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "ranked": { - "type": "boolean", - "description": "If this type should be ranked", - "example": true + "id": { + "type": "string", + "description": "Unique identifier for the role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "required_integrations": { - "type": "array", - "items": { - "type": "string", - "example": "abc123" - }, - "description": "If populated, the integrations required for this type", - "example": [ - "pager_duty" - ] + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role", + "example": "Take point on the incident; Make sure people are clear on responsibilities" }, - "schema": { - "$ref": "#/components/schemas/CatalogTypeSchemaV2" + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 }, - "semantic_type": { + "role_type": { "type": "string", - "description": "Semantic type of this resource", - "example": "custom" + "description": "Type of incident role", + "example": "lead", + "enum": [ + "lead", + "reporter", + "custom" + ] }, - "type_name": { + "shortform": { "type": "string", - "description": "The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom[\"SomeName \"]", - "example": "Custom[\"BackstageGroup\"]" + "description": "Short human readable name for Slack", + "example": "lead", + "minLength": 1 }, "updated_at": { "type": "string", - "description": "When this type was last updated", + "description": "When the action was last updated", "example": "2021-08-17T13:28:57.801578Z", "format": "date-time" - }, - "source_repo_url": { - "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/incident-io/catalog-importer" } }, "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "estimated_count": 7, - "external_type": "PagerDutyService", - "icon": "bolt", + "description": "The person currently coordinating the incident", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "name": "Kubernetes Cluster", - "ranked": true, - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z", - "source_repo_url": "https://github.com/incident-io/catalog-importer" + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" }, "required": [ + "conditions", "id", "name", "description", - "type_name", - "semantic_type", - "ranked", - "schema", - "icon", - "color", - "is_editable", - "annotations", + "instructions", + "shortform", + "role_type", "created_at", "updated_at" ] }, - "CreateEntryRequestBody": { + "IncidentStatusV1": { "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" + "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" ] }, - "attribute_values": { - "type": "object", - "description": "Values of this entry", - "example": { - "abc123": { - "array_value": [ - { - "literal": "SEV123" - } - ], - "value": { - "literal": "SEV123" - } - } - }, - "additionalProperties": { - "$ref": "#/components/schemas/CatalogAttributeBindingPayloadV2" - } + "created_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "catalog_type_id": { + "description": { "type": "string", - "description": "ID of this catalog type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Rich text description of the incident status", + "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." }, - "external_id": { + "id": { "type": "string", - "description": "An optional alternative ID for this entry, which is ensured to be unique for the type", - "example": "761722cd-d1d7-477b-ac7e-90f9e079dc33" + "description": "Unique ID of this incident status", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, "name": { "type": "string", - "description": "Name is the human readable name of this entry", - "example": "Primary On-call" + "description": "Unique name of this status", + "example": "Closed" }, "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" - } - ], - "value": { - "literal": "SEV123" - } - } + "description": "Order of this incident status", + "example": 4, + "format": "int64" }, - "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" + "updated_at": { + "type": "string", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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" - } - } - }, - "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" - } + "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": [ - "catalog_entry" + "id", + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "CreateRequestBody": { + "IncidentTimestampV1": { "type": "object", "properties": { - "custom_field_id": { + "last_occurred_at": { "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" + "description": "When this last occurred, if it did", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "value": { + "name": { "type": "string", - "description": "Human readable name for the custom field option", - "example": "Product" + "description": "Name of the lifecycle event", + "example": "last_activity" } }, "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" }, "required": [ - "custom_field_id", - "value" + "name" ] }, - "CreateRequestBody2": { + "IncidentTimestampV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the custom field", - "example": "Which team is impacted by this issue" - }, - "field_type": { + "id": { "type": "string", - "description": "Type of custom field", - "example": "single_select", - "enum": [ - "single_select", - "multi_select", - "text", - "link", - "numeric" - ] + "description": "Unique ID of this incident timestamp", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, "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.", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" - ] - }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure 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 + "description": "Unique name of this timestamp", + "example": "Impact started" }, - "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 + "rank": { + "type": "integer", + "description": "Order in which this timestamp should be shown", + "example": 1, + "format": "int64" } }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "name": "Affected Team", - "required": "never", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 }, "required": [ "id", "name", "description", - "field_type", - "required", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", + "rank", + "set_on_creation", + "set_on_acceptance", + "set_on_resolution", + "set_by_rules", + "timestamp_type", "created_at", "updated_at" ] }, - "CreateRequestBody3": { + "IncidentTimestampValuePayloadV2": { "type": "object", "properties": { - "incident_id": { + "incident_timestamp_id": { "type": "string", - "description": "ID of the incident to add an attachment to", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" + "description": "The id of the incident timestamp that this incident timestamp value is associated with.", + "example": "01FCNDV6P870EA6S7TK1DSYD5H" }, - "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", - "sentry_issue", - "atlassian_statuspage_incident", - "zendesk_ticket", - "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" - ] + "value": { + "type": "string", + "description": "The current value of this timestamp, for this incident", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "example": { - "incident_id": "01FDAG4SAP5TYPT98WGR2N7W91", - "resource": { - "external_id": "123", - "resource_type": "pager_duty_incident" + "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "value": "2021-08-17T13:28:57.801578Z" + }, + "required": [ + "incident_timestamp_id", + "id", + "incident_id", + "created_at" + ] + }, + "IncidentTimestampValueV2": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "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", - "resource" + "incident_timestamp_id", + "created_at" ] }, - "CreateRequestBody4": { + "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": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 + "description": "What is this incident type for?", + "example": "Customer facing production outages" }, - "instructions": { + "id": { "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" + "description": "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": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 + "description": "The name of this Incident Type", + "example": "Production Outage" }, - "required": { + "private_incidents_only": { "type": "boolean", - "description": "Whether incident require this role to be set", - "example": true + "description": "Should all incidents created with this Incident Type be private?", + "example": false }, - "shortform": { + "updated_at": { "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 + "description": "When this resource was last updated", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" } }, "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": true, - "shortform": "lead" + "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", "name", - "shortform", + "is_default", "description", - "instructions", - "required", - "conditions", - "id", - "role_type", + "private_incidents_only", "created_at", - "updated_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" ] }, - "CreateRequestBody5": { + "IncidentUpdateV2": { "type": "object", "properties": { - "category": { + "created_at": { "type": "string", - "description": "Whether the status should be considered 'live' or 'closed'. The triage and declined statuses cannot be created or modified.", - "example": "live", - "enum": [ - "live", - "closed" - ] + "description": "When the update was created", + "example": "2021-08-17T13:28:57.801578Z", + "format": "date-time" }, - "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": "Unique identifier for this incident update", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "name": { + "incident_id": { "type": "string", - "description": "Unique name of this status", - "example": "Closed" + "description": "The incident this update relates to", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" + }, + "message": { + "type": "string", + "description": "Message that explains the context behind the update", + "example": "We're working on a fix, hoping to ship in the next 30 minutes" + }, + "new_incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + }, + "new_severity": { + "$ref": "#/components/schemas/SeverityV2" + }, + "updater": { + "$ref": "#/components/schemas/ActorV2" } }, "example": { - "category": "live", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "name": "Closed" + "created_at": "2021-08-17T13:28:57.801578Z", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } }, "required": [ - "name", - "description", - "category", "id", - "rank", + "incident_id", + "new_incident_status", + "updater", "created_at", - "updated_at" + "next_update_in_minutes" ] }, - "CreateRequestBody6": { + "IncidentV1": { "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/CustomFieldEntryPayloadV1" + "$ref": "#/components/schemas/CustomFieldEntryV1" }, - "description": "Set the incident's custom fields to these values", + "description": "Custom field entries for this incident", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ] }, - "idempotency_key": { + "id": { "type": "string", - "description": "Unique string used to de-duplicate incident create requests", - "example": "alert-uuid" + "description": "Unique identifier for the incident", + "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, "incident_role_assignments": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV1" + "$ref": "#/components/schemas/IncidentRoleAssignmentV1" }, - "description": "Assign incident roles to these people", + "description": "A list of who is assigned to each role for this incident", "example": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ] }, - "incident_type_id": { - "type": "string", - "description": "Incident type to create this incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" }, "mode": { "type": "string", - "description": "Whether the incident is real or test", + "description": "Whether the incident is real, a test, a tutorial, or importing as a retrospective incident", "example": "real", "enum": [ "real", - "test" + "test", + "tutorial" ] }, "name": { @@ -6184,25 +10784,38 @@ "description": "Explanation of the incident", "example": "Our database is sad" }, - "severity_id": { + "permalink": { "type": "string", - "description": "Severity to create incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "A permanent link to the homepage for this incident", + "example": "https://app.incident.io/incidents/123" }, - "slack_team_id": { + "postmortem_document_url": { "type": "string", - "description": "ID of the Slack team / workspace", - "example": "T02A1FSLE8J" + "description": "Description of the incident", + "example": "https://docs.google.com/my_doc_id" }, - "source_message_channel_id": { + "reference": { "type": "string", - "description": "Channel ID of the source message, if this incident was created from one", + "description": "Reference to this incident, as displayed across the product", + "example": "INC-123" + }, + "severity": { + "$ref": "#/components/schemas/SeverityV2" + }, + "slack_channel_id": { + "type": "string", + "description": "ID of the Slack channel in the organisation Slack workspace", "example": "C02AW36C1M5" }, - "source_message_timestamp": { + "slack_channel_name": { "type": "string", - "description": "Timestamp of the source message, if this incident was created from one", - "example": "1653650280.526509" + "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", @@ -6222,6 +10835,25 @@ "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" + }, + "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": { "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).", @@ -6233,122 +10865,285 @@ } }, "example": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, "custom_field_entries": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ], - "idempotency_key": "alert-uuid", + "id": "01FDAG4SAP5TYPT98WGR2N7W91", "incident_role_assignments": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ], - "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "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", - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "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", - "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.", + "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", - "visibility" + "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" ] }, - "CreateRequestBody7": { + "IncidentV2": { "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/CustomFieldEntryPayloadV1" + "$ref": "#/components/schemas/CustomFieldEntryV1" }, - "description": "Set the incident's custom fields to these values", + "description": "Custom field entries for this incident", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ] }, + "duration_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDurationMetricWithValueV2" + }, + "description": "Incident duration metrics and their measurements for this incident", + "example": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ] + }, + "external_issue_reference": { + "$ref": "#/components/schemas/ExternalIssueReferenceV2" + }, "id": { "type": "string", "description": "Unique identifier for the incident", "example": "01FDAG4SAP5TYPT98WGR2N7W91" }, - "idempotency_key": { - "type": "string", - "description": "Unique string used to de-duplicate incident create requests", - "example": "alert-uuid" - }, "incident_role_assignments": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentPayloadV2" + "$ref": "#/components/schemas/IncidentRoleAssignmentV1" }, - "description": "Assign incident roles to these people", + "description": "A list of who is assigned to each role for this incident", "example": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ] }, - "incident_status_id": { - "type": "string", - "description": "Incident status to assign to the incident", - "example": "01G0J1EXE7AXZ2C93K61WBPYEH" + "incident_status": { + "$ref": "#/components/schemas/IncidentStatusV1" }, "incident_timestamp_values": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampValuePayloadV2" + "$ref": "#/components/schemas/IncidentTimestampWithValueV2" }, - "description": "Assign the incident's timestamps to these values", + "description": "Incident lifecycle events and when they occurred", "example": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } ] }, - "incident_type_id": { - "type": "string", - "description": "Incident type to create this incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" }, "mode": { "type": "string", @@ -6361,22 +11156,42 @@ "tutorial" ] }, - "name": { + "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": "Explanation of the incident", - "example": "Our database is sad" - }, - "retrospective_incident_options": { - "$ref": "#/components/schemas/RetrospectiveIncidentOptionsV2" + "description": "ID of the Slack channel in the organisation Slack workspace", + "example": "C02AW36C1M5" }, - "severity_id": { + "slack_channel_name": { "type": "string", - "description": "Severity to create incident as", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "Name of the slack channel", + "example": "inc-165-green-parrot" }, "slack_team_id": { "type": "string", - "description": "Slack Team to create the incident in", + "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": { @@ -6384,6 +11199,12 @@ "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).", @@ -6392,234 +11213,534 @@ "public", "private" ] + }, + "workload_minutes_late": { + "type": "number", + "description": "Amount of time spent on the incident in late hours", + "example": 40.7, + "format": "double" + }, + "workload_minutes_sleeping": { + "type": "number", + "description": "Amount of time spent on the incident in sleeping hours", + "example": 0, + "format": "double" + }, + "workload_minutes_total": { + "type": "number", + "description": "Amount of time spent on the incident in total", + "example": 60.7, + "format": "double" + }, + "workload_minutes_working": { + "type": "number", + "description": "Amount of time spent on the incident in working hours", + "example": 20, + "format": "double" } }, "example": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, "custom_field_entries": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, "values": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, "value_link": "https://google.com/", "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" } ] } ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "idempotency_key": "alert-uuid", "incident_role_assignments": [ { "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } ], - "incident_status_id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, "incident_timestamp_values": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } ], - "incident_type_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "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", - "retrospective_incident_options": { - "slack_channel_id": "abc123" + "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" }, - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", + "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.", - "visibility": "public" + "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", - "visibility" + "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" ] }, - "CreateRequestBody8": { + "IncidentWithStatusChangeV2": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Description of the severity", - "example": "Issues with **low impact**." + "incident": { + "$ref": "#/components/schemas/IncidentV2" + }, + "new_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + }, + "previous_status": { + "$ref": "#/components/schemas/IncidentStatusV1" + } + }, + "example": { + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 }, - "name": { - "type": "string", - "description": "Human readable name of the severity", - "example": "Minor", - "maxLength": 50 + "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" }, - "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" - ] - }, - "CreateResponseBody": { - "type": "object", - "properties": { - "incident_attachment": { - "$ref": "#/components/schemas/IncidentAttachmentV1" - } - }, - "example": { - "incident_attachment": { + "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", - "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" - } + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" } }, "required": [ - "incident_attachment" + "incident", + "previous_status", + "new_status" ] }, - "CreateTypeRequestBody": { + "ListEntriesResponseBody": { "type": "object", "properties": { - "annotations": { - "type": "object", - "description": "Annotations that can track metadata about this type", - "example": { - "incident.io/catalog-importer/id": "id-of-config" + "catalog_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CatalogEntryV2" }, - "additionalProperties": { - "type": "string", - "example": "abc123" - } - }, - "color": { - "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "slate", - "enum": [ - "slate", - "red", - "yellow", - "green", - "blue", - "violet" - ] - }, - "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", - "clock", - "cog", - "database", - "doc", - "email", - "server", - "severity", - "star", - "tag", - "user", - "users" + "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" + } ] }, - "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 - }, - "semantic_type": { - "type": "string", - "description": "Semantic type of this resource", - "example": "custom" - }, - "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\"]" - }, - "source_repo_url": { - "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/incident-io/catalog-importer" - } - }, - "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "icon": "bolt", - "name": "Kubernetes Cluster", - "ranked": true, - "semantic_type": "custom", - "type_name": "Custom[\"BackstageGroup\"]", - "source_repo_url": "https://github.com/incident-io/catalog-importer" - }, - "required": [ - "name", - "description" - ] - }, - "CreateTypeResponseBody": { - "type": "object", - "properties": { "catalog_type": { "$ref": "#/components/schemas/CatalogTypeV2" + }, + "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" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -6627,7 +11748,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -6635,1328 +11758,2249 @@ "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": [ - "catalog_type" + "catalog_type", + "catalog_entries", + "pagination_meta" ] }, - "CustomFieldEntryPayloadV1": { + "ListResourcesResponseBody": { "type": "object", "properties": { - "custom_field_id": { - "type": "string", - "description": "ID of the custom field this entry is linked against", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "values": { + "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" + } + ] + } + }, + "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" + } + ] + }, + "required": [ + "incident_statuses" + ] + }, + "ListResponseBody11": { + "type": "object", + "properties": { + "incident_timestamps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTimestampV2" + }, + "example": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] + } + }, + "example": { + "incident_timestamps": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } + ] + }, + "required": [ + "incident_timestamps" + ] + }, + "ListResponseBody12": { + "type": "object", + "properties": { + "incident_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentTypeV1" + }, + "example": [ + { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + } + }, + "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" + ] + }, + "ListResponseBody13": { + "type": "object", + "properties": { + "incident_updates": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldValuePayloadV1" + "$ref": "#/components/schemas/IncidentUpdateV2" }, - "description": "List of values to associate with this entry", "example": [ { + "created_at": "2021-08-17T13:28:57.801578Z", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } } ] + }, + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "incident_updates": [ { + "created_at": "2021-08-17T13:28:57.801578Z", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "value_text": "This is my text field, I hope you like it", - "value_timestamp": "" + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "message": "We're working on a fix, hoping to ship in the next 30 minutes", + "new_incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "new_severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "updater": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + } } - ] + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + } }, "required": [ - "custom_field_id", - "values" + "incident_updates" ] }, - "CustomFieldEntryV1": { + "ListResponseBody14": { "type": "object", "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldTypeInfoV1" - }, - "values": { + "incidents": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldValueV1" + "$ref": "#/components/schemas/IncidentV1" }, - "description": "List of custom field values set on this entry", "example": [ { - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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", - "sort_key": 10, - "value": "Product" + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "value_text": "This is my text field, I hope you like it" + "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": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "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", + "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", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_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", - "sort_key": 10, - "value": "Product" + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" }, - "value_text": "This is my text field, I hope you like it" + "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": [ - "custom_field", - "values" - ] - }, - "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" + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 } }, - "example": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - }, "required": [ - "id", - "custom_field_id", - "value", - "sort_key" + "incidents" ] }, - "CustomFieldTypeInfoV1": { + "ListResponseBody15": { "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": { + "incidents": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/IncidentV2" }, - "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" + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 } ] + }, + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResultWithTotal" } }, "example": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + "incidents": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 } - ] + ], + "pagination_meta": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 + } }, "required": [ - "id", - "organisation_id", - "name", - "description", - "dynamic_options", - "rank", - "field_type", - "required", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "is_usable", - "conditions", - "created_at", - "updated_at" + "incidents" ] }, - "CustomFieldV1": { - "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 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": { + "ListResponseBody16": { + "type": "object", + "properties": { + "severities": { "type": "array", "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" + "$ref": "#/components/schemas/SeverityV2" }, - "description": "What options are available for this custom field, if this field has options", "example": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" } ] - }, - "required": { - "type": "string", - "description": "When this custom field must be set during the incident lifecycle.", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" - ] - }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure 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": { - "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": [ + "severities": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" } - ], - "required": "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", - "required", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" + "severities" ] }, - "CustomFieldValuePayloadV1": { + "ListResponseBody17": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the custom field value", - "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" + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" }, - "value_timestamp": { - "type": "string", - "description": "Deprecated: please use incident timestamp values instead", - "example": "" + "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": { - "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": "" - } + "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" + } + ] + }, + "required": [ + "users", + "pagination_meta" + ] }, - "CustomFieldValueV1": { + "ListResponseBody2": { "type": "object", "properties": { - "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" + "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": { - "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" - } + "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" + ] }, - "EditRequestBody": { + "ListResponseBody3": { "type": "object", "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentEditPayloadV2" - }, - "notify_incident_channel": { - "type": "boolean", - "description": "Should we send Slack channel notifications to inform responders of this update? Note that this won't work if the Slack channel has already been archived.", - "example": true + "custom_field_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldOptionV1" + }, + "example": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "pagination_meta": { + "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "incident": { - "custom_field_entries": [ + "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": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ + "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "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": "" + "sort_key": 10, + "value": "Product" } - ] - } - ], - "incident_timestamp_values": [ - { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + ], + "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" } - ], - "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 + ] + } + }, + "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": [ - "incident", - "notify_incident_channel" + "custom_fields" ] }, - "ExternalIssueReferenceV1": { + "ListResponseBody5": { "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", - "linear", - "jira", - "jira_server", - "github", - "shortcut" + "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" + } ] } }, "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", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": [ + "custom_fields" + ] }, - "ExternalIssueReferenceV2": { + "ListResponseBody6": { "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", - "linear", - "jira", - "jira_server", - "github", - "shortcut" + "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": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "follow_ups": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "priority": { + "description": "A follow-up that requires immediate attention.", + "id": "01GNW4BAQ7XRMFF6FHKNXDFPRW", + "name": "Urgent", + "rank": 10 + }, + "status": "outstanding", + "title": "Cat is stuck in the tree", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] + }, + "required": [ + "follow_ups" + ] + }, + "ListResponseBody7": { + "type": "object", + "properties": { + "incident_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/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" + } + } + ] + } + }, + "example": { + "incident_attachments": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H", + "resource": { + "external_id": "123", + "permalink": "https://my.pagerduty.com/incidents/ABC", + "resource_type": "pager_duty_incident", + "title": "The database has gone down" + } + } + ] }, "required": [ - "provider", - "issue_name", - "issue_permalink", - "issue_id" + "incident_attachments" ] }, - "ExternalResourceV1": { + "ListResponseBody8": { "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", - "sentry_issue", - "atlassian_statuspage_incident", - "zendesk_ticket", - "statuspage_incident" + "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" + } ] - }, - "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" + "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": [ - "id", - "permalink", - "external_id", - "title", - "resource_type", - "resource_type_label", - "created_at", - "updated_at" + "incident_roles" ] }, - "IdentityResponseBody": { + "ListResponseBody9": { "type": "object", "properties": { - "identity": { - "$ref": "#/components/schemas/IdentityV1" + "incident_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentRoleV2" + }, + "example": [ + { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + ] } }, "example": { - "identity": { - "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": [ - "identity" + "incident_roles" ] }, - "IdentityV1": { + "ListTypesResponseBody": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name assigned to the current API Key", - "example": "Alertmanager token" - }, - "roles": { + "catalog_types": { "type": "array", "items": { - "type": "string", - "example": "incident_creator", - "enum": [ - "viewer", - "incident_creator", - "incident_editor", - "manage_settings", - "global_access", - "catalog_viewer", - "catalog_editor" - ] + "$ref": "#/components/schemas/CatalogTypeV2" }, - "description": "Which roles have been enabled for this key", "example": [ - "incident_creator" + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": [ + "pager_duty" + ], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + } ] } }, "example": { - "name": "Alertmanager token", - "roles": [ - "incident_creator" + "catalog_types": [ + { + "annotations": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "color": "yellow", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "dynamic_resource_parameter": "abc123", + "estimated_count": 7, + "icon": "bolt", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_editable": false, + "last_synced_at": "2021-08-17T13:28:57.801578Z", + "name": "Kubernetes Cluster", + "ranked": true, + "registry_type": "PagerDutyService", + "required_integrations": [ + "pager_duty" + ], + "schema": { + "attributes": [ + { + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" + } + ], + "version": 1 + }, + "semantic_type": "custom", + "source_repo_url": "https://github.com/my-company/incident-io-catalog", + "type_name": "Custom[\"BackstageGroup\"]", + "updated_at": "2021-08-17T13:28:57.801578Z" + } ] }, "required": [ - "name", - "roles" + "catalog_types" ] }, - "IncidentAttachmentV1": { + "PaginationMetaResult": { "type": "object", "properties": { - "id": { + "after": { "type": "string", - "description": "Unique identifier of this incident membership", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "description": "If provided, pass this as the 'after' param to load the next page", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "incident_id": { + "page_size": { + "type": "integer", + "description": "What was the maximum number of results requested", + "default": 25, + "example": 25, + "format": "int64" + } + }, + "example": { + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25 + }, + "required": [ + "page_size" + ] + }, + "PaginationMetaResultWithTotal": { + "type": "object", + "properties": { + "after": { "type": "string", - "description": "Unique identifier of the incident", - "example": "01FCNDV6P870EA6S7TK1DSYD5H" + "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" }, - "resource": { - "$ref": "#/components/schemas/ExternalResourceV1" + "total_record_count": { + "type": "integer", + "description": "How many matching records were there in total, if known", + "example": 238, + "format": "int64" } }, "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" - } + "after": "01FCNDV6P870EA6S7TK1DSYDG0", + "page_size": 25, + "total_record_count": 238 }, "required": [ - "id", - "organisation_id", - "incident_id", - "resource", - "creator", - "created_at" + "page_size" ] }, - "IncidentEditPayloadV2": { + "PrivateIncidentAccessAttemptedV1ResponseBody": { "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_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": "" - } - ] - } - ] + "action": { + "type": "string", + "description": "The type of log entry that this is", + "example": "private_incident.access_attempted" }, - "incident_timestamp_values": { + "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/IncidentTimestampValuePayloadV2" + "$ref": "#/components/schemas/AuditLogTargetV2" }, - "description": "Assign the incident's timestamps to these values", + "description": "The custom field that was created", "example": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } ] }, - "name": { - "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" - }, - "severity_id": { - "type": "string", - "description": "Severity to change incident to", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" - }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "custom_field_entries": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "values": [ - { - "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_timestamp_values": [ + "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": [ { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "2021-08-17T13:28:57.801578Z" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } ], - "name": "Our database is sad", - "severity_id": "01FH5TZRWMNAFB0DZ23FD1TV96", - "summary": "Our database is really really sad, and we don't know why yet." - } + "version": 1 + }, + "required": [ + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" + ] }, - "IncidentRoleAssignmentPayloadV1": { + "PrivateIncidentActionCreatedV1ResponseBody": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" - }, - "incident_role_id": { + "event_type": { "type": "string", - "description": "Unique ID of an incident role", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "What type of event is this webhook for?", + "example": "private_incident.action_created_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.action_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "event_type": "private_incident.action_created_v1", + "private_incident.action_created_v1": { + "id": "abc123" + } }, "required": [ - "incident_role_id", - "assignee" + "event_type", + "private_incident.action_created_v1" ] }, - "IncidentRoleAssignmentPayloadV2": { + "PrivateIncidentActionUpdatedV1ResponseBody": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserReferencePayloadV1" - }, - "incident_role_id": { + "event_type": { "type": "string", - "description": "Unique ID of an incident role", - "example": "01FH5TZRWMNAFB0DZ23FD1TV96" + "description": "What type of event is this webhook for?", + "example": "private_incident.action_updated_v1", + "enum": [ + "public_incident.incident_created_v2", + "private_incident.incident_created_v2", + "public_incident.incident_updated_v2", + "private_incident.incident_updated_v2", + "public_incident.incident_status_updated_v2", + "public_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1", + "public_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1", + "public_incident.action_created_v1", + "private_incident.action_created_v1", + "public_incident.action_updated_v1", + "private_incident.action_updated_v1", + "private_incident.membership_granted_v1", + "private_incident.membership_revoked_v1" + ] + }, + "private_incident.action_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "assignee": { - "email": "bob@example.com", - "id": "01G0J1EXE7AXZ2C93K61WBPYEH", - "slack_user_id": "USER123" - }, - "incident_role_id": "01FH5TZRWMNAFB0DZ23FD1TV96" + "event_type": "private_incident.action_updated_v1", + "private_incident.action_updated_v1": { + "id": "abc123" + } }, "required": [ - "incident_role_id" + "event_type", + "private_incident.action_updated_v1" ] }, - "IncidentRoleAssignmentV1": { + "PrivateIncidentFollowUpCreatedV1ResponseBody": { "type": "object", "properties": { - "assignee": { - "$ref": "#/components/schemas/UserV1" + "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" + ] }, - "role": { - "$ref": "#/components/schemas/IncidentRoleV1" + "private_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1": { + "id": "abc123" } }, "required": [ - "role" + "event_type", + "private_incident.follow_up_created_v1" ] }, - "IncidentRoleV1": { + "PrivateIncidentFollowUpUpdatedV1ResponseBody": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the action was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 - }, - "id": { - "type": "string", - "description": "Unique identifier for the role", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" - }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 - }, - "required": { - "type": "boolean", - "description": "Whether incident require this role to be set", - "example": true - }, - "role_type": { + "event_type": { "type": "string", - "description": "Type of incident role", - "example": "lead", + "description": "What type of event is this webhook for?", + "example": "private_incident.follow_up_updated_v1", "enum": [ - "lead", - "reporter", - "custom" + "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" ] }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 - }, - "updated_at": { - "type": "string", - "description": "When the action was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "private_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1": { + "id": "abc123" + } }, "required": [ - "conditions", - "id", - "name", - "description", - "instructions", - "shortform", - "role_type", - "required", - "created_at", - "updated_at" + "event_type", + "private_incident.follow_up_updated_v1" ] }, - "IncidentStatusV1": { + "PrivateIncidentIncidentCreatedV2ResponseBody": { "type": "object", "properties": { - "category": { + "event_type": { "type": "string", - "description": "Whether this status is a live or closed status. If you have enabled auto-create, there will also be 'triage' and 'declined' statuses, which cannot be modified.", - "example": "triage", + "description": "What type of event is this webhook for?", + "example": "private_incident.incident_created_v2", "enum": [ - "triage", - "declined", - "merged", - "live", - "closed" + "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", - "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" + "private_incident.incident_created_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" + "event_type": "private_incident.incident_created_v2", + "private_incident.incident_created_v2": { + "id": "abc123" + } }, "required": [ - "id", - "name", - "description", - "rank", - "category", - "created_at", - "updated_at" + "event_type", + "private_incident.incident_created_v2" ] }, - "IncidentTimestampV1": { + "PrivateIncidentIncidentUpdatedV2ResponseBody": { "type": "object", "properties": { - "last_occurred_at": { + "event_type": { "type": "string", - "description": "When this last occurred, if it did", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "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" + ] }, - "name": { - "type": "string", - "description": "Name of the lifecycle event", - "example": "last_activity" + "private_incident.incident_updated_v2": { + "$ref": "#/components/schemas/WebhookPrivateResourceV2" } }, "example": { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "event_type": "private_incident.incident_updated_v2", + "private_incident.incident_updated_v2": { + "id": "abc123" + } }, "required": [ - "name" + "event_type", + "private_incident.incident_updated_v2" ] }, - "IncidentTimestampV2": { + "PrivateIncidentMembershipGrantedV1ResponseBody": { "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.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" + ] }, - "rank": { - "type": "integer", - "description": "Order in which this timestamp should be shown", - "example": 1, - "format": "int64" + "private_incident.membership_granted_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" } }, "example": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "event_type": "private_incident.membership_granted_v1", + "private_incident.membership_granted_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + } }, "required": [ - "id", - "name", - "description", - "rank", - "required", - "show_before_creation", - "show_before_closure", - "show_in_announcement_post", - "set_on_transition", - "set_on_visit", - "set_on_creation", - "timestamp_type", - "created_at", - "updated_at" + "event_type", + "private_incident.membership_granted_v1" ] }, - "IncidentTimestampValuePayloadV2": { + "PrivateIncidentMembershipRevokedV1ResponseBody": { "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.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" + ] }, - "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.membership_revoked_v1": { + "$ref": "#/components/schemas/WebhookIncidentUserV2" } }, "example": { - "incident_timestamp_id": "01FCNDV6P870EA6S7TK1DSYD5H", - "value": "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": [ - "incident_timestamp_id", - "id", - "incident_id", - "created_at" + "event_type", + "private_incident.membership_revoked_v1" ] }, - "IncidentTimestampValueV2": { + "PublicIncidentActionCreatedV1ResponseBody": { "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": "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" } }, "example": { - "value": "2021-08-17T13:28:57.801578Z" + "event_type": "public_incident.action_created_v1", + "public_incident.action_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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", - "incident_timestamp_id", - "created_at" + "event_type", + "public_incident.action_created_v1" ] }, - "IncidentTimestampWithValueV2": { + "PublicIncidentActionUpdatedV1ResponseBody": { "type": "object", "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" + "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" + ] }, - "value": { - "$ref": "#/components/schemas/IncidentTimestampValueV2" + "public_incident.action_updated_v1": { + "$ref": "#/components/schemas/ActionV1" } }, "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "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", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, "required": [ - "incident_timestamp" + "event_type", + "public_incident.action_updated_v1" ] }, - "IncidentTypeV1": { + "PublicIncidentFollowUpCreatedV1ResponseBody": { "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": "public_incident.follow_up_created_v1", "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": { - "type": "string", - "description": "What is this incident type for?", - "example": "Customer facing production outages" - }, - "id": { - "type": "string", - "description": "Unique identifier for this Incident Type", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "is_default": { - "type": "boolean", - "description": "The default Incident Type is used when no other type is explicitly specified", - "example": false - }, - "name": { - "type": "string", - "description": "The name of this Incident Type", - "example": "Production Outage" - }, - "private_incidents_only": { - "type": "boolean", - "description": "Should all incidents created with this Incident Type be private?", - "example": false - }, - "updated_at": { - "type": "string", - "description": "When this resource was last updated", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "public_incident.follow_up_created_v1": { + "$ref": "#/components/schemas/ActionV1" } }, "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": "public_incident.follow_up_created_v1", + "public_incident.follow_up_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } }, "required": [ - "id", - "name", - "is_default", - "description", - "private_incidents_only", - "created_at", - "updated_at", - "create_in_triage", - "severity_aliases", - "rank", - "update_template_mode" + "event_type", + "public_incident.follow_up_created_v1" ] }, - "IncidentUpdateV2": { + "PublicIncidentFollowUpUpdatedV1ResponseBody": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "When the update was created", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" - }, - "id": { - "type": "string", - "description": "Unique identifier for this incident update", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "incident_id": { - "type": "string", - "description": "The incident this update relates to", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "message": { + "event_type": { "type": "string", - "description": "Message that explains the context behind the update", - "example": "The cat is getting irritable, best rescue it soon" - }, - "new_incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "new_severity": { - "$ref": "#/components/schemas/SeverityV2" - }, - "updater": { - "$ref": "#/components/schemas/ActorV2" - } - }, - "example": { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "The cat is getting irritable, best rescue it soon", - "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" + "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" + ] }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { + "public_incident.follow_up_updated_v1": { + "$ref": "#/components/schemas/ActionV1" + } + }, + "example": { + "event_type": "public_incident.follow_up_updated_v1", + "public_incident.follow_up_updated_v1": { + "assignee": { "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", "name": "Lisa Karlin Curtis", "role": "viewer", "slack_user_id": "U02AYNF2XJM" - } + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" } }, "required": [ - "id", - "incident_id", - "new_incident_status", - "updater", - "created_at", - "next_update_in_minutes" + "event_type", + "public_incident.follow_up_updated_v1" ] }, - "IncidentV1": { + "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/IncidentV2" + } + }, + "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", @@ -7974,6 +14018,15 @@ }, "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": { @@ -7986,20 +14039,23 @@ } ] } - ] - }, - "id": { - "type": "string", - "description": "Unique identifier for the incident", - "example": "01FDAG4SAP5TYPT98WGR2N7W91" - }, - "incident_role_assignments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentRoleAssignmentV1" + ], + "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" }, - "description": "A list of who is assigned to each role for this incident", - "example": [ + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { "assignee": { "email": "lisa@incident.io", @@ -8014,267 +14070,327 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "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", - "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", - "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/IncidentTimestampV1" + ], + "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 last occurred", - "example": [ + "incident_timestamp_values": [ { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } } - ] - }, - "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", + "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", + "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" ] + }, + "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", + "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", - "sort_key": 10, - "value": "Product" - } - ] + "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" }, - "values": [ + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "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" + } } - ] - } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "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" }, - "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": true, - "role_type": "lead", - "shortform": "lead", + "name": "Minor", + "rank": 1, "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" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "new_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } }, "required": [ - "status", - "id", - "external_id", - "reference", - "name", - "incident_status", - "idempotency_key", - "visibility", - "mode", - "organisation_id", - "creator", - "last_activity_at", - "incident_role_assignments", - "custom_field_entries", - "slack_team_id", - "slack_channel_id", - "active_participants", - "passive_participants", - "created_at", - "updated_at", - "reported_at" + "event_type", + "public_incident.incident_status_updated_v2" ] }, - "IncidentV2": { + "PublicIncidentIncidentUpdatedV2ResponseBody": { "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_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" + ] }, - "custom_field_entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldEntryV1" + "public_incident.incident_updated_v2": { + "$ref": "#/components/schemas/IncidentV2" + } + }, + "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" + } }, - "description": "Custom field entries for this incident", - "example": [ + "custom_field_entries": [ { "custom_field": { "description": "Which team is impacted by this issue", @@ -8292,6 +14408,15 @@ }, "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": { @@ -8304,23 +14429,23 @@ } ] } - ] - }, - "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" + ], + "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" }, - "description": "A list of who is assigned to each role for this incident", - "example": [ + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ { "assignee": { "email": "lisa@incident.io", @@ -8335,24 +14460,23 @@ "id": "01FCNDV6P870EA6S7TK1DSYDG0", "instructions": "Take point on the incident; Make sure people are clear on responsibilities", "name": "Incident Lead", - "required": true, + "required": false, "role_type": "lead", "shortform": "lead", "updated_at": "2021-08-17T13:28:57.801578Z" } } - ] - }, - "incident_status": { - "$ref": "#/components/schemas/IncidentStatusV1" - }, - "incident_timestamp_values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTimestampWithValueV2" + ], + "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", @@ -8363,351 +14487,317 @@ "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": { + ], + "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", + "public_incident.incident_updated_v2" + ] + }, + "RBACRoleV2": { + "type": "object", + "properties": { + "description": { "type": "string", - "description": "Explanation of the incident", - "example": "Our database is sad" + "description": "Description of the purpose for the RBAC role", + "example": "Elevated permissions for the customer success team." }, - "permalink": { + "id": { "type": "string", - "description": "A permanent link to the homepage for this incident", - "example": "https://app.incident.io/incidents/123" + "description": "Unique identifier of the RBAC role", + "example": "01FCNDV6P870EA6S7TK1DSYDG0" }, - "postmortem_document_url": { + "name": { "type": "string", - "description": "Description of the incident", - "example": "https://docs.google.com/my_doc_id" + "description": "Name of the RBAC role", + "example": "Customer Success" }, - "reference": { + "slug": { "type": "string", - "description": "Reference to this incident, as displayed across the product", - "example": "INC-123" - }, - "severity": { - "$ref": "#/components/schemas/SeverityV2" - }, + "description": "Unique human-readable slug for the RBAC role", + "example": "customer-success" + } + }, + "example": { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + }, + "required": [ + "id", + "name", + "slug" + ] + }, + "RetrospectiveIncidentOptionsV2": { + "type": "object", + "properties": { "slack_channel_id": { "type": "string", - "description": "ID of the Slack channel in the organisation Slack workspace", - "example": "C02AW36C1M5" - }, - "slack_channel_name": { + "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": { + "slack_channel_id": "abc123" + } + }, + "ScimGroupRoleMappingsUpdatedV1ResponseBody": { + "type": "object", + "properties": { + "action": { "type": "string", - "description": "Name of the slack channel", - "example": "inc-165-green-parrot" + "description": "The type of log entry that this is", + "example": "scim_group.role_mappings_updated" }, - "slack_team_id": { - "type": "string", - "description": "ID of the Slack team / workspace", - "example": "T02A1FSLE8J" + "actor": { + "$ref": "#/components/schemas/AuditLogActorV2" }, - "summary": { - "type": "string", - "description": "Detailed description of the incident", - "example": "Our database is really really sad, and we don't know why yet." + "context": { + "$ref": "#/components/schemas/AuditLogEntryContextV2" }, - "updated_at": { + "metadata": { + "$ref": "#/components/schemas/AuditLogUserSCIMGroupMappingChangedMetadataV2" + }, + "occurred_at": { "type": "string", - "description": "When the incident was last updated", + "description": "When the entry occurred", "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" + "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": { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" + "action": "scim_group.role_mappings_updated", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "name": "John Doe", + "type": "user" }, - "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_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" - } - ] - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" }, - "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": true, - "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" + "metadata": { + "after_base_role_slug": "owner", + "after_custom_role_slugs": "engineering,data", + "before_base_role_slug": "admin", + "before_custom_role_slugs": "engineering,security" }, - "incident_timestamp_values": [ + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Security", + "type": "scim_group" } ], - "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" + "version": 1 }, "required": [ - "incident_status", - "id", - "external_id", - "reference", - "name", - "idempotency_key", - "visibility", - "mode", - "organisation_id", - "creator", - "last_activity_at", - "incident_role_assignments", - "custom_field_entries", - "slack_team_id", - "slack_channel_id", - "active_participants", - "passive_participants", - "created_at", - "updated_at", - "reported_at" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "ListEntriesResponseBody": { + "SeverityV2": { "type": "object", "properties": { - "catalog_entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogEntryV2" - }, - "example": [ - { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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" - } - } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "created_at": { + "type": "string", + "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" + }, + "required": [ + "id", + "name", + "description", + "rank", + "created_at", + "updated_at" + ] + }, + "ShowEntryResponseBody": { + "type": "object", + "properties": { + "catalog_entry": { + "$ref": "#/components/schemas/CatalogEntryV2" }, "catalog_type": { "$ref": "#/components/schemas/CatalogTypeV2" - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" } }, "example": { - "catalog_entries": [ - { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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": { + "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", - "sort_key": "000020" + "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_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "created_at": "2021-08-17T13:28:57.801578Z", + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call", + "rank": 3, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, "catalog_type": { "annotations": { "incident.io/catalog-importer/id": "id-of-config" }, - "color": "slate", + "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, - "external_type": "PagerDutyService", "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" ], @@ -8715,7 +14805,9 @@ "attributes": [ { "array": false, + "backlink_attribute": "abc123", "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", "name": "tier", "type": "Custom[\"Service\"]" } @@ -8723,3188 +14815,3697 @@ "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": [ "catalog_type", - "catalog_entries", - "pagination_meta" + "catalog_entry" ] }, - "ListResourcesResponseBody": { + "ShowResponseBody": { "type": "object", "properties": { - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogResourceV2" + "action": { + "$ref": "#/components/schemas/ActionV1" + } + }, + "example": { + "action": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, - "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" - } - ] + "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": { - "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" - } - ] + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + } }, "required": [ - "resources" + "incident_timestamp" ] }, - "ListResponseBody": { + "ShowResponseBody11": { "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" - } - ] + "incident_type": { + "$ref": "#/components/schemas/IncidentTypeV1" } }, "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" - } - ] + "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": [ - "actions" + "incident_type" ] }, - "ListResponseBody10": { + "ShowResponseBody12": { "type": "object", "properties": { - "incidents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentV1" + "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" + } }, - "example": [ + "custom_field_entries": [ { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } + "custom_field": { + "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" + } + ] }, - "custom_field_entries": [ + "values": [ { - "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_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", + "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" }, - "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": true, - "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" + "value_text": "This is my text field, I hope you like it" } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" + ] } - ] - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" - } - }, - "example": { - "incidents": [ - { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { + ], + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "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_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": true, - "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" + "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" } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "real", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "status": "triage", + "summary": "Our database is really really sad, and we don't know why yet.", + "timestamps": [ + { + "last_occurred_at": "2021-08-17T13:28:57.801578Z", + "name": "last_activity" + } + ], + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public" } }, "required": [ - "incidents" + "incident" ] }, - "ListResponseBody11": { + "ShowResponseBody13": { "type": "object", "properties": { - "incidents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentV2" + "incident": { + "$ref": "#/components/schemas/IncidentV2" + } + }, + "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" + } }, - "example": [ + "custom_field_entries": [ { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, - "values": [ - { - "value_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" - } - ] - } - ], - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" + "sort_key": 10, + "value": "Product" + } + ] }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ + "values": [ { - "assignee": { - "email": "lisa@incident.io", + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + "name": "Primary On-call" }, - "role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "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 + "sort_key": 10, + "value": "Product" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" - } + "value_text": "This is my text field, I hope you like it" } - ], - "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" + ] } - ] - }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResultWithTotal" - } - }, - "example": { - "incidents": [ - { - "call_url": "https://zoom.us/foo", - "created_at": "2021-08-17T13:28:57.801578Z", - "creator": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" }, - "user": { + "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" } - }, - "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_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" - } - ] - } - ], - "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": true, - "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_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" - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + } + ], + "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": [ - "incidents" + "incident" ] }, - "ListResponseBody12": { + "ShowResponseBody14": { "type": "object", "properties": { - "severities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeverityV2" + "severity": { + "$ref": "#/components/schemas/SeverityV2" + } + }, + "example": { + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "severity" + ] + }, + "ShowResponseBody15": { + "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" }, - "example": [ + "custom_roles": [ { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", + "description": "Elevated permissions for the customer success team.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Customer Success", + "slug": "customer-success" } - ] + ], + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "required": [ + "user" + ] + }, + "ShowResponseBody2": { + "type": "object", + "properties": { + "action": { + "$ref": "#/components/schemas/ActionV2" + } + }, + "example": { + "action": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + }, + "required": [ + "action" + ] + }, + "ShowResponseBody3": { + "type": "object", + "properties": { + "custom_field_option": { + "$ref": "#/components/schemas/CustomFieldOptionV1" } }, "example": { - "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" - } - ] + "custom_field_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } }, "required": [ - "severities" + "custom_field_option" ] }, - "ListResponseBody2": { + "ShowResponseBody4": { "type": "object", "properties": { - "custom_field_options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldOptionV1" - }, - "example": [ + "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" } }, - "example": { - "custom_field_options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] - }, "required": [ - "custom_field_options" + "custom_field" ] }, - "ListResponseBody3": { + "ShowResponseBody5": { "type": "object", "properties": { - "custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldV1" - }, - "example": [ - { - "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", - "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" - } - ] + "custom_field": { + "$ref": "#/components/schemas/CustomFieldV2" } }, "example": { - "custom_fields": [ - { - "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", - "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" - } - ] + "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_fields" + "custom_field" ] }, - "ListResponseBody4": { + "ShowResponseBody6": { "type": "object", "properties": { - "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" - } - } - ] + "follow_up": { + "$ref": "#/components/schemas/FollowUpV2" } }, "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" - } - } - ] + "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" + } }, "required": [ - "incident_attachments" + "follow_up" ] }, - "ListResponseBody5": { + "ShowResponseBody7": { "type": "object", "properties": { - "incident_roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentRoleV1" - }, - "example": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "incident_role": { + "$ref": "#/components/schemas/IncidentRoleV1" } }, "example": { - "incident_roles": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "incident_role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } }, "required": [ - "incident_roles" + "incident_role" ] }, - "ListResponseBody6": { + "ShowResponseBody8": { "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" - } - ] + "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_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" - } - ] + "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_statuses" + "incident_status" ] }, - "ListResponseBody7": { + "UpdateEntryRequestBody": { "type": "object", "properties": { - "incident_timestamps": { + "aliases": { "type": "array", "items": { - "$ref": "#/components/schemas/IncidentTimestampV2" + "type": "string", + "example": "abc123" }, + "description": "Optional aliases that can be used to reference this entry", "example": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 - } + "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" + } + }, + "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": { - "incident_timestamps": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + "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": [ - "incident_timestamps" + "name", + "attribute_values" ] }, - "ListResponseBody8": { + "UpdateRequestBody": { "type": "object", "properties": { - "incident_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentTypeV1" - }, - "example": [ - { - "create_in_triage": "always", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Customer facing production outages", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "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": { - "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" - } - ] + "sort_key": 10, + "value": "Product" }, "required": [ - "incident_types" + "value", + "custom_field_id", + "sort_key" ] }, - "ListResponseBody9": { + "UpdateRequestBody2": { "type": "object", "properties": { - "incident_updates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IncidentUpdateV2" - }, - "example": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "The cat is getting irritable, best rescue it soon", - "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" - } - } - } + "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" ] }, - "pagination_meta": { - "$ref": "#/components/schemas/PaginationMetaResult" + "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": { - "incident_updates": [ - { - "created_at": "2021-08-17T13:28:57.801578Z", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "message": "The cat is getting irritable, best rescue it soon", - "new_incident_status": { - "category": "triage", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Closed", - "rank": 4, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "new_severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "updater": { - "api_key": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "My test API key" - }, - "user": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - } - } - } - ], - "pagination_meta": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 - } + "description": "Which team is impacted by this issue", + "name": "Affected Team" }, "required": [ - "incident_updates" + "name", + "description", + "field_type", + "cannot_be_unset", + "created_at", + "updated_at" ] }, - "ListTypesResponseBody": { + "UpdateRequestBody4": { "type": "object", "properties": { - "catalog_types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogTypeV2" - }, - "example": [ - { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "estimated_count": 7, - "external_type": "PagerDutyService", - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "name": "Kubernetes Cluster", - "ranked": true, - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "description": { + "type": "string", + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 + }, + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "required": { + "type": "boolean", + "description": "DEPRECATED: this will always be false.", + "example": false + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack", + "example": "lead", + "minLength": 1 } }, "example": { - "catalog_types": [ - { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "estimated_count": 7, - "external_type": "PagerDutyService", - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "name": "Kubernetes Cluster", - "ranked": true, - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "type_name": "Custom[\"BackstageGroup\"]", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - ] + "description": "The person currently coordinating the incident", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "shortform": "lead" }, "required": [ - "catalog_types" + "conditions", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" ] }, - "PaginationMetaResult": { + "UpdateRequestBody5": { "type": "object", "properties": { - "after": { + "description": { "type": "string", - "description": "If provided, pass this as the 'after' param to load the next page", - "example": "01FCNDV6P870EA6S7TK1DSYDG0" + "description": "Describes the purpose of the role", + "example": "The person currently coordinating the incident", + "minLength": 1 }, - "page_size": { - "type": "integer", - "description": "What was the maximum number of results requested", - "default": 25, - "example": 25, - "format": "int64" + "instructions": { + "type": "string", + "description": "Provided to whoever is nominated for the role", + "example": "Take point on the incident; Make sure people are clear on responsibilities" + }, + "name": { + "type": "string", + "description": "Human readable name of the incident role", + "example": "Incident Lead", + "minLength": 1 + }, + "shortform": { + "type": "string", + "description": "Short human readable name for Slack", + "example": "lead", + "minLength": 1 } }, "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25 + "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": [ - "page_size" + "conditions", + "name", + "description", + "instructions", + "shortform", + "role_type", + "created_at", + "updated_at" ] }, - "PaginationMetaResultWithTotal": { + "UpdateRequestBody6": { "type": "object", "properties": { - "after": { + "description": { "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" + "description": "Rich text description of the incident status", + "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." }, - "total_record_count": { - "type": "integer", - "description": "How many matching records were there in total, if known", - "example": 238, - "format": "int64" + "name": { + "type": "string", + "description": "Unique name of this status", + "example": "Closed" } }, "example": { - "after": "01FCNDV6P870EA6S7TK1DSYDG0", - "page_size": 25, - "total_record_count": 238 + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "name": "Closed" }, "required": [ - "page_size" + "name", + "description", + "rank", + "category", + "created_at", + "updated_at" ] }, - "PrivateIncidentAccessAttemptedV1ResponseBody": { + "UpdateTypeRequestBody": { "type": "object", "properties": { - "action": { + "annotations": { + "type": "object", + "description": "Annotations that can track metadata about this type", + "example": { + "incident.io/catalog-importer/id": "id-of-config" + }, + "additionalProperties": { + "type": "string", + "example": "abc123" + } + }, + "color": { "type": "string", - "description": "The type of log entry that this is", - "example": "private_incident.access_attempted" + "description": "Sets the display color of this type in the dashboard", + "example": "yellow", + "enum": [ + "yellow", + "green", + "blue", + "violet", + "pink", + "cyan", + "orange" + ] }, - "actor": { - "$ref": "#/components/schemas/AuditLogActorV2" + "description": { + "type": "string", + "description": "Human readble description of this type", + "example": "Represents Kubernetes clusters that we run inside of GKE." }, - "context": { - "$ref": "#/components/schemas/AuditLogEntryContextV2" + "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" + ] }, - "metadata": { - "$ref": "#/components/schemas/AuditLogPrivateIncidentAccessAttemptedMetadataV2" + "name": { + "type": "string", + "description": "Name is the human readable name of this type", + "example": "Kubernetes Cluster" }, - "occurred_at": { + "ranked": { + "type": "boolean", + "description": "If this type should be ranked", + "example": true + }, + "source_repo_url": { "type": "string", - "description": "When the entry occurred", - "example": "2021-08-17T13:28:57.801578Z", - "format": "date-time" + "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" }, - "targets": { + "color": "yellow", + "description": "Represents Kubernetes clusters that we run inside of GKE.", + "icon": "bolt", + "name": "Kubernetes Cluster", + "ranked": true, + "source_repo_url": "https://github.com/my-company/incident-io-catalog" + }, + "required": [ + "name", + "description" + ] + }, + "UpdateTypeSchemaRequestBody": { + "type": "object", + "properties": { + "attributes": { "type": "array", "items": { - "$ref": "#/components/schemas/AuditLogTargetV2" + "$ref": "#/components/schemas/CatalogTypeAttributePayloadV2" }, - "description": "The custom field that was created", "example": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" } ] }, "version": { "type": "integer", - "description": "Which version the event is", "example": 1, "format": "int64" } }, "example": { - "action": "private_incident.access_attempted", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "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": [ + "attributes": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "array": false, + "backlink_attribute": "abc123", + "id": "01GW2G3V0S59R238FAHPDS1R66", + "mode": "manual", + "name": "tier", + "type": "Custom[\"Service\"]" } ], "version": 1 }, "required": [ - "action", - "occurred_at", + "attributes", "version", - "actor", - "targets", - "context", - "metadata" + "name", + "description", + "type_name", + "semantic_type", + "ranked", + "schema", + "icon", + "color", + "is_editable", + "annotations", + "created_at", + "updated_at", + "mode" ] }, - "PrivateIncidentFollowUpCreatedV1ResponseBody": { + "UserReferencePayloadV1": { "type": "object", "properties": { - "event_type": { + "email": { "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.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" - ] + "description": "The user's email address, matching the email on their Slack account", + "example": "bob@example.com" }, - "private_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" - } - }, - "example": { - "event_type": "private_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1": { - "id": "abc123" - } - }, - "required": [ - "event_type", - "private_incident.follow_up_created_v1" - ] - }, - "PrivateIncidentFollowUpUpdatedV1ResponseBody": { - "type": "object", - "properties": { - "event_type": { + "id": { "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.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" - ] + "description": "The incident.io ID of a user", + "example": "01G0J1EXE7AXZ2C93K61WBPYEH" }, - "private_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "slack_user_id": { + "type": "string", + "description": "The ID of the user's Slack account.", + "example": "USER123" } }, "example": { - "event_type": "private_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1": { - "id": "abc123" - } - }, - "required": [ - "event_type", - "private_incident.follow_up_updated_v1" - ] + "email": "bob@example.com", + "id": "01G0J1EXE7AXZ2C93K61WBPYEH", + "slack_user_id": "USER123" + } }, - "PrivateIncidentIncidentCreatedV2ResponseBody": { + "UserRoleMembershipsUpdatedV1ResponseBody": { "type": "object", "properties": { - "event_type": { + "action": { "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.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" + "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" + } ] }, - "private_incident.incident_created_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "version": { + "type": "integer", + "description": "Which version the event is", + "example": 1, + "format": "int64" } }, "example": { - "event_type": "private_incident.incident_created_v2", - "private_incident.incident_created_v2": { - "id": "abc123" - } + "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": [ - "event_type", - "private_incident.incident_created_v2" + "action", + "occurred_at", + "version", + "actor", + "targets", + "context", + "metadata" ] }, - "PrivateIncidentIncidentUpdatedV2ResponseBody": { + "UserV1": { "type": "object", "properties": { - "event_type": { + "email": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "private_incident.incident_updated_v2", + "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": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_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" + "viewer", + "responder", + "administrator", + "owner", + "unset" ] }, - "private_incident.incident_updated_v2": { - "$ref": "#/components/schemas/WebhookPrivateResourceV2" + "slack_user_id": { + "type": "string", + "description": "Slack ID of the user", + "example": "U02AYNF2XJM" } }, "example": { - "event_type": "private_incident.incident_updated_v2", - "private_incident.incident_updated_v2": { - "id": "abc123" - } + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" }, "required": [ - "event_type", - "private_incident.incident_updated_v2" + "role", + "id", + "slack_role", + "name", + "deprecated_base_role", + "organisation_id" ] }, - "PublicIncidentFollowUpCreatedV1ResponseBody": { + "UserWithRolesV2": { "type": "object", "properties": { - "event_type": { + "base_role": { + "$ref": "#/components/schemas/RBACRoleV2" + }, + "custom_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RBACRoleV2" + }, + "example": [ + { + "description": "Elevated permissions for the customer success team.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Customer Success", + "slug": "customer-success" + } + ] + }, + "email": { "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.follow_up_created_v1", + "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": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_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" + "viewer", + "responder", + "administrator", + "owner", + "unset" ] }, - "public_incident.follow_up_created_v1": { - "$ref": "#/components/schemas/ActionV1" + "slack_user_id": { + "type": "string", + "description": "Slack ID of the user", + "example": "U02AYNF2XJM" } }, "example": { - "event_type": "public_incident.follow_up_created_v1", - "public_incident.follow_up_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, + "base_role": { + "description": "Elevated permissions for the customer success team.", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "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", - "public_incident.follow_up_created_v1" + "base_role", + "custom_roles", + "role", + "id", + "slack_role", + "name", + "deprecated_base_role", + "organisation_id" ] }, - "PublicIncidentFollowUpUpdatedV1ResponseBody": { + "WebhookIncidentUserV2": { "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.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" - ] - }, - "public_incident.follow_up_updated_v1": { - "$ref": "#/components/schemas/ActionV1" - } - }, - "example": { - "event_type": "public_incident.follow_up_updated_v1", - "public_incident.follow_up_updated_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" + "actor_user_id": { + "type": "string", + "description": "The ID of the user who performed this action", + "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": [ - "event_type", - "public_incident.follow_up_updated_v1" + "incident_id", + "user_id" ] }, - "PublicIncidentIncidentCreatedV2ResponseBody": { + "WebhookPrivateResourceV2": { "type": "object", "properties": { - "event_type": { + "id": { "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.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" - ] - }, - "public_incident.incident_created_v2": { - "$ref": "#/components/schemas/IncidentV2" + "description": "The ID of the resource", + "example": "abc123" } }, "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": "abc123" + }, + "required": [ + "id" + ] + } + } + }, + "tags": [ + { + "name": "Actions V1", + "description": "Manage incident actions.\n\nThese endpoints have been deprecated in favour of Actions V2 and Follow-ups V2, as these\nconcepts have become increasingly separate.\n\nIncidents have two types of actions associated to them:\n\n- Actions, used during an incident response as ephemeral todo lists\n- Follow-ups, actions which are for after the incident and can be exported to external\n\tissue trackers\n\nYou can manage actions in the incident Slack channel with /incident actions, or on\nthe incident homepage.\n\nExporting follow-ups to external issue trackers can be done in the incident homepage.\n" + }, + { + "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 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" + }, + { + "name": "Catalog V2", + "description": "Manage and browse catalog resources.\n\nUse the incident.io catalog to track services, teams, product features and anything\nelse that helps build a map of your organisation. These different categories of thing\nbecome catalog types, and each instance (like a particular service or team) is a\ncatalog entry.\n\nEach type is made up of a series of attributes, and each attribute has a type. Types\ncan even have attributes that refer to other catalog types.\n\nWe automatically create catalog types when you connect an integration, such as GitHub \nrepositories or PagerDuty services and teams. You can use this API to create custom\ntypes, that are specifically tailored to your organisation.\n\nExamples might be a 'Service' type with an 'Alert channel' which you can point at a \nSlack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack\nusers. You can then use these types to create powerful new workflows.\n" + }, + { + "name": "Custom Field Options V1", + "description": "Manage custom field options.\n\nSingle- and multi-select custom fields have a list of all available options,\nwhich have a value, and a sort key. The value must be unique to the custom\nfield. For example, you might have an Incident Type custom field, with options\n\"Data breach\", \"Performance degradation\", \"API downtime\", etc." + }, + { + "name": "Custom Fields V1", + "description": "Manage custom fields.\n\nCustom fields are used to attach metadata to incidents, which you can use when searching\nfor incidents in the dashboard, triggering workflows, building announcement rules or for\nyour own data needs.\n\nEach field has a type:\n\n- Single-select, single value selected from a predefined list of options (e.g. Detection Method)\n- Multi-select, as above but you can pick more than one option (e.g. Affected Teams)\n- Text, freeform text field (e.g. Customer ID)\n- Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)\n- Number, integer or fractional numbers (e.g. # Customers Affected)\n\nWe may add more custom field types in the future - we'd love to hear any other types you'd like to use!\n" + }, + { + "name": "Custom Fields V2", + "description": "Manage custom fields.\n\nCustom fields are used to attach metadata to incidents, which you can use when searching\nfor incidents in the dashboard, triggering workflows, building announcement rules or for\nyour own data needs.\n\nEach field has a type:\n\n- Single-select, single value selected from a predefined list of options (e.g. Detection Method)\n- Multi-select, as above but you can pick more than one option (e.g. Affected Teams)\n- Text, freeform text field (e.g. Customer ID)\n- Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)\n- Number, integer or fractional numbers (e.g. # Customers Affected)\n\nSingle-select and multi-select fields can also be powered by the Catalog. This will mean a field has a\ncatalog_type_id, which links it to the catalog type that it references.\n\nWe may add more custom field types in the future - we'd love to hear any other types you'd like to use!\n" + }, + { + "name": "Follow-ups V2", + "description": "Manage incident follow-ups.\n\nIncidents can have follow-ups associated with them, which track work that should be done\nafter an incident (e.g. improving some documentation, or upgrading a dependency). They can\nalso be exported to external issue trackers.\n\nYou can manage follow-ups in the incident Slack channel with /incident follow-ups, or on\nthe incident homepage.\n" + }, + { + "name": "Incident Attachments V1", + "description": "Create, list and delete incident attachments.\n\nIncident Attachments allows you to connect resources from external systems into incidents.\nExamples include: PagerDuty incidents and GitHub pull requests.\n" + }, + { + "name": "Incident Memberships V1", + "description": "Manage private incident memberships" + }, + { + "name": "Incident Roles V1", + "description": "Manage incident roles.\n\nDuring an incident, you can assign responders to one of the incident roles that are\nconfigured in your organisation settings.\n\nEvery organisation will have a special 'lead' role, which signifies the incident lead or\ncommander. This role cannot be deleted, but can be renamed in the incident.io dashboard.\n" + }, + { + "name": "Incident Roles V2", + "description": "Manage incident roles.\n\nDuring an incident, you can assign responders to one of the incident roles that are\nconfigured in your organisation settings.\n\nEvery organisation will have a special 'lead' role, which signifies the incident lead or\ncommander. This role cannot be deleted, but can be renamed in the incident.io dashboard.\n" + }, + { + "name": "Incident Statuses V1", + "description": "Manage incident statuses.\n\nEach incident has a status, picked from one of the statuses configured in your\norganisations settings.\n\nStatuses help communicate where an incident is in its lifecycle. You can use\nstatuses when filtering incidents in the dashboard, and in workflows and announcement\nrules.\n" + }, + { + "name": "Incident Timestamps V2", + "description": "View incident timestamps.\n\nEach incident has a number of timestamps; some being defaults that we set on\neach incident for you, and other being configured for your organisation within\nsettings.\n\nTimestamps help to communicate when a given action was taken for a specific\nincident, for example when it was reported, closed or fixed.\n" + }, + { + "name": "Incident Types V1", + "description": "View incident types.\n\nWith incident types enabled, you can tailor your process to the situation you're\nresponding to with different custom fields and roles for each incident type.\n" + }, + { + "name": "Incident Updates V2", + "description": "List incident updates.\n\nIncident Updates allows you to see all the updates that have been shared against a\nparticular incident. This will include any time that the Severity or Status of\nan incident changed, alongside any additional updates that were provided.\n" + }, + { + "name": "Incidents V1", + "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": "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": "Severities V1", + "description": "Manage incident severities.\n\nEach incident has a severity, picked from one of the severities configured in your\norganisations settings.\n\nSeverities help categorise incidents, and communicate urgency/impact. You can use\nseverities when filtering incidents in the dashboard, and in workflows and announcement\nrules.\n" + }, + { + "name": "Users V2", + "description": "View users.\n\nUsers all have a single base role, and can be assigned multiple custom roles. They can be managed via your Slack workspace or SAML provider.\n" + }, + { + "name": "Utilities V1", + "description": "Miscelaneous utility endpoints.\n\nCollection of utility functions that can help build integrations against this API.\n" + }, + { + "name": "Webhooks", + "description": "Webhooks can be used to receive notifications when certain events occur in incident.io. This might be useful for annotating graphs in a monitoring tool with incidents, or keeping track of follow-ups in another system. Our webhooks are powered by Svix.\n\n## Getting started with webhooks\n\nTo start using webhooks, you’ll need to create a webhook endpoint. You can do this in the same way that you’d create any other endpoint in your application. If you’d like to play around with our webhooks, we’d recommend using Svix play which allows you to set up an endpoint and inspect the payloads via their web interface. There are also other services (e.g. ngrok) which have great debugging tools to help getting started with webhooks.\n\nOnce you have a webhook endpoint set up, you can head to Settings > Webhooks to configure your endpoint. In here you'll be able to choose which types of events you'd like to recieve, send test events, see recent event deliveries, and retry any failed events.\n\n## Status codes, errors and retries\n\nWhen processing webhooks, please return a 2xx status code (e.g. `200 OK` or `204 No Content`). If the endpoint returns a non-2xx status code, we’ll try to resend the event with a backoff over the next 24 hours. If attempts to a specific endpoint repeatedly fail over a 5 day period, we’ll mark the endpoint as disabled and notify you via email. If you do miss some messages (e.g. due to unexpected downtime), Svix offer a number of options for [replaying messages](https://docs.svix.com/receiving/using-app-portal/replaying-messages) which you can access via Settings > Webhooks.\n\n## Verifying webhooks\n\nIt’s important to know whether a webhook has come from incident.io, or a third party that might be trying to exploit a vulnerability. To avoid this, we send a `signature` in the header of our webhooks, which you can verify using the `Signing secret` from the webhook endpoint settings page. The webhooks we send will have three headers that you’ll want to look at:\n\n```json\n{\n \"webhook-id\": \"123\",\n \"webhook-timestamp\": 1676033031,\n \"webhook-signature\": \"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=\"\n}\n```\n\nThese are signed using a HMAC signature in the following format:\n\n```\n${webhook-id}.${webhook-timestamp}.${request_body}\n```\n\nYou can verify the signature either using the Svix client libraries, or manually by following these instructions.\n\n## Keeping another system in-line with incident.io\n\nA common use-case for webhooks is to keep another system up-to-date with everything that’s happening in incident.io. As we deliver webhooks individually over HTTPS, we cannot guarantee that they’ll be delivered in the correct order. That means that, to keep the other system up-to-date, we’d recommend that you build an application which:\n\n- Receives a webhook about INC-123\n- Makes a request to our public API to get the latest state of INC-123\n- Save that state to your system\n\nThis means you aren’t relying on the order in which you receive webhooks to make sure your system remains up-to-date.\n\n## Webhooks on private incidents\n\nIn general, we try to send webhooks with all the relevant information in the payload (e.g. the name, summary, status etc.). However, private incidents are the exception. For private incidents, we only send the ID of the resource that’s been changed. If your integration needs to access the full data, you’ll need to create an API Key that can view private incidents. You can then use that key to get the details about the specific incident or follow-up. This is to make sure we don’t leak information about private incidents to a system that shouldn’t have access to them.\n" + }, + { + "name": "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" + } + ], + "x-webhooks": { + "/x-webhooks/private_incident.action_created_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentActionCreatedV1", + "description": "This webhook is emitted whenever a follow-up for a private incident is created.", + "operationId": "Webhooks#PrivateIncidentActionCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentActionCreatedV1ResponseBody" + }, + "example": { + "event_type": "private_incident.action_created_v1", + "private_incident.action_created_v1": { + "id": "abc123" + } + } } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ - { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" - } - ] + } + } + } + } + }, + "/x-webhooks/private_incident.action_updated_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentActionUpdatedV1", + "description": "This webhook is emitted whenever a follow-up for a private incident is updated.", + "operationId": "Webhooks#PrivateIncidentActionUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentActionUpdatedV1ResponseBody" + }, + "example": { + "event_type": "private_incident.action_updated_v1", + "private_incident.action_updated_v1": { + "id": "abc123" + } + } + } + } + } + } + } + }, + "/x-webhooks/private_incident.follow_up_created_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentFollowUpCreatedV1", + "description": "This webhook is emitted whenever a follow-up for a private incident is created.", + "operationId": "Webhooks#PrivateIncidentFollowUpCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentFollowUpCreatedV1ResponseBody" + }, + "example": { + "event_type": "private_incident.follow_up_created_v1", + "private_incident.follow_up_created_v1": { + "id": "abc123" + } + } + } + } + } + } + } + }, + "/x-webhooks/private_incident.follow_up_updated_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentFollowUpUpdatedV1", + "description": "This webhook is emitted whenever a follow-up for a private incident is updated.", + "operationId": "Webhooks#PrivateIncidentFollowUpUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentFollowUpUpdatedV1ResponseBody" + }, + "example": { + "event_type": "private_incident.follow_up_updated_v1", + "private_incident.follow_up_updated_v1": { + "id": "abc123" + } + } + } + } + } + } + } + }, + "/x-webhooks/private_incident.incident_created_v2": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentIncidentCreatedV2", + "description": "This webhook is emitted whenever a new private incident is created.", + "operationId": "Webhooks#PrivateIncidentIncidentCreatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentIncidentCreatedV2ResponseBody" }, - "values": [ - { - "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": { + "event_type": "private_incident.incident_created_v2", + "private_incident.incident_created_v2": { + "id": "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" - }, - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + } + } + } + } + }, + "/x-webhooks/private_incident.incident_updated_v2": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentIncidentUpdatedV2", + "description": "This webhook is emitted whenever a private incident is updated.", + "operationId": "Webhooks#PrivateIncidentIncidentUpdatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentIncidentUpdatedV2ResponseBody" }, - "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "example": { + "event_type": "private_incident.incident_updated_v2", + "private_incident.incident_updated_v2": { + "id": "abc123" + } } } - ], - "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 + } + } + } + } + }, + "/x-webhooks/private_incident.membership_granted_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentMembershipGrantedV1", + "description": "This webhook is emitted whenever a user is given access to a private incident.", + "operationId": "Webhooks#PrivateIncidentMembershipGrantedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentMembershipGrantedV1ResponseBody" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "example": { + "event_type": "private_incident.membership_granted_v1", + "private_incident.membership_granted_v1": { + "actor_user_id": "abc123", + "incident_id": "abc123", + "user_id": "abc123" + } } } - ], - "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" - } - }, - "required": [ - "event_type", - "public_incident.incident_created_v2" - ] - }, - "PublicIncidentIncidentUpdatedV2ResponseBody": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "description": "What type of event is this webhook for?", - "example": "public_incident.incident_updated_v2", - "enum": [ - "public_incident.incident_created_v2", - "private_incident.incident_created_v2", - "public_incident.incident_updated_v2", - "private_incident.incident_updated_v2", - "public_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1", - "public_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1" - ] - }, - "public_incident.incident_updated_v2": { - "$ref": "#/components/schemas/IncidentV2" + } } - }, - "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" + } + } + }, + "/x-webhooks/private_incident.membership_revoked_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PrivateIncidentMembershipRevokedV1", + "description": "This webhook is emitted whenever a user's access to a private incident is revoked.", + "operationId": "Webhooks#PrivateIncidentMembershipRevokedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateIncidentMembershipRevokedV1ResponseBody" + }, + "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_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" - } - ] + } + } + } + } + }, + "/x-webhooks/public_incident.action_created_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentActionCreatedV1", + "description": "This webhook is emitted whenever a follow-up is created.", + "operationId": "Webhooks#PublicIncidentActionCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentActionCreatedV1ResponseBody" }, - "values": [ - { - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "example": { + "event_type": "public_incident.action_created_v1", + "public_incident.action_created_v1": { + "assignee": { + "email": "lisa@incident.io", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "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" }, - "value_text": "This is my text field, I hope you like it" + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" } - ] + } } - ], - "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" + } + } + } + } + }, + "/x-webhooks/public_incident.action_updated_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentActionUpdatedV1", + "description": "This webhook is emitted whenever a follow-up is updated.", + "operationId": "Webhooks#PublicIncidentActionUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentActionUpdatedV1ResponseBody" }, - "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "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", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } } - ], - "incident_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 + } + } + } + } + }, + "/x-webhooks/public_incident.follow_up_created_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentFollowUpCreatedV1", + "description": "This webhook is emitted whenever a follow-up is created.", + "operationId": "Webhooks#PublicIncidentFollowUpCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentFollowUpCreatedV1ResponseBody" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "example": { + "event_type": "public_incident.follow_up_created_v1", + "public_incident.follow_up_created_v1": { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "completed_at": "2021-08-17T13:28:57.801578Z", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Call the fire brigade", + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "follow_up": true, + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "status": "outstanding", + "updated_at": "2021-08-17T13:28:57.801578Z" + } } } - ], - "incident_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" - } - }, - "required": [ - "event_type", - "public_incident.incident_updated_v2" - ] - }, - "RetrospectiveIncidentOptionsV2": { - "type": "object", - "properties": { - "slack_channel_id": { - "type": "string", - "description": "If the incident mode is 'retrospective', pass the ID of a Slack channel in your workspace to attach the incident to an existing channel, rather than creating a new one", - "example": "abc123" + } } - }, - "example": { - "slack_channel_id": "abc123" } - }, - "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" + } + }, + "/x-webhooks/public_incident.follow_up_updated_v1": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentFollowUpUpdatedV1", + "description": "This webhook is emitted whenever a follow-up is updated.", + "operationId": "Webhooks#PublicIncidentFollowUpUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentFollowUpUpdatedV1ResponseBody" + }, + "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" + } + } } - ] - }, - "version": { - "type": "integer", - "description": "Which version the event is", - "example": 1, - "format": "int64" - } - }, - "example": { - "action": "scim_group.role_mappings_updated", - "actor": { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "metadata": { - "user_base_role_slug": "admin", - "user_custom_role_slugs": "engineering,security" - }, - "name": "John Doe", - "type": "user" - }, - "context": { - "location": "1.2.3.4", - "user_agent": "Chrome/91.0.4472.114" - }, - "metadata": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - }, - "occurred_at": "2021-08-17T13:28:57.801578Z", - "targets": [ - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" } - ], - "version": 1 - }, - "required": [ - "action", - "occurred_at", - "version", - "actor", - "targets", - "context", - "metadata" - ] - }, - "SeverityV2": { - "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" - }, - "required": [ - "id", - "name", - "description", - "rank", - "created_at", - "updated_at" - ] - }, - "ShowEntryResponseBody": { - "type": "object", - "properties": { - "catalog_entry": { - "$ref": "#/components/schemas/CatalogEntryV2" - }, - "catalog_type": { - "$ref": "#/components/schemas/CatalogTypeV2" } - }, - "example": { - "catalog_entry": { - "aliases": [ - "lawrence@incident.io", - "lawrence" - ], - "attribute_values": { - "abc123": { - "array_value": [ - { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" + } + } + }, + "/x-webhooks/public_incident.incident_created_v2": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentIncidentCreatedV2", + "description": "This webhook is emitted whenever a new incident is created.", + "operationId": "Webhooks#PublicIncidentIncidentCreatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentIncidentCreatedV2ResponseBody" + }, + "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" + } + }, + "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" }, - "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" + "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 } - ], - "value": { - "catalog_entry": { - "catalog_entry_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "catalog_entry_name": "Primary escalation", - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0" - }, - "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" } } - }, - "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "created_at": "2021-08-17T13:28:57.801578Z", - "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Primary On-call", - "rank": 3, - "updated_at": "2021-08-17T13:28:57.801578Z" - }, - "catalog_type": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "estimated_count": 7, - "external_type": "PagerDutyService", - "icon": "bolt", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "is_editable": false, - "name": "Kubernetes Cluster", - "ranked": true, - "required_integrations": [ - "pager_duty" - ], - "schema": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" - } - ], - "version": 1 - }, - "semantic_type": "custom", - "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": { - "severity": { - "$ref": "#/components/schemas/SeverityV2" - } - }, - "example": { - "severity": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Issues with **low impact**.", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "rank": 1, - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "severity" - ] - }, - "ShowResponseBody2": { - "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" - ] - }, - "ShowResponseBody3": { - "type": "object", - "properties": { - "custom_field": { - "$ref": "#/components/schemas/CustomFieldV1" + } } - }, - "example": { - "custom_field": { - "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" + } + } + }, + "/x-webhooks/public_incident.incident_status_updated_v2": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentIncidentStatusUpdatedV2", + "description": "This webhook is emitted whenever an incident's status changes.", + "operationId": "Webhooks#PublicIncidentIncidentStatusUpdatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentIncidentStatusUpdatedV2ResponseBody" + }, + "example": { + "event_type": "public_incident.incident_status_updated_v2", + "public_incident.incident_status_updated_v2": { + "incident": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "severity": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Issues with **low impact**.", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Minor", + "rank": 1, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "slack_channel_id": "C02AW36C1M5", + "slack_channel_name": "inc-165-green-parrot", + "slack_team_id": "T02A1FSLE8J", + "summary": "Our database is really really sad, and we don't know why yet.", + "updated_at": "2021-08-17T13:28:57.801578Z", + "visibility": "public", + "workload_minutes_late": 40.7, + "workload_minutes_sleeping": 0, + "workload_minutes_total": 60.7, + "workload_minutes_working": 20 + }, + "new_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "previous_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + } } - ], - "required": "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" - ] - }, - "ShowResponseBody4": { - "type": "object", - "properties": { - "incident_role": { - "$ref": "#/components/schemas/IncidentRoleV1" - } - }, - "example": { - "incident_role": { - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "The person currently coordinating the incident", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" - } - }, - "required": [ - "incident_role" - ] - }, - "ShowResponseBody5": { - "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" - ] - }, - "ShowResponseBody6": { - "type": "object", - "properties": { - "incident_timestamp": { - "$ref": "#/components/schemas/IncidentTimestampV2" - } - }, - "example": { - "incident_timestamp": { - "id": "01FCNDV6P870EA6S7TK1DSYD5H", - "name": "Impact started", - "rank": 1 + } } - }, - "required": [ - "incident_timestamp" - ] - }, - "ShowResponseBody7": { - "type": "object", - "properties": { - "incident_type": { - "$ref": "#/components/schemas/IncidentTypeV1" + } + } + }, + "/x-webhooks/public_incident.incident_updated_v2": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "PublicIncidentIncidentUpdatedV2", + "description": "This webhook is emitted whenever an incident is updated.", + "operationId": "Webhooks#PublicIncidentIncidentUpdatedV2", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicIncidentIncidentUpdatedV2ResponseBody" + }, + "example": { + "event_type": "public_incident.incident_updated_v2", + "public_incident.incident_updated_v2": { + "call_url": "https://zoom.us/foo", + "created_at": "2021-08-17T13:28:57.801578Z", + "creator": { + "api_key": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "My test API key" + }, + "user": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + } + }, + "custom_field_entries": [ + { + "custom_field": { + "description": "Which team is impacted by this issue", + "field_type": "single_select", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Affected Team", + "options": [ + { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + } + ] + }, + "values": [ + { + "value_catalog_entry": { + "aliases": [ + "lawrence@incident.io", + "lawrence" + ], + "external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Primary On-call" + }, + "value_link": "https://google.com/", + "value_numeric": "123.456", + "value_option": { + "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "sort_key": 10, + "value": "Product" + }, + "value_text": "This is my text field, I hope you like it" + } + ] + } + ], + "duration_metrics": [ + { + "duration_metric": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Lasted" + }, + "value_seconds": 1 + } + ], + "external_issue_reference": { + "issue_name": "INC-123", + "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", + "provider": "asana" + }, + "id": "01FDAG4SAP5TYPT98WGR2N7W91", + "incident_role_assignments": [ + { + "assignee": { + "email": "lisa@incident.io", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Lisa Karlin Curtis", + "role": "viewer", + "slack_user_id": "U02AYNF2XJM" + }, + "role": { + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "The person currently coordinating the incident", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "instructions": "Take point on the incident; Make sure people are clear on responsibilities", + "name": "Incident Lead", + "required": false, + "role_type": "lead", + "shortform": "lead", + "updated_at": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_status": { + "category": "triage", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Impact has been **fully mitigated**, and we're ready to learn from this incident.", + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Closed", + "rank": 4, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "incident_timestamp_values": [ + { + "incident_timestamp": { + "id": "01FCNDV6P870EA6S7TK1DSYD5H", + "name": "Impact started", + "rank": 1 + }, + "value": { + "value": "2021-08-17T13:28:57.801578Z" + } + } + ], + "incident_type": { + "create_in_triage": "always", + "created_at": "2021-08-17T13:28:57.801578Z", + "description": "Customer facing production outages", + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "is_default": false, + "name": "Production Outage", + "private_incidents_only": false, + "updated_at": "2021-08-17T13:28:57.801578Z" + }, + "mode": "standard", + "name": "Our database is sad", + "permalink": "https://app.incident.io/incidents/123", + "postmortem_document_url": "https://docs.google.com/my_doc_id", + "reference": "INC-123", + "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": { - "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" + } + } + }, + "/x-audit-logs/alert_route.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertRouteCreatedV1", + "description": "This entry is created whenever an alert route is created", + "operationId": "Audit logs#AlertRouteCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "alert_route.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": "Production incidents", + "type": "alert_route" + } + ], + "version": 1 + } + } + } } - }, - "required": [ - "incident_type" - ] - }, - "ShowResponseBody8": { - "type": "object", - "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV1" + } + } + }, + "/x-audit-logs/alert_route.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertRouteDeletedV1", + "description": "This entry is created whenever an alert route is deleted", + "operationId": "Audit logs#AlertRouteDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "alert_route.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": "Production incidents", + "type": "alert_route" + } + ], + "version": 1 + } + } + } } - }, - "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" + } + } + }, + "/x-audit-logs/alert_route.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertRouteUpdatedV1", + "description": "This entry is created whenever an alert route is updated", + "operationId": "Audit logs#AlertRouteUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "alert_route.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": "Production incidents", + "type": "alert_route" + } + ], + "version": 1 + } } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + } + } + } + } + }, + "/x-audit-logs/alert_schema.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertSchemaUpdatedV1", + "description": "This entry is created whenever alert attributes are updated", + "operationId": "Audit logs#AlertSchemaUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "alert_schema.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": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "Alert schema", + "type": "alert_schema" } - ] + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/alert_source_config.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertSourceConfigCreatedV1", + "description": "This entry is created whenever an alert source is created", + "operationId": "Audit logs#AlertSourceConfigCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, - "values": [ - { - "value_link": "https://google.com/", - "value_numeric": "123.456", - "value_option": { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "example": { + "action": "alert_source_config.created", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" }, - "value_text": "This is my text field, I hope you like it" - } - ] + "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": "Datadog alerts", + "type": "alert_source" + } + ], + "version": 1 + } } - ], - "id": "01FDAG4SAP5TYPT98WGR2N7W91", - "incident_role_assignments": [ - { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" + } + } + } + } + }, + "/x-audit-logs/alert_source_config.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertSourceConfigDeletedV1", + "description": "This entry is created whenever an alert source is deleted", + "operationId": "Audit logs#AlertSourceConfigDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, - "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "example": { + "action": "alert_source_config.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": "Datadog alerts", + "type": "alert_source" + } + ], + "version": 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": [ - { - "last_occurred_at": "2021-08-17T13:28:57.801578Z", - "name": "last_activity" - } - ], - "updated_at": "2021-08-17T13:28:57.801578Z", - "visibility": "public" - } - }, - "required": [ - "incident" - ] - }, - "ShowResponseBody9": { - "type": "object", - "properties": { - "incident": { - "$ref": "#/components/schemas/IncidentV2" + } } - }, - "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" + } + } + }, + "/x-audit-logs/alert_source_config.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AlertSourceConfigUpdatedV1", + "description": "This entry is created whenever an alert source is updated", + "operationId": "Audit logs#AlertSourceConfigUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "alert_source_config.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": "Datadog alerts", + "type": "alert_source" + } + ], + "version": 1 + } } - }, - "custom_field_entries": [ - { - "custom_field": { - "description": "Which team is impacted by this issue", - "field_type": "single_select", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected Team", - "options": [ + } + } + } + } + }, + "/x-audit-logs/announcement_rule.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AnnouncementRuleCreatedV1", + "description": "This entry is created whenever a announcement rule is created", + "operationId": "Audit logs#AnnouncementRuleCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "announcement_rule.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": [ { - "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0", "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "sort_key": 10, - "value": "Product" + "name": "#engineering", + "type": "announcement_rule" } - ] - }, - "values": [ - { - "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" - } - ] + ], + "version": 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" + } + } + } + } + }, + "/x-audit-logs/announcement_rule.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AnnouncementRuleDeletedV1", + "description": "This entry is created whenever a announcement rule is deleted", + "operationId": "Audit logs#AnnouncementRuleDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, - "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": true, - "role_type": "lead", - "shortform": "lead", - "updated_at": "2021-08-17T13:28:57.801578Z" + "example": { + "action": "announcement_rule.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": "#engineering", + "type": "announcement_rule" + } + ], + "version": 1 } } - ], - "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 + } + } + } + } + }, + "/x-audit-logs/announcement_rule.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "AnnouncementRuleUpdatedV1", + "description": "This entry is created whenever a announcement rule is updated", + "operationId": "Audit logs#AnnouncementRuleUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, - "value": { - "value": "2021-08-17T13:28:57.801578Z" + "example": { + "action": "announcement_rule.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": "#engineering", + "type": "announcement_rule" + } + ], + "version": 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", - "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" + } } - }, - "required": [ - "incident" - ] - }, - "UpdateEntryRequestBody": { - "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" - } - ], - "value": { - "literal": "SEV123" + } + } + }, + "/x-audit-logs/api_key.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "ApiKeyCreatedV1", + "description": "This entry is created whenever a api key is created", + "operationId": "Audit logs#ApiKeyCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "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 } } - }, - "additionalProperties": { - "$ref": "#/components/schemas/CatalogAttributeBindingPayloadV2" } - }, - "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" + } + } + }, + "/x-audit-logs/api_key.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "ApiKeyDeletedV1", + "description": "This entry is created whenever a api key is deleted", + "operationId": "Audit logs#ApiKeyDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "api_key.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": "Development API Key", + "type": "api_key" + } + ], + "version": 1 } - ], - "value": { - "literal": "SEV123" } } - }, - "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.", - "example": "never", - "enum": [ - "never", - "before_closure", - "always" - ] - }, - "show_before_closure": { - "type": "boolean", - "description": "Whether a custom field should be shown in the incident close modal. If this custom field is required before closure, but no value has been set for it, the field will be shown in the closure 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", - "show_before_closure": true, - "show_before_creation": true, - "show_before_update": true, - "show_in_announcement_post": true - }, - "required": [ - "name", - "description", - "field_type", - "required", - "show_before_creation", - "show_before_closure", - "show_before_update", - "options", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody3": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Describes the purpose of the role", - "example": "The person currently coordinating the incident", - "minLength": 1 - }, - "instructions": { - "type": "string", - "description": "Provided to whoever is nominated for the role", - "example": "Take point on the incident; Make sure people are clear on responsibilities" - }, - "name": { - "type": "string", - "description": "Human readable name of the incident role", - "example": "Incident Lead", - "minLength": 1 - }, - "required": { - "type": "boolean", - "description": "Whether incident require this role to be set", - "example": true - }, - "shortform": { - "type": "string", - "description": "Short human readable name for Slack", - "example": "lead", - "minLength": 1 } - }, - "example": { - "description": "The person currently coordinating the incident", - "instructions": "Take point on the incident; Make sure people are clear on responsibilities", - "name": "Incident Lead", - "required": true, - "shortform": "lead" - }, - "required": [ - "conditions", - "name", - "description", - "instructions", - "shortform", - "role_type", - "required", - "created_at", - "updated_at" - ] - }, - "UpdateRequestBody4": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Rich text description of the incident status", - "example": "Impact has been **fully mitigated**, and we're ready to learn from this incident." - }, - "name": { - "type": "string", - "description": "Unique name of this status", - "example": "Closed" + } + } + }, + "/x-audit-logs/catalog_type.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CatalogTypeCreatedV1", + "description": "This entry is created whenever a catalog type is created", + "operationId": "Audit logs#CatalogTypeCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "catalog_type.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": "Service", + "type": "catalog_type" + } + ], + "version": 1 + } + } + } } - }, - "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" - ] - }, - "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" + } + } + }, + "/x-audit-logs/catalog_type.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CatalogTypeDeletedV1", + "description": "This entry is created whenever a catalog type is deleted", + "operationId": "Audit logs#CatalogTypeDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "catalog_type.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": "Service", + "type": "catalog_type" + } + ], + "version": 1 + } + } } - }, - "color": { - "type": "string", - "description": "Sets the display color of this type in the dashboard", - "example": "slate", - "enum": [ - "slate", - "red", - "yellow", - "green", - "blue", - "violet" - ] - }, - "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", - "clock", - "cog", - "database", - "doc", - "email", - "server", - "severity", - "star", - "tag", - "user", - "users" - ] - }, - "name": { - "type": "string", - "description": "Name is the human readable name of this type", - "example": "Kubernetes Cluster" - }, - "ranked": { - "type": "boolean", - "description": "If this type should be ranked", - "example": true - }, - "semantic_type": { - "type": "string", - "description": "Semantic type of this resource", - "example": "custom" - }, - "source_repo_url": { - "type": "string", - "description": "The url of the external repository where this type is managed", - "example": "https://github.com/incident-io/catalog-importer" } - }, - "example": { - "annotations": { - "incident.io/catalog-importer/id": "id-of-config" - }, - "color": "slate", - "description": "Represents Kubernetes clusters that we run inside of GKE.", - "icon": "bolt", - "name": "Kubernetes Cluster", - "ranked": true, - "semantic_type": "custom", - "source_repo_url": "https://github.com/incident-io/catalog-importer" - }, - "required": [ - "name", - "description" - ] - }, - "UpdateTypeSchemaRequestBody": { - "type": "object", - "properties": { - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CatalogTypeAttributePayloadV2" - }, - "example": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" + } + } + }, + "/x-audit-logs/catalog_type.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CatalogTypeUpdatedV1", + "description": "This entry is created whenever a catalog type is updated", + "operationId": "Audit logs#CatalogTypeUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "catalog_type.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": "Service", + "type": "catalog_type" + } + ], + "version": 1 + } } - ] - }, - "version": { - "type": "integer", - "example": 1, - "format": "int64" + } } - }, - "example": { - "attributes": [ - { - "array": false, - "id": "01GW2G3V0S59R238FAHPDS1R66", - "name": "tier", - "type": "Custom[\"Service\"]" + } + } + }, + "/x-audit-logs/custom_field.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CustomFieldCreatedV1", + "description": "This entry is created whenever a custom field is created", + "operationId": "Audit logs#CustomFieldCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "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": "Affected teams", + "type": "custom_field" + } + ], + "version": 1 + } + } } - ], - "version": 1 - }, - "required": [ - "attributes", - "version", - "name", - "description", - "type_name", - "semantic_type", - "ranked", - "schema", - "icon", - "color", - "is_editable", - "annotations", - "created_at", - "updated_at" - ] - }, - "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" + } + }, + "/x-audit-logs/custom_field.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CustomFieldDeletedV1", + "description": "This entry is created whenever a custom field is deleted", + "operationId": "Audit logs#CustomFieldDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "custom_field.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": "Affected teams", + "type": "custom_field" + } + ], + "version": 1 + } } - ] - }, - "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" - ] - }, - "WebhookPrivateResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the resource", - "example": "abc123" + } + } + }, + "/x-audit-logs/custom_field.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "CustomFieldUpdatedV1", + "description": "This entry is created whenever a custom field is updated", + "operationId": "Audit logs#CustomFieldUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "custom_field.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": "Affected teams", + "type": "custom_field" + } + ], + "version": 1 + } + } + } } - }, - "example": { - "id": "abc123" - }, - "required": [ - "id" - ] + } } - } - }, - "tags": [ - { - "name": "Actions V1", - "description": "Manage incident actions.\n\nIncidents have two types of actions associated to them:\n\n- Actions, used during an incident response as ephemeral todo lists\n- Follow-ups, actions which are for after the incident and can be exported to external\n\tissue trackers\n\nYou can manage actions in the incident Slack channel with /incident actions, or on\nthe incident homepage.\n\nExporting follow-ups to external issue trackers can be done in the incident homepage.\n" - }, - { - "name": "Catalog V2", - "description": "Manage and browse catalog resources.\n\n> This endpoint is in beta, released for early testing but excluded from our backwards\n> compatibility guarantee at this time. Contact support@incident.io if you have\n> questions about availability or want to try this out.\n\nUse the incident.io catalog to track services, teams, product features and anything\nelse that helps build a map of your organisation.\n\nThe catalog has a number of types which are synced from your connected integrations, such\nas GitHub Repositories or PagerDuty Services, but you can also create custom types\nspecifically tailored to your company.\n\nExamples might be a Service type with an Alert channel which you can point at a Slack\nchannel, or Team which specifies its Manager and Technical Lead.\n" - }, - { - "name": "Custom Field Options V1", - "description": "Manage custom field options.\n\nSingle- and multi-select custom fields have a list of all available options,\nwhich have a value, and a sort key. The value must be unique to the custom\nfield. For example, you might have an Incident Type custom field, with options\n\"Data breach\", \"Performance degradation\", \"API downtime\", etc." - }, - { - "name": "Custom Fields V1", - "description": "Manage custom fields.\n\nCustom fields are used to attach metadata to incidents, which you can use when searching\nfor incidents in the dashboard, triggering workflows, building announcement rules or for\nyour own data needs.\n\nEach field has a type:\n\n- Single-select, single value selected from a predefined list of options (ie. Incident Type)\n- Multi-select, as above but you can pick more than one option (ie. Teams)\n- Text, freeform text field (ie. Customer ID)\n- Link, link URL that is synced to Slack bookmarks on the incident channel (ie. External Status Page)\n- Number, integer or fractional numbers (ie. Customers Affected)\n\nWe may add more custom field types in the future - we'd love to hear any other types you'd like to use!\n" - }, - { - "name": "Incident Attachments V1", - "description": "Create, list and delete incident attachments.\n\nIncident Attachments allows you to connect resources from external systems into incidents.\nExamples include: PagerDuty incidents and GitHub pull requests.\n" - }, - { - "name": "Incident Roles V1", - "description": "Manage incident roles.\n\nDuring an incident, you can assign responders to one of the incident roles that are\nconfigured in your organisation settings.\n\nEvery organisation will have a special 'lead' role, which signifies the incident lead or\ncommander. This role cannot be deleted, but can be renamed in the incident.io dashboard.\n" - }, - { - "name": "IncidentStatuses V1", - "description": "Manage incident statuses.\n\nEach incident has a status, picked from one of the statuses configured in your\norganisations settings.\n\nStatuses help communicate where an incident is in its lifecycle. You can use\nstatuses when filtering incidents in the dashboard, and in workflows and announcement\nrules.\n" - }, - { - "name": "Incident Timestamps V2", - "description": "View incident timestamps.\n\nEach incident has a number of timestamps; some being defaults that we set on\neach incident for you, and other being configured for your organisation within\nsettings.\n\nTimestamps help to communicate when a given action was taken for a specific\nincident, for example when it was reported, closed or fixed.\n" }, - { - "name": "Incident Types V1", - "description": "View incident types.\n\nWith incident types enabled, you can tailor your process to the situation you're\nresponding to with different custom fields and roles for each incident type.\n" + "/x-audit-logs/debrief_invite_rule.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "DebriefInviteRuleCreatedV1", + "description": "This entry is created whenever a debrief invite rule is created", + "operationId": "Audit logs#DebriefInviteRuleCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "debrief_invite_rule.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": "Invite founders for critical incidents", + "type": "debrief_invite_rule" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "name": "Incident Updates V2", - "description": "List incident updates.\n\nIncident Updates allows you to see all the updates that have been shared against a\nparticular incident. This will include any time that the Severity or Status of\nan incident changed, alongside any additional updates that were provided.\n" + "/x-audit-logs/debrief_invite_rule.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "DebriefInviteRuleDeletedV1", + "description": "This entry is created whenever a debrief invite rule is deleted", + "operationId": "Audit logs#DebriefInviteRuleDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "debrief_invite_rule.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": "Invite founders for critical incidents", + "type": "debrief_invite_rule" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "name": "Incidents V1", - "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" + "/x-audit-logs/debrief_invite_rule.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "DebriefInviteRuleUpdatedV1", + "description": "This entry is created whenever a debrief invite rule is updated", + "operationId": "Audit logs#DebriefInviteRuleUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "debrief_invite_rule.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": "Invite founders for critical incidents", + "type": "debrief_invite_rule" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "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" + "/x-audit-logs/escalation_path.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "EscalationPathCreatedV1", + "description": "This entry is created whenever an escalation path is created", + "operationId": "Audit logs#EscalationPathCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "escalation_path.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": "Critical incidents", + "type": "escalation_path" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "name": "Severities V1", - "description": "Manage incident severities.\n\nEach incident has a severity, picked from one of the severities configured in your\norganisations settings.\n\nSeverities help categorise incidents, and communicate urgency/impact. You can use\nseverities when filtering incidents in the dashboard, and in workflows and announcement\nrules.\n" + "/x-audit-logs/escalation_path.deleted.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "EscalationPathDeletedV1", + "description": "This entry is created whenever an escalation path is deleted", + "operationId": "Audit logs#EscalationPathDeletedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "escalation_path.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": "Critical incidents", + "type": "escalation_path" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "name": "Utilities V1", - "description": "Miscelaneous utility endpoints.\n\nCollection of utility functions that can help build integrations against this API.\n" + "/x-audit-logs/escalation_path.updated.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "EscalationPathUpdatedV1", + "description": "This entry is created whenever an escalation path is updated", + "operationId": "Audit logs#EscalationPathUpdatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "escalation_path.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": "Critical incidents", + "type": "escalation_path" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "name": "Webhooks", - "description": "Webhooks can be used to receive notifications when certain events occur in incident.io. This might be useful for annotating graphs in a monitoring tool with incidents, or keeping track of follow-ups in another system. Our webhooks are powered by Svix.\n\n## Getting started with webhooks\n\nTo start using webhooks, you’ll need to create a webhook endpoint. You can do this in the same way that you’d create any other endpoint in your application. If you’d like to play around with our webhooks, we’d recommend using Svix play which allows you to set up an endpoint and inspect the payloads via their web interface. There are also other services (e.g. ngrok) which have great debugging tools to help getting started with webhooks.\n\nOnce you have a webhook endpoint set up, you can head to Settings > Webhooks to configure your endpoint. In here you'll be able to choose which types of events you'd like to recieve, send test events, see recent event deliveries, and retry any failed events.\n\n## Status codes, errors and retries\n\nWhen processing webhooks, please return a 2xx status code (e.g. `200 OK` or `204 No Content`). If the endpoint returns a non-2xx status code, we’ll try to resend the event with a backoff over the next 24 hours. If attempts to a specific endpoint repeatedly fail over a 5 day period, we’ll mark the endpoint as disabled and notify you via email. If you do miss some messages (e.g. due to unexpected downtime), Svix offer a number of options for [replaying messages](https://docs.svix.com/receiving/using-app-portal/replaying-messages) which you can access via Settings > Webhooks.\n\n## Verifying webhooks\n\nIt’s important to know whether a webhook has come from incident.io, or a third party that might be trying to exploit a vulnerability. To avoid this, we send a `signature` in the header of our webhooks, which you can verify using the `Signing secret` from the webhook endpoint settings page. The webhooks we send will have three headers that you’ll want to look at:\n\n```json\n{\n \"webhook-id\": \"123\",\n \"webhook-timestamp\": 1676033031,\n \"webhook-signature\": \"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=\"\n}\n```\n\nThese are signed using a HMAC signature in the following format:\n\n```\n${webhook-id}.${webhook-timestamp}.${request_body}\n```\n\nYou can verify the signature either using the Svix client libraries, or manually by following these instructions.\n\n## Keeping another system in-line with incident.io\n\nA common use-case for webhooks is to keep another system up-to-date with everything that’s happening in incident.io. As we deliver webhooks individually over HTTPS, we cannot guarantee that they’ll be delivered in the correct order. That means that, to keep the other system up-to-date, we’d recommend that you build an application which:\n\n- Receives a webhook about INC-123\n- Makes a request to our public API to get the latest state of INC-123\n- Save that state to your system\n\nThis means you aren’t relying on the order in which you receive webhooks to make sure your system remains up-to-date.\n\n## Webhooks on private incidents\n\nIn general, we try to send webhooks with all the relevant information in the payload (e.g. the name, summary, status etc.). However, private incidents are the exception. For private incidents, we only send the ID of the resource that’s been changed. If your integration needs to access the full data, you’ll need to create an API Key that can view private incidents. You can then use that key to get the details about the specific incident or follow-up. This is to make sure we don’t leak information about private incidents to a system that shouldn’t have access to them.\n" + "/x-audit-logs/follow_up_priority.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "FollowUpPriorityCreatedV1", + "description": "This entry is created whenever a follow up priority is created", + "operationId": "Audit logs#FollowUpPriorityCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "follow_up_priority.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": "Low", + "type": "follow_up_priority" + } + ], + "version": 1 + } + } + } + } + } + } }, - { - "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" - } - ], - "x-webhooks": { - "/x-webhooks/private_incident.follow_up_created_v1": { + "/x-audit-logs/follow_up_priority.deleted.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PrivateIncidentFollowUpCreatedV1", - "description": "This webhook is emitted whenever a follow-up for a private incident is created.", - "operationId": "Webhooks#PrivateIncidentFollowUpCreatedV1", + "summary": "FollowUpPriorityDeletedV1", + "description": "This entry is created whenever a follow up priority is deleted", + "operationId": "Audit logs#FollowUpPriorityDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateIncidentFollowUpCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "event_type": "private_incident.follow_up_created_v1", - "private_incident.follow_up_created_v1": { - "id": "abc123" - } + "action": "follow_up_priority.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": "Low", + "type": "follow_up_priority" + } + ], + "version": 1 } } } @@ -11912,27 +18513,46 @@ } } }, - "/x-webhooks/private_incident.follow_up_updated_v1": { + "/x-audit-logs/follow_up_priority.updated.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PrivateIncidentFollowUpUpdatedV1", - "description": "This webhook is emitted whenever a follow-up for a private incident is updated.", - "operationId": "Webhooks#PrivateIncidentFollowUpUpdatedV1", + "summary": "FollowUpPriorityUpdatedV1", + "description": "This entry is created whenever a follow up priority is updated", + "operationId": "Audit logs#FollowUpPriorityUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateIncidentFollowUpUpdatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "event_type": "private_incident.follow_up_updated_v1", - "private_incident.follow_up_updated_v1": { - "id": "abc123" - } + "action": "follow_up_priority.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": "Low", + "type": "follow_up_priority" + } + ], + "version": 1 } } } @@ -11940,27 +18560,46 @@ } } }, - "/x-webhooks/private_incident.incident_created_v2": { + "/x-audit-logs/incident_duration_metric.created.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PrivateIncidentIncidentCreatedV2", - "description": "This webhook is emitted whenever a new private incident is created.", - "operationId": "Webhooks#PrivateIncidentIncidentCreatedV2", + "summary": "IncidentDurationMetricCreatedV1", + "description": "This entry is created whenever a incident duration metric is created", + "operationId": "Audit logs#IncidentDurationMetricCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateIncidentIncidentCreatedV2ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "event_type": "private_incident.incident_created_v2", - "private_incident.incident_created_v2": { - "id": "abc123" - } + "action": "incident_duration_metric.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": "Time to resolve", + "type": "incident_duration_metric" + } + ], + "version": 1 } } } @@ -11968,27 +18607,46 @@ } } }, - "/x-webhooks/private_incident.incident_updated_v2": { + "/x-audit-logs/incident_duration_metric.deleted.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PrivateIncidentIncidentUpdatedV2", - "description": "This webhook is emitted whenever a private incident is updated.", - "operationId": "Webhooks#PrivateIncidentIncidentUpdatedV2", + "summary": "IncidentDurationMetricDeletedV1", + "description": "This entry is created whenever a incident duration metric is deleted", + "operationId": "Audit logs#IncidentDurationMetricDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateIncidentIncidentUpdatedV2ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "event_type": "private_incident.incident_updated_v2", - "private_incident.incident_updated_v2": { - "id": "abc123" - } + "action": "incident_duration_metric.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": "Time to resolve", + "type": "incident_duration_metric" + } + ], + "version": 1 } } } @@ -11996,46 +18654,46 @@ } } }, - "/x-webhooks/public_incident.follow_up_created_v1": { + "/x-audit-logs/incident_duration_metric.updated.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PublicIncidentFollowUpCreatedV1", - "description": "This webhook is emitted whenever a follow-up is created.", - "operationId": "Webhooks#PublicIncidentFollowUpCreatedV1", + "summary": "IncidentDurationMetricUpdatedV1", + "description": "This entry is created whenever a incident duration metric is updated", + "operationId": "Audit logs#IncidentDurationMetricUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicIncidentFollowUpCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "event_type": "public_incident.follow_up_created_v1", - "public_incident.follow_up_created_v1": { - "assignee": { - "email": "lisa@incident.io", - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Lisa Karlin Curtis", - "role": "viewer", - "slack_user_id": "U02AYNF2XJM" - }, - "completed_at": "2021-08-17T13:28:57.801578Z", - "created_at": "2021-08-17T13:28:57.801578Z", - "description": "Call the fire brigade", - "external_issue_reference": { - "issue_name": "INC-123", - "issue_permalink": "https://linear.app/incident-io/issue/INC-1609/find-copywriter-to-write-up", - "provider": "asana" - }, - "follow_up": true, + "action": "incident_duration_metric.updated", + "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Time to resolve", + "type": "incident_duration_metric" + } + ], + "version": 1 } } } @@ -12043,46 +18701,46 @@ } } }, - "/x-webhooks/public_incident.follow_up_updated_v1": { + "/x-audit-logs/incident_role.created.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PublicIncidentFollowUpUpdatedV1", - "description": "This webhook is emitted whenever a follow-up is updated.", - "operationId": "Webhooks#PublicIncidentFollowUpUpdatedV1", + "summary": "IncidentRoleCreatedV1", + "description": "This entry is created whenever a incident role is created", + "operationId": "Audit logs#IncidentRoleCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicIncidentFollowUpUpdatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "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, + "action": "incident_role.created", + "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "incident_id": "01FCNDV6P870EA6S7TK1DSYDG0", - "status": "outstanding", - "updated_at": "2021-08-17T13:28:57.801578Z" - } + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" + }, + "name": "John Doe", + "type": "user" + }, + "context": { + "location": "1.2.3.4", + "user_agent": "Chrome/91.0.4472.114" + }, + "occurred_at": "2021-08-17T13:28:57.801578Z", + "targets": [ + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Communications Lead", + "type": "incident_role" + } + ], + "version": 1 } } } @@ -12090,150 +18748,46 @@ } } }, - "/x-webhooks/public_incident.incident_created_v2": { + "/x-audit-logs/incident_role.deleted.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PublicIncidentIncidentCreatedV2", - "description": "This webhook is emitted whenever a new incident is created.", - "operationId": "Webhooks#PublicIncidentIncidentCreatedV2", + "summary": "IncidentRoleDeletedV1", + "description": "This entry is created whenever a incident role is deleted", + "operationId": "Audit logs#IncidentRoleDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicIncidentIncidentCreatedV2ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "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" - } - }, - "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_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" - } - ] - } - ], - "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": true, - "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" + "action": "incident_role.deleted", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" }, - "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" - } + "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": "Communications Lead", + "type": "incident_role" + } + ], + "version": 1 } } } @@ -12241,150 +18795,93 @@ } } }, - "/x-webhooks/public_incident.incident_updated_v2": { + "/x-audit-logs/incident_role.updated.1": { "get": { "tags": [ - "Webhooks" + "Audit logs" ], - "summary": "PublicIncidentIncidentUpdatedV2", - "description": "This webhook is emitted whenever an incident is updated.", - "operationId": "Webhooks#PublicIncidentIncidentUpdatedV2", + "summary": "IncidentRoleUpdatedV1", + "description": "This entry is created whenever a incident role is updated", + "operationId": "Audit logs#IncidentRoleUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicIncidentIncidentUpdatedV2ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "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_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" - } - ] - } - ], - "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": true, - "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" + "action": "incident_role.updated", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" }, - "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", + "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", - "is_default": false, - "name": "Production Outage", - "private_incidents_only": false, - "updated_at": "2021-08-17T13:28:57.801578Z" + "name": "Communications Lead", + "type": "incident_role" + } + ], + "version": 1 + } + } + } + } + } + } + }, + "/x-audit-logs/incident_status.created.1": { + "get": { + "tags": [ + "Audit logs" + ], + "summary": "IncidentStatusCreatedV1", + "description": "This entry is created whenever a incident status is created", + "operationId": "Audit logs#IncidentStatusCreatedV1", + "responses": { + "200": { + "description": "OK response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" + }, + "example": { + "action": "incident_status.created", + "actor": { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "metadata": { + "user_base_role_slug": "admin", + "user_custom_role_slugs": "engineering,security" }, - "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": "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": "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" - } + "name": "Investigating", + "type": "incident_status" + } + ], + "version": 1 } } } @@ -12392,24 +18889,24 @@ } } }, - "/x-audit-logs/announcement_rule.created.1": { + "/x-audit-logs/incident_status.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "AnnouncementRuleCreatedV1", - "description": "This entry is created whenever a announcement rule is created", - "operationId": "Audit logs#AnnouncementRuleCreatedV1", + "summary": "IncidentStatusDeletedV1", + "description": "This entry is created whenever a incident status is deleted", + "operationId": "Audit logs#IncidentStatusDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "announcement_rule.created", + "action": "incident_status.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12427,8 +18924,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#engineering", - "type": "announcement_rule" + "name": "Investigating", + "type": "incident_status" } ], "version": 1 @@ -12439,24 +18936,24 @@ } } }, - "/x-audit-logs/announcement_rule.deleted.1": { + "/x-audit-logs/incident_status.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "AnnouncementRuleDeletedV1", - "description": "This entry is created whenever a announcement rule is deleted", - "operationId": "Audit logs#AnnouncementRuleDeletedV1", + "summary": "IncidentStatusUpdatedV1", + "description": "This entry is created whenever a incident status is updated", + "operationId": "Audit logs#IncidentStatusUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "announcement_rule.deleted", + "action": "incident_status.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12474,8 +18971,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#engineering", - "type": "announcement_rule" + "name": "Investigating", + "type": "incident_status" } ], "version": 1 @@ -12486,24 +18983,24 @@ } } }, - "/x-audit-logs/announcement_rule.updated.1": { + "/x-audit-logs/incident_timestamp.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "AnnouncementRuleUpdatedV1", - "description": "This entry is created whenever a announcement rule is updated", - "operationId": "Audit logs#AnnouncementRuleUpdatedV1", + "summary": "IncidentTimestampCreatedV1", + "description": "This entry is created whenever a incident timestamp is created", + "operationId": "Audit logs#IncidentTimestampCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "announcement_rule.updated", + "action": "incident_timestamp.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12521,8 +19018,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#engineering", - "type": "announcement_rule" + "name": "Fixed at", + "type": "incident_timestamp" } ], "version": 1 @@ -12533,24 +19030,24 @@ } } }, - "/x-audit-logs/api_key.created.1": { + "/x-audit-logs/incident_timestamp.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "ApiKeyCreatedV1", - "description": "This entry is created whenever a api key is created", - "operationId": "Audit logs#ApiKeyCreatedV1", + "summary": "IncidentTimestampDeletedV1", + "description": "This entry is created whenever a incident timestamp is deleted", + "operationId": "Audit logs#IncidentTimestampDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "api_key.created", + "action": "incident_timestamp.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12568,8 +19065,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Development API Key", - "type": "api_key" + "name": "Fixed at", + "type": "incident_timestamp" } ], "version": 1 @@ -12580,24 +19077,24 @@ } } }, - "/x-audit-logs/api_key.deleted.1": { + "/x-audit-logs/incident_timestamp.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "ApiKeyDeletedV1", - "description": "This entry is created whenever a api key is deleted", - "operationId": "Audit logs#ApiKeyDeletedV1", + "summary": "IncidentTimestampUpdatedV1", + "description": "This entry is created whenever a incident timestamp is updated", + "operationId": "Audit logs#IncidentTimestampUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "api_key.deleted", + "action": "incident_timestamp.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12615,8 +19112,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Development API Key", - "type": "api_key" + "name": "Fixed at", + "type": "incident_timestamp" } ], "version": 1 @@ -12627,24 +19124,24 @@ } } }, - "/x-audit-logs/custom_field.created.1": { + "/x-audit-logs/incident_type.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "CustomFieldCreatedV1", - "description": "This entry is created whenever a custom field is created", - "operationId": "Audit logs#CustomFieldCreatedV1", + "summary": "IncidentTypeCreatedV1", + "description": "This entry is created whenever a incident type is created", + "operationId": "Audit logs#IncidentTypeCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "custom_field.created", + "action": "incident_type.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12662,8 +19159,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected teams", - "type": "custom_field" + "name": "Security", + "type": "incident_type" } ], "version": 1 @@ -12674,24 +19171,24 @@ } } }, - "/x-audit-logs/custom_field.deleted.1": { + "/x-audit-logs/incident_type.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "CustomFieldDeletedV1", - "description": "This entry is created whenever a custom field is deleted", - "operationId": "Audit logs#CustomFieldDeletedV1", + "summary": "IncidentTypeDeletedV1", + "description": "This entry is created whenever a incident type is deleted", + "operationId": "Audit logs#IncidentTypeDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "custom_field.deleted", + "action": "incident_type.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12709,8 +19206,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected teams", - "type": "custom_field" + "name": "Security", + "type": "incident_type" } ], "version": 1 @@ -12721,24 +19218,24 @@ } } }, - "/x-audit-logs/custom_field.updated.1": { + "/x-audit-logs/incident_type.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "CustomFieldUpdatedV1", - "description": "This entry is created whenever a custom field is updated", - "operationId": "Audit logs#CustomFieldUpdatedV1", + "summary": "IncidentTypeUpdatedV1", + "description": "This entry is created whenever a incident type is updated", + "operationId": "Audit logs#IncidentTypeUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "custom_field.updated", + "action": "incident_type.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12756,8 +19253,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Affected teams", - "type": "custom_field" + "name": "Security", + "type": "incident_type" } ], "version": 1 @@ -12768,24 +19265,24 @@ } } }, - "/x-audit-logs/follow_up_priority.created.1": { + "/x-audit-logs/integration.installed.1": { "get": { "tags": [ "Audit logs" ], - "summary": "FollowUpPriorityCreatedV1", - "description": "This entry is created whenever a follow up priority is created", - "operationId": "Audit logs#FollowUpPriorityCreatedV1", + "summary": "IntegrationInstalledV1", + "description": "This entry is created whenever an integration is installed", + "operationId": "Audit logs#IntegrationInstalledV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "follow_up_priority.created", + "action": "integration.installed", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12802,9 +19299,9 @@ "occurred_at": "2021-08-17T13:28:57.801578Z", "targets": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Low", - "type": "follow_up_priority" + "id": "github", + "name": "Github", + "type": "integration" } ], "version": 1 @@ -12815,24 +19312,24 @@ } } }, - "/x-audit-logs/follow_up_priority.deleted.1": { + "/x-audit-logs/integration.uninstalled.1": { "get": { "tags": [ "Audit logs" ], - "summary": "FollowUpPriorityDeletedV1", - "description": "This entry is created whenever a follow up priority is deleted", - "operationId": "Audit logs#FollowUpPriorityDeletedV1", + "summary": "IntegrationUninstalledV1", + "description": "This entry is created whenever an integration is uninstalled", + "operationId": "Audit logs#IntegrationUninstalledV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "follow_up_priority.deleted", + "action": "integration.uninstalled", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12849,9 +19346,9 @@ "occurred_at": "2021-08-17T13:28:57.801578Z", "targets": [ { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Low", - "type": "follow_up_priority" + "id": "github", + "name": "Github", + "type": "integration" } ], "version": 1 @@ -12862,24 +19359,24 @@ } } }, - "/x-audit-logs/follow_up_priority.updated.1": { + "/x-audit-logs/internal_status_page.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "FollowUpPriorityUpdatedV1", - "description": "This entry is created whenever a follow up priority is updated", - "operationId": "Audit logs#FollowUpPriorityUpdatedV1", + "summary": "InternalStatusPageCreatedV1", + "description": "This entry is created whenever an internal status page is created", + "operationId": "Audit logs#InternalStatusPageCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "follow_up_priority.updated", + "action": "internal_status_page.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12897,8 +19394,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Low", - "type": "follow_up_priority" + "name": "Public Page", + "type": "internal_status_page" } ], "version": 1 @@ -12909,24 +19406,24 @@ } } }, - "/x-audit-logs/incident_duration_metric.created.1": { + "/x-audit-logs/internal_status_page.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentDurationMetricCreatedV1", - "description": "This entry is created whenever a incident duration metric is created", - "operationId": "Audit logs#IncidentDurationMetricCreatedV1", + "summary": "InternalStatusPageDeletedV1", + "description": "This entry is created whenever an internal status page is deleted", + "operationId": "Audit logs#InternalStatusPageDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_duration_metric.created", + "action": "internal_status_page.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12944,8 +19441,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Time to resolve", - "type": "incident_duration_metric" + "name": "Public Page", + "type": "internal_status_page" } ], "version": 1 @@ -12956,24 +19453,24 @@ } } }, - "/x-audit-logs/incident_duration_metric.deleted.1": { + "/x-audit-logs/internal_status_page.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentDurationMetricDeletedV1", - "description": "This entry is created whenever a incident duration metric is deleted", - "operationId": "Audit logs#IncidentDurationMetricDeletedV1", + "summary": "InternalStatusPageUpdatedV1", + "description": "This entry is created whenever an internal status page has its configuration updated", + "operationId": "Audit logs#InternalStatusPageUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_duration_metric.deleted", + "action": "internal_status_page.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -12991,8 +19488,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Time to resolve", - "type": "incident_duration_metric" + "name": "Public Page", + "type": "internal_status_page" } ], "version": 1 @@ -13003,24 +19500,24 @@ } } }, - "/x-audit-logs/incident_duration_metric.updated.1": { + "/x-audit-logs/nudge.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentDurationMetricUpdatedV1", - "description": "This entry is created whenever a incident duration metric is updated", - "operationId": "Audit logs#IncidentDurationMetricUpdatedV1", + "summary": "NudgeCreatedV1", + "description": "This entry is created whenever a nudge is created", + "operationId": "Audit logs#NudgeCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_duration_metric.updated", + "action": "nudge.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13038,8 +19535,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Time to resolve", - "type": "incident_duration_metric" + "name": "Reminder to take a break", + "type": "nudge" } ], "version": 1 @@ -13050,24 +19547,24 @@ } } }, - "/x-audit-logs/incident_role.created.1": { + "/x-audit-logs/nudge.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentRoleCreatedV1", - "description": "This entry is created whenever a incident role is created", - "operationId": "Audit logs#IncidentRoleCreatedV1", + "summary": "NudgeDeletedV1", + "description": "This entry is created whenever a nudge is deleted", + "operationId": "Audit logs#NudgeDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_role.created", + "action": "nudge.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13085,8 +19582,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Communications Lead", - "type": "incident_role" + "name": "Reminder to take a break", + "type": "nudge" } ], "version": 1 @@ -13097,24 +19594,24 @@ } } }, - "/x-audit-logs/incident_role.deleted.1": { + "/x-audit-logs/nudge.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentRoleDeletedV1", - "description": "This entry is created whenever a incident role is deleted", - "operationId": "Audit logs#IncidentRoleDeletedV1", + "summary": "NudgeUpdatedV1", + "description": "This entry is created whenever a nudge is updated", + "operationId": "Audit logs#NudgeUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_role.deleted", + "action": "nudge.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13132,8 +19629,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Communications Lead", - "type": "incident_role" + "name": "Reminder to take a break", + "type": "nudge" } ], "version": 1 @@ -13144,24 +19641,24 @@ } } }, - "/x-audit-logs/incident_role.updated.1": { + "/x-audit-logs/policy.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentRoleUpdatedV1", - "description": "This entry is created whenever a incident role is updated", - "operationId": "Audit logs#IncidentRoleUpdatedV1", + "summary": "PolicyCreatedV1", + "description": "This entry is created whenever a policy is created", + "operationId": "Audit logs#PolicyCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_role.updated", + "action": "policy.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13179,8 +19676,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Communications Lead", - "type": "incident_role" + "name": "Follow-ups must be closed within 3 weeks", + "type": "policy" } ], "version": 1 @@ -13191,24 +19688,24 @@ } } }, - "/x-audit-logs/incident_status.created.1": { + "/x-audit-logs/policy.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentStatusCreatedV1", - "description": "This entry is created whenever a incident status is created", - "operationId": "Audit logs#IncidentStatusCreatedV1", + "summary": "PolicyDeletedV1", + "description": "This entry is created whenever a policy is deleted", + "operationId": "Audit logs#PolicyDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_status.created", + "action": "policy.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13226,8 +19723,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Investigating", - "type": "incident_status" + "name": "Follow-ups must be closed within 3 weeks", + "type": "policy" } ], "version": 1 @@ -13238,24 +19735,24 @@ } } }, - "/x-audit-logs/incident_status.deleted.1": { + "/x-audit-logs/policy.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentStatusDeletedV1", - "description": "This entry is created whenever a incident status is deleted", - "operationId": "Audit logs#IncidentStatusDeletedV1", + "summary": "PolicyUpdatedV1", + "description": "This entry is created whenever a policy is updated", + "operationId": "Audit logs#PolicyUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_status.deleted", + "action": "policy.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13273,8 +19770,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Investigating", - "type": "incident_status" + "name": "Follow-ups must be closed within 3 weeks", + "type": "policy" } ], "version": 1 @@ -13285,24 +19782,24 @@ } } }, - "/x-audit-logs/incident_status.updated.1": { + "/x-audit-logs/post_incident_task.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentStatusUpdatedV1", - "description": "This entry is created whenever a incident status is updated", - "operationId": "Audit logs#IncidentStatusUpdatedV1", + "summary": "PostIncidentTaskCreatedV1", + "description": "This entry is created whenever a post-incident task is created", + "operationId": "Audit logs#PostIncidentTaskCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_status.updated", + "action": "post_incident_task.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13320,8 +19817,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Investigating", - "type": "incident_status" + "name": "Schedule a debrief", + "type": "post_incident_task" } ], "version": 1 @@ -13332,24 +19829,24 @@ } } }, - "/x-audit-logs/incident_timestamp.created.1": { + "/x-audit-logs/post_incident_task.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTimestampCreatedV1", - "description": "This entry is created whenever a incident timestamp is created", - "operationId": "Audit logs#IncidentTimestampCreatedV1", + "summary": "PostIncidentTaskDeletedV1", + "description": "This entry is created whenever a post-incident task is deleted", + "operationId": "Audit logs#PostIncidentTaskDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_timestamp.created", + "action": "post_incident_task.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13367,8 +19864,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Fixed at", - "type": "incident_timestamp" + "name": "Schedule a debrief", + "type": "post_incident_task" } ], "version": 1 @@ -13379,24 +19876,24 @@ } } }, - "/x-audit-logs/incident_timestamp.deleted.1": { + "/x-audit-logs/post_incident_task.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTimestampDeletedV1", - "description": "This entry is created whenever a incident timestamp is deleted", - "operationId": "Audit logs#IncidentTimestampDeletedV1", + "summary": "PostIncidentTaskUpdatedV1", + "description": "This entry is created whenever a post-incident task is updated", + "operationId": "Audit logs#PostIncidentTaskUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_timestamp.deleted", + "action": "post_incident_task.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13414,8 +19911,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Fixed at", - "type": "incident_timestamp" + "name": "Schedule a debrief", + "type": "post_incident_task" } ], "version": 1 @@ -13426,24 +19923,24 @@ } } }, - "/x-audit-logs/incident_timestamp.updated.1": { + "/x-audit-logs/private_incident.access_attempted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTimestampUpdatedV1", - "description": "This entry is created whenever a incident timestamp is updated", - "operationId": "Audit logs#IncidentTimestampUpdatedV1", + "summary": "PrivateIncidentAccessAttemptedV1", + "description": "This entry is created whenever someone attempts to access a private incident.", + "operationId": "Audit logs#PrivateIncidentAccessAttemptedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/PrivateIncidentAccessAttemptedV1ResponseBody" }, "example": { - "action": "incident_timestamp.updated", + "action": "private_incident.access_attempted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13457,12 +19954,15 @@ "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": "Fixed at", - "type": "incident_timestamp" + "name": "#INC-123 The website is slow", + "type": "incident" } ], "version": 1 @@ -13473,24 +19973,24 @@ } } }, - "/x-audit-logs/incident_type.created.1": { + "/x-audit-logs/private_incident.access_requested.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTypeCreatedV1", - "description": "This entry is created whenever a incident type is created", - "operationId": "Audit logs#IncidentTypeCreatedV1", + "summary": "PrivateIncidentAccessRequestedV1", + "description": "This entry is created whenever someone requests access to a private incident.", + "operationId": "Audit logs#PrivateIncidentAccessRequestedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_type.created", + "action": "private_incident.access_requested", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13508,8 +20008,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "incident_type" + "name": "#INC-123 The website is slow", + "type": "incident" } ], "version": 1 @@ -13520,24 +20020,24 @@ } } }, - "/x-audit-logs/incident_type.deleted.1": { + "/x-audit-logs/private_incident_membership.granted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTypeDeletedV1", - "description": "This entry is created whenever a incident type is deleted", - "operationId": "Audit logs#IncidentTypeDeletedV1", + "summary": "PrivateIncidentMembershipGrantedV1", + "description": "This entry is created whenever someone is granted access to a private incident. If they have the 'manage private incidents' permission, then it'll appear that the system has given them access to the incident.", + "operationId": "Audit logs#PrivateIncidentMembershipGrantedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_type.deleted", + "action": "private_incident_membership.granted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13555,8 +20055,13 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "incident_type" + "name": "Bob the builder", + "type": "user" + }, + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } ], "version": 1 @@ -13567,24 +20072,24 @@ } } }, - "/x-audit-logs/incident_type.updated.1": { + "/x-audit-logs/private_incident_membership.revoked.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IncidentTypeUpdatedV1", - "description": "This entry is created whenever a incident type is updated", - "operationId": "Audit logs#IncidentTypeUpdatedV1", + "summary": "PrivateIncidentMembershipRevokedV1", + "description": "This entry is created whenever someone's access to a private incident is revoked.", + "operationId": "Audit logs#PrivateIncidentMembershipRevokedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "incident_type.updated", + "action": "private_incident_membership.revoked", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13602,8 +20107,13 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "incident_type" + "name": "Bob the builder", + "type": "user" + }, + { + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "#INC-123 The website is slow", + "type": "incident" } ], "version": 1 @@ -13614,24 +20124,24 @@ } } }, - "/x-audit-logs/integration.installed.1": { + "/x-audit-logs/rbac_role.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IntegrationInstalledV1", - "description": "This entry is created whenever an integration is installed", - "operationId": "Audit logs#IntegrationInstalledV1", + "summary": "RbacRoleCreatedV1", + "description": "This entry is created whenever a rbac role is created", + "operationId": "Audit logs#RbacRoleCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "integration.installed", + "action": "rbac_role.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13648,9 +20158,9 @@ "occurred_at": "2021-08-17T13:28:57.801578Z", "targets": [ { - "id": "github", - "name": "Github", - "type": "integration" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Engineering", + "type": "rbac_role" } ], "version": 1 @@ -13661,24 +20171,24 @@ } } }, - "/x-audit-logs/integration.uninstalled.1": { + "/x-audit-logs/rbac_role.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "IntegrationUninstalledV1", - "description": "This entry is created whenever an integration is uninstalled", - "operationId": "Audit logs#IntegrationUninstalledV1", + "summary": "RbacRoleDeletedV1", + "description": "This entry is created whenever a rbac role is deleted", + "operationId": "Audit logs#RbacRoleDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "integration.uninstalled", + "action": "rbac_role.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13695,9 +20205,9 @@ "occurred_at": "2021-08-17T13:28:57.801578Z", "targets": [ { - "id": "github", - "name": "Github", - "type": "integration" + "id": "01FCNDV6P870EA6S7TK1DSYDG0", + "name": "Engineering", + "type": "rbac_role" } ], "version": 1 @@ -13708,24 +20218,24 @@ } } }, - "/x-audit-logs/policy.created.1": { + "/x-audit-logs/rbac_role.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PolicyCreatedV1", - "description": "This entry is created whenever a policy is created", - "operationId": "Audit logs#PolicyCreatedV1", + "summary": "RbacRoleUpdatedV1", + "description": "This entry is created whenever a rbac role is updated", + "operationId": "Audit logs#RbacRoleUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "policy.created", + "action": "rbac_role.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13743,8 +20253,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Follow-ups must be closed within 3 weeks", - "type": "policy" + "name": "Engineering", + "type": "rbac_role" } ], "version": 1 @@ -13755,24 +20265,24 @@ } } }, - "/x-audit-logs/policy.deleted.1": { + "/x-audit-logs/schedule.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PolicyDeletedV1", - "description": "This entry is created whenever a policy is deleted", - "operationId": "Audit logs#PolicyDeletedV1", + "summary": "ScheduleCreatedV1", + "description": "This entry is created whenever a schedule is created", + "operationId": "Audit logs#ScheduleCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "policy.deleted", + "action": "schedule.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13790,8 +20300,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Follow-ups must be closed within 3 weeks", - "type": "policy" + "name": "On-call", + "type": "schedule" } ], "version": 1 @@ -13802,24 +20312,24 @@ } } }, - "/x-audit-logs/policy.updated.1": { + "/x-audit-logs/schedule.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PolicyUpdatedV1", - "description": "This entry is created whenever a policy is updated", - "operationId": "Audit logs#PolicyUpdatedV1", + "summary": "ScheduleDeletedV1", + "description": "This entry is created whenever a schedule is deleted", + "operationId": "Audit logs#ScheduleDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "policy.updated", + "action": "schedule.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13837,8 +20347,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Follow-ups must be closed within 3 weeks", - "type": "policy" + "name": "On-call", + "type": "schedule" } ], "version": 1 @@ -13849,24 +20359,24 @@ } } }, - "/x-audit-logs/private_incident.access_attempted.1": { + "/x-audit-logs/schedule.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PrivateIncidentAccessAttemptedV1", - "description": "This entry is created whenever someone attempts to access a private incident.", - "operationId": "Audit logs#PrivateIncidentAccessAttemptedV1", + "summary": "ScheduleUpdatedV1", + "description": "This entry is created whenever a schedule is updated", + "operationId": "Audit logs#ScheduleUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateIncidentAccessAttemptedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "private_incident.access_attempted", + "action": "schedule.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13880,15 +20390,12 @@ "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" + "name": "On-call", + "type": "schedule" } ], "version": 1 @@ -13899,24 +20406,24 @@ } } }, - "/x-audit-logs/private_incident.access_requested.1": { + "/x-audit-logs/scim_group.role_mappings_updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PrivateIncidentAccessRequestedV1", - "description": "This entry is created whenever someone requests access to a private incident.", - "operationId": "Audit logs#PrivateIncidentAccessRequestedV1", + "summary": "ScimGroupRoleMappingsUpdatedV1", + "description": "This entry is created whenever a SCIM group is mapped to a new RBAC role", + "operationId": "Audit logs#ScimGroupRoleMappingsUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/ScimGroupRoleMappingsUpdatedV1ResponseBody" }, "example": { - "action": "private_incident.access_requested", + "action": "scim_group.role_mappings_updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13930,12 +20437,18 @@ "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": "#INC-123 The website is slow", - "type": "incident" + "name": "Security", + "type": "scim_group" } ], "version": 1 @@ -13946,24 +20459,24 @@ } } }, - "/x-audit-logs/private_incident_membership.granted.1": { + "/x-audit-logs/severity.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PrivateIncidentMembershipGrantedV1", - "description": "This entry is created whenever someone is granted access to a private incident. If they have the 'manage private incidents' permission, then it'll appear that the system has given them access to the incident.", - "operationId": "Audit logs#PrivateIncidentMembershipGrantedV1", + "summary": "SeverityCreatedV1", + "description": "This entry is created whenever a severity is created", + "operationId": "Audit logs#SeverityCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "private_incident_membership.granted", + "action": "severity.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -13981,13 +20494,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Bob the builder", - "type": "user" - }, - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "name": "Minor", + "type": "severity" } ], "version": 1 @@ -13998,24 +20506,24 @@ } } }, - "/x-audit-logs/private_incident_membership.revoked.1": { + "/x-audit-logs/severity.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "PrivateIncidentMembershipRevokedV1", - "description": "This entry is created whenever someone's access to a private incident is revoked.", - "operationId": "Audit logs#PrivateIncidentMembershipRevokedV1", + "summary": "SeverityDeletedV1", + "description": "This entry is created whenever a severity is deleted", + "operationId": "Audit logs#SeverityDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "private_incident_membership.revoked", + "action": "severity.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14033,13 +20541,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Bob the builder", - "type": "user" - }, - { - "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "#INC-123 The website is slow", - "type": "incident" + "name": "Minor", + "type": "severity" } ], "version": 1 @@ -14050,24 +20553,24 @@ } } }, - "/x-audit-logs/rbac_role.created.1": { + "/x-audit-logs/severity.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "RbacRoleCreatedV1", - "description": "This entry is created whenever a rbac role is created", - "operationId": "Audit logs#RbacRoleCreatedV1", + "summary": "SeverityUpdatedV1", + "description": "This entry is created whenever a severity is updated", + "operationId": "Audit logs#SeverityUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "rbac_role.created", + "action": "severity.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14085,8 +20588,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Engineering", - "type": "rbac_role" + "name": "Minor", + "type": "severity" } ], "version": 1 @@ -14097,24 +20600,24 @@ } } }, - "/x-audit-logs/rbac_role.deleted.1": { + "/x-audit-logs/status_page.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "RbacRoleDeletedV1", - "description": "This entry is created whenever a rbac role is deleted", - "operationId": "Audit logs#RbacRoleDeletedV1", + "summary": "StatusPageCreatedV1", + "description": "This entry is created whenever a status page is created", + "operationId": "Audit logs#StatusPageCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "rbac_role.deleted", + "action": "status_page.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14132,8 +20635,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Engineering", - "type": "rbac_role" + "name": "Public Page", + "type": "status_page" } ], "version": 1 @@ -14144,24 +20647,24 @@ } } }, - "/x-audit-logs/rbac_role.updated.1": { + "/x-audit-logs/status_page.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "RbacRoleUpdatedV1", - "description": "This entry is created whenever a rbac role is updated", - "operationId": "Audit logs#RbacRoleUpdatedV1", + "summary": "StatusPageDeletedV1", + "description": "This entry is created whenever a status page is deleted", + "operationId": "Audit logs#StatusPageDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "rbac_role.updated", + "action": "status_page.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14179,8 +20682,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Engineering", - "type": "rbac_role" + "name": "Public Page", + "type": "status_page" } ], "version": 1 @@ -14191,24 +20694,24 @@ } } }, - "/x-audit-logs/scim_group.role_mappings_updated.1": { + "/x-audit-logs/status_page.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "ScimGroupRoleMappingsUpdatedV1", - "description": "This entry is created whenever a SCIM group is mapped to a new RBAC role", - "operationId": "Audit logs#ScimGroupRoleMappingsUpdatedV1", + "summary": "StatusPageUpdatedV1", + "description": "This entry is created whenever a status page has its configuration updated", + "operationId": "Audit logs#StatusPageUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScimGroupRoleMappingsUpdatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "scim_group.role_mappings_updated", + "action": "status_page.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14222,18 +20725,12 @@ "location": "1.2.3.4", "user_agent": "Chrome/91.0.4472.114" }, - "metadata": { - "after_base_role_slug": "owner", - "after_custom_role_slugs": "engineering,data", - "before_base_role_slug": "admin", - "before_custom_role_slugs": "engineering,security" - }, "occurred_at": "2021-08-17T13:28:57.801578Z", "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Security", - "type": "scim_group" + "name": "Public Page", + "type": "status_page" } ], "version": 1 @@ -14244,24 +20741,24 @@ } } }, - "/x-audit-logs/severity.created.1": { + "/x-audit-logs/status_page_sub_page.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "SeverityCreatedV1", - "description": "This entry is created whenever a severity is created", - "operationId": "Audit logs#SeverityCreatedV1", + "summary": "StatusPageSubPageCreatedV1", + "description": "This entry is created whenever a status page sub-page is created", + "operationId": "Audit logs#StatusPageSubPageCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "severity.created", + "action": "status_page_sub_page.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14279,8 +20776,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "type": "severity" + "name": "Superpayments France", + "type": "status_page_sub_page" } ], "version": 1 @@ -14291,24 +20788,24 @@ } } }, - "/x-audit-logs/severity.deleted.1": { + "/x-audit-logs/status_page_sub_page.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "SeverityDeletedV1", - "description": "This entry is created whenever a severity is deleted", - "operationId": "Audit logs#SeverityDeletedV1", + "summary": "StatusPageSubPageDeletedV1", + "description": "This entry is created whenever a status page sub-page is deleted", + "operationId": "Audit logs#StatusPageSubPageDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "severity.deleted", + "action": "status_page_sub_page.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14326,8 +20823,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "type": "severity" + "name": "Superpayments France", + "type": "status_page_sub_page" } ], "version": 1 @@ -14338,24 +20835,24 @@ } } }, - "/x-audit-logs/severity.updated.1": { + "/x-audit-logs/status_page_sub_page.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "SeverityUpdatedV1", - "description": "This entry is created whenever a severity is updated", - "operationId": "Audit logs#SeverityUpdatedV1", + "summary": "StatusPageSubPageUpdatedV1", + "description": "This entry is created whenever a status page sub-page has its configuration updated", + "operationId": "Audit logs#StatusPageSubPageUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "severity.updated", + "action": "status_page_sub_page.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14373,8 +20870,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Minor", - "type": "severity" + "name": "Superpayments France", + "type": "status_page_sub_page" } ], "version": 1 @@ -14385,24 +20882,24 @@ } } }, - "/x-audit-logs/status_page.created.1": { + "/x-audit-logs/status_page_template.created.1": { "get": { "tags": [ "Audit logs" ], - "summary": "StatusPageCreatedV1", - "description": "This entry is created whenever a status page is created", - "operationId": "Audit logs#StatusPageCreatedV1", + "summary": "StatusPageTemplateCreatedV1", + "description": "This entry is created whenever a status page template is created", + "operationId": "Audit logs#StatusPageTemplateCreatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "status_page.created", + "action": "status_page_template.created", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14420,8 +20917,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Public Page", - "type": "status_page" + "name": "Investigating", + "type": "status_page_template" } ], "version": 1 @@ -14432,24 +20929,24 @@ } } }, - "/x-audit-logs/status_page.deleted.1": { + "/x-audit-logs/status_page_template.deleted.1": { "get": { "tags": [ "Audit logs" ], - "summary": "StatusPageDeletedV1", - "description": "This entry is created whenever a status page is deleted", - "operationId": "Audit logs#StatusPageDeletedV1", + "summary": "StatusPageTemplateDeletedV1", + "description": "This entry is created whenever a status page template is deleted", + "operationId": "Audit logs#StatusPageTemplateDeletedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "status_page.deleted", + "action": "status_page_template.deleted", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14467,8 +20964,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Public Page", - "type": "status_page" + "name": "Investigating", + "type": "status_page_template" } ], "version": 1 @@ -14479,24 +20976,24 @@ } } }, - "/x-audit-logs/status_page.updated.1": { + "/x-audit-logs/status_page_template.updated.1": { "get": { "tags": [ "Audit logs" ], - "summary": "StatusPageUpdatedV1", - "description": "This entry is created whenever a status page has its configuration updated", - "operationId": "Audit logs#StatusPageUpdatedV1", + "summary": "StatusPageTemplateUpdatedV1", + "description": "This entry is created whenever a status page template is updated", + "operationId": "Audit logs#StatusPageTemplateUpdatedV1", "responses": { "200": { "description": "OK response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { - "action": "status_page.updated", + "action": "status_page_template.updated", "actor": { "id": "01FCNDV6P870EA6S7TK1DSYDG0", "metadata": { @@ -14514,8 +21011,8 @@ "targets": [ { "id": "01FCNDV6P870EA6S7TK1DSYDG0", - "name": "Public Page", - "type": "status_page" + "name": "Investigating", + "type": "status_page_template" } ], "version": 1 @@ -14540,7 +21037,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "user.created", @@ -14587,7 +21084,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "user.deactivated", @@ -14634,7 +21131,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "user.reinstated", @@ -14734,7 +21231,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "user.updated", @@ -14781,7 +21278,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "workflow.created", @@ -14828,7 +21325,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "workflow.deleted", @@ -14875,7 +21372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnouncementRuleCreatedV1ResponseBody" + "$ref": "#/components/schemas/APIKeyCreatedV1ResponseBody" }, "example": { "action": "workflow.updated", @@ -14909,4 +21406,4 @@ } } } -} +} \ No newline at end of file diff --git a/cmd/catalog-importer/cmd/sync.go b/cmd/catalog-importer/cmd/sync.go index 2ab3bc0..410254e 100644 --- a/cmd/catalog-importer/cmd/sync.go +++ b/cmd/catalog-importer/cmd/sync.go @@ -240,7 +240,7 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf } } - // Update type schemas to match config + // Update type schemas to match config (excluding backlinks) OUT("\n↻ Syncing catalog type schemas...") for _, outputType := range cfg.Outputs() { baseModel, enumModels := output.MarshalType(outputType) @@ -396,7 +396,7 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf ExternalID: value, Name: value, Aliases: []string{}, - AttributeValues: map[string]client.CatalogAttributeBindingPayloadV2{}, + AttributeValues: map[string]client.EngineParamBindingPayloadV2{}, }) } @@ -455,7 +455,7 @@ func newEntriesClient(cl *client.ClientWithResponses, existingCatalogTypes []cli Update: func(ctx context.Context, entry *client.CatalogEntryV2, payload client.UpdateEntryRequestBody) (*client.CatalogEntryV2, error) { existingPayload := client.UpdateEntryRequestBody{ Aliases: lo.ToPtr(entry.Aliases), - AttributeValues: map[string]client.CatalogAttributeBindingPayloadV2{}, + AttributeValues: map[string]client.EngineParamBindingPayloadV2{}, ExternalId: entry.ExternalId, Name: entry.Name, Rank: &entry.Rank, @@ -464,16 +464,16 @@ func newEntriesClient(cl *client.ClientWithResponses, existingCatalogTypes []cli existingPayload.Rank = nil } for attrID, attr := range entry.AttributeValues { - result := client.CatalogAttributeBindingPayloadV2{} + result := client.EngineParamBindingPayloadV2{} if attr.Value != nil { - result.Value = &client.CatalogAttributeValuePayloadV2{ + result.Value = &client.EngineParamBindingValuePayloadV2{ Literal: attr.Value.Literal, } } if attr.ArrayValue != nil { - arrayValue := []client.CatalogAttributeValuePayloadV2{} + arrayValue := []client.EngineParamBindingValuePayloadV2{} for _, elementValue := range *attr.ArrayValue { - arrayValue = append(arrayValue, client.CatalogAttributeValuePayloadV2{ + arrayValue = append(arrayValue, client.EngineParamBindingValuePayloadV2{ Literal: elementValue.Literal, }) } diff --git a/output/marshal.go b/output/marshal.go index 467348b..bb29dc6 100644 --- a/output/marshal.go +++ b/output/marshal.go @@ -27,7 +27,7 @@ type CatalogEntryModel struct { Name string Aliases []string Rank int32 - AttributeValues map[string]client.CatalogAttributeBindingPayloadV2 + AttributeValues map[string]client.EngineParamBindingPayloadV2 } // MarshalType builds the base catalog type model for the output, and any associated enum @@ -155,10 +155,10 @@ func MarshalEntries(ctx context.Context, logger kitlog.Logger, output *Output, e // Attribute values are built best effort, as it might not be the case that upstream // source entries have these fields, or have fields of the correct type. - attributeValues := map[string]client.CatalogAttributeBindingPayloadV2{} + attributeValues := map[string]client.EngineParamBindingPayloadV2{} for attributeID, src := range attributeSources { - binding := client.CatalogAttributeBindingPayloadV2{} + binding := client.EngineParamBindingPayloadV2{} if attributeByID[attributeID].Array { valueLiterals, err := expr.EvaluateArray[any](ctx, logger, src, entry) @@ -169,14 +169,14 @@ func MarshalEntries(ctx context.Context, logger kitlog.Logger, output *Output, e continue } - arrayValue := []client.CatalogAttributeValuePayloadV2{} + arrayValue := []client.EngineParamBindingValuePayloadV2{} for _, literalAny := range valueLiterals { literal, ok := literalAny.(string) if !ok { continue } - arrayValue = append(arrayValue, client.CatalogAttributeValuePayloadV2{ + arrayValue = append(arrayValue, client.EngineParamBindingValuePayloadV2{ Literal: lo.ToPtr(literal), }) } @@ -191,7 +191,7 @@ func MarshalEntries(ctx context.Context, logger kitlog.Logger, output *Output, e continue } - binding.Value = &client.CatalogAttributeValuePayloadV2{ + binding.Value = &client.EngineParamBindingValuePayloadV2{ Literal: literal, } } diff --git a/output/output.go b/output/output.go index 5fd37d7..a27361d 100644 --- a/output/output.go +++ b/output/output.go @@ -48,12 +48,13 @@ func (s SourceConfig) Validate() error { } type Attribute struct { - ID string `json:"id"` - Name string `json:"name"` - Type null.String `json:"type"` - Array bool `json:"array"` - Source null.String `json:"source"` - Enum *AttributeEnum `json:"enum"` + ID string `json:"id"` + Name string `json:"name"` + Type null.String `json:"type"` + Array bool `json:"array"` + Source null.String `json:"source"` + Enum *AttributeEnum `json:"enum"` + BacklinkAttribute null.String `json:"backlink_attribute"` } func (a Attribute) Validate() error { diff --git a/reconcile/entries.go b/reconcile/entries.go index f243248..4c7eef7 100644 --- a/reconcile/entries.go +++ b/reconcile/entries.go @@ -213,24 +213,24 @@ func Entries(ctx context.Context, logger kitlog.Logger, cl EntriesClient, catalo entry.Name == model.Name && reflect.DeepEqual(entry.Aliases, model.Aliases) && entry.Rank == model.Rank - currentBindings := map[string]client.CatalogAttributeBindingPayloadV2{} + currentBindings := map[string]client.EngineParamBindingPayloadV2{} for attributeID, value := range entry.AttributeValues { - current := client.CatalogAttributeBindingPayloadV2{} + current := client.EngineParamBindingPayloadV2{} // Our API behaves strangely with empty arrays, and will omit them. This patch // ensures the array is present so our comparison doesn't trigger falsly. if value.ArrayValue == nil && value.Value == nil { - value.ArrayValue = lo.ToPtr([]client.CatalogAttributeValueV2{}) + value.ArrayValue = lo.ToPtr([]client.EngineParamBindingValueV2{}) } if value.ArrayValue != nil { - current.ArrayValue = lo.ToPtr(lo.Map(*value.ArrayValue, func(binding client.CatalogAttributeValueV2, _ int) client.CatalogAttributeValuePayloadV2 { - return client.CatalogAttributeValuePayloadV2{ + current.ArrayValue = lo.ToPtr(lo.Map(*value.ArrayValue, func(binding client.EngineParamBindingValueV2, _ int) client.EngineParamBindingValuePayloadV2 { + return client.EngineParamBindingValuePayloadV2{ Literal: binding.Literal, } })) } if value.Value != nil { - current.Value = &client.CatalogAttributeValuePayloadV2{ + current.Value = &client.EngineParamBindingValuePayloadV2{ Literal: value.Value.Literal, } } @@ -301,7 +301,7 @@ func GetEntries(ctx context.Context, cl *client.ClientWithResponses, catalogType for { result, err := cl.CatalogV2ListEntriesWithResponse(ctx, &client.CatalogV2ListEntriesParams{ CatalogTypeId: catalogTypeID, - PageSize: lo.ToPtr(int(250)), + PageSize: lo.ToPtr(int64(250)), After: after, }) if err != nil { From 3c25f84760f0dd27f01abc969c7f29986e4c870d Mon Sep 17 00:00:00 2001 From: Lisa Karlin Curtis Date: Mon, 25 Mar 2024 17:33:10 +0000 Subject: [PATCH 2/3] Support backlink attributes via the importer We're introducing backlink attributes, which allow you to say 'find all the features that this team owns' or similar, based on another catalog type. This is challenging for the importer as this means attributes in an importer config can reference each other. e.g. if I'm creating both Teams and Features in my catalog, I need to wait until Features exists before creating the backlink attribute in Teams. To resolve this, we split the UpdateTypeSchema process into two parts: 1. Create/Update all the types and their schemas 2. Create any new backlinks that don't exist yet (as the other attribute must now be present). Note that to make the code sane, I've pulled the 'if dryRun' up one level as dryRun doesn't have any of these concerns. --- cmd/catalog-importer/cmd/sync.go | 144 ++++++++++++++++++++++++------- output/marshal.go | 16 +++- 2 files changed, 127 insertions(+), 33 deletions(-) diff --git a/cmd/catalog-importer/cmd/sync.go b/cmd/catalog-importer/cmd/sync.go index 410254e..be80a7c 100644 --- a/cmd/catalog-importer/cmd/sync.go +++ b/cmd/catalog-importer/cmd/sync.go @@ -240,33 +240,73 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf } } - // Update type schemas to match config (excluding backlinks) OUT("\n↻ Syncing catalog type schemas...") - for _, outputType := range cfg.Outputs() { - baseModel, enumModels := output.MarshalType(outputType) - for _, model := range append(enumModels, baseModel) { - catalogType := catalogTypesByOutput[model.TypeName] - - var updatedCatalogType client.CatalogTypeV2 - if opt.DryRun { - logger.Log("msg", "dry-run active, which means we fake a response") - updatedCatalogType = *catalogType // they start the same - - // Then we pretend like we've already updated the schema, which means we rebuild the - // attributes. - updatedCatalogType.Schema = client.CatalogTypeSchemaV2{ - Version: updatedCatalogType.Schema.Version, - Attributes: []client.CatalogTypeAttributeV2{}, + if opt.DryRun { + for _, outputType := range cfg.Outputs() { + baseModel, enumModels := output.MarshalType(outputType) + for _, model := range append(enumModels, baseModel) { + catalogType := catalogTypesByOutput[model.TypeName] + + var updatedCatalogType client.CatalogTypeV2 + if opt.DryRun { + logger.Log("msg", "dry-run active, which means we fake a response") + updatedCatalogType = *catalogType // they start the same + + // Then we pretend like we've already updated the schema, which means we rebuild the + // attributes. + updatedCatalogType.Schema = client.CatalogTypeSchemaV2{ + Version: updatedCatalogType.Schema.Version, + Attributes: []client.CatalogTypeAttributeV2{}, + } + for _, attr := range model.Attributes { + updatedCatalogType.Schema.Attributes = append(updatedCatalogType.Schema.Attributes, client.CatalogTypeAttributeV2{ + Id: *attr.Id, + Name: attr.Name, + Type: attr.Type, + Array: attr.Array, + Mode: client.CatalogTypeAttributeV2Mode(*attr.Mode), + BacklinkAttribute: attr.BacklinkAttribute, + }) + } } + OUT(" ✔ %s (id=%s)", model.TypeName, catalogType.Id) + DIFF(" ", *catalogType, updatedCatalogType) + } + } + } else { + // Update all the type schemas except for new backlinks, which could reference + // attributes that don't exist yet. + catalogTypeVersions := map[string]int64{} + for _, outputType := range cfg.Outputs() { + baseModel, enumModels := output.MarshalType(outputType) + for _, model := range append(enumModels, baseModel) { + catalogType := catalogTypesByOutput[model.TypeName] + + attributesWithoutNewBacklinks := []client.CatalogTypeAttributePayloadV2{} for _, attr := range model.Attributes { - updatedCatalogType.Schema.Attributes = append(updatedCatalogType.Schema.Attributes, client.CatalogTypeAttributeV2{ - Id: *attr.Id, - Name: attr.Name, - Type: attr.Type, - Array: attr.Array, - }) + if attr.Mode != nil && *attr.Mode == client.CatalogTypeAttributePayloadV2ModeBacklink { + inCurrentSchema := false + // Does it exist in the current schema? + if attr.Id == nil { + logger.Log("msg", "attribute ID is empty, which shouldn't be possible") + continue + } + + for _, existingAttr := range catalogType.Schema.Attributes { + if existingAttr.Id == *attr.Id { + inCurrentSchema = true + break + } + } + + if !inCurrentSchema { + // We can't add new backlinks yet in case the attribute it refers to doesn't exist yet. + continue + } + } + attributesWithoutNewBacklinks = append(attributesWithoutNewBacklinks, attr) } - } else { + logger.Log("msg", "updating catalog type", "catalog_type_id", catalogType.Id) result, err := cl.CatalogV2UpdateTypeWithResponse(ctx, catalogType.Id, client.CatalogV2UpdateTypeJSONRequestBody{ Name: model.Name, @@ -281,19 +321,65 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf version := result.JSON200.CatalogType.Schema.Version logger.Log("msg", "updating catalog type schema", "catalog_type_id", catalogType.Id, "version", version) - schemaResult, err := cl.CatalogV2UpdateTypeSchemaWithResponse(ctx, catalogType.Id, client.CatalogV2UpdateTypeSchemaJSONRequestBody{ + schema, err := cl.CatalogV2UpdateTypeSchemaWithResponse(ctx, catalogType.Id, client.CatalogV2UpdateTypeSchemaJSONRequestBody{ Version: version, - Attributes: model.Attributes, + Attributes: attributesWithoutNewBacklinks, }) if err != nil { return errors.Wrap(err, "updating catalog type schema") } - updatedCatalogType = schemaResult.JSON200.CatalogType + catalogTypeVersions[catalogType.Id] = schema.JSON200.CatalogType.Schema.Version + + OUT(" ✔ %s (id=%s)", model.TypeName, catalogType.Id) } - OUT(" ✔ %s (id=%s)", model.TypeName, catalogType.Id) - if opt.DryRun { - DIFF(" ", *catalogType, updatedCatalogType) + } + + // Then go through again and create any types that do have new backlinks + OUT("\n↻ Syncing backlink attributes...") + for _, outputType := range cfg.Outputs() { + baseModel, enumModels := output.MarshalType(outputType) + for _, model := range append(enumModels, baseModel) { + catalogType := catalogTypesByOutput[model.TypeName] + + hasNewBacklinks := false + for _, attr := range model.Attributes { + if attr.Mode != nil && attr.BacklinkAttribute != nil { + inCurrentSchema := false + // Does it exist in the current schema? + if attr.Id == nil { + logger.Log("msg", "attribute ID is empty, which shouldn't be possible") + continue + } + + for _, existingAttr := range catalogType.Schema.Attributes { + if existingAttr.Id == *attr.Id { + inCurrentSchema = true + break + } + } + + if !inCurrentSchema { + hasNewBacklinks = true + } + } + } + + if !hasNewBacklinks { + continue + } + version := catalogTypeVersions[catalogType.Id] + logger.Log("msg", "updating catalog type schema: creating backlink attribute(s)", "catalog_type_id", catalogType.Id, "version", version) + + _, err = cl.CatalogV2UpdateTypeSchemaWithResponse(ctx, catalogType.Id, client.CatalogV2UpdateTypeSchemaJSONRequestBody{ + Version: version, + Attributes: model.Attributes, + }) + if err != nil { + return errors.Wrap(err, "updating catalog type schema") + } + + OUT(" ✔ %s (id=%s)", model.TypeName, catalogType.Id) } } } diff --git a/output/marshal.go b/output/marshal.go index bb29dc6..4e20eae 100644 --- a/output/marshal.go +++ b/output/marshal.go @@ -51,12 +51,19 @@ func MarshalType(output *Output) (base *CatalogTypeModel, enumTypes []*CatalogTy attrType = attr.Type.String } + mode := client.CatalogTypeAttributePayloadV2ModeManual + if attr.BacklinkAttribute.Valid { + mode = client.CatalogTypeAttributePayloadV2ModeBacklink + } + base.Attributes = append( base.Attributes, client.CatalogTypeAttributePayloadV2{ - Id: lo.ToPtr(attr.ID), - Name: attr.Name, - Type: attrType, - Array: attr.Array, + Id: lo.ToPtr(attr.ID), + Name: attr.Name, + Type: attrType, + Array: attr.Array, + BacklinkAttribute: attr.BacklinkAttribute.Ptr(), + Mode: lo.ToPtr(mode), }) // The enums we generate should be returned as types too, as we'll need to sync them @@ -72,6 +79,7 @@ func MarshalType(output *Output) (base *CatalogTypeModel, enumTypes []*CatalogTy Id: lo.ToPtr("description"), Name: "Description", Type: "String", + Mode: lo.ToPtr(client.CatalogTypeAttributePayloadV2ModeManual), }, }, SourceAttribute: lo.ToPtr(*attr), From c620d6a8643b82ff38a5c9eb98a133a80c48645b Mon Sep 17 00:00:00 2001 From: Lisa Karlin Curtis Date: Mon, 25 Mar 2024 18:02:14 +0000 Subject: [PATCH 3/3] Fixes for Benjis comments --- cmd/catalog-importer/cmd/sync.go | 44 +++++++++----------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/cmd/catalog-importer/cmd/sync.go b/cmd/catalog-importer/cmd/sync.go index be80a7c..2193e78 100644 --- a/cmd/catalog-importer/cmd/sync.go +++ b/cmd/catalog-importer/cmd/sync.go @@ -284,27 +284,17 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf attributesWithoutNewBacklinks := []client.CatalogTypeAttributePayloadV2{} for _, attr := range model.Attributes { - if attr.Mode != nil && *attr.Mode == client.CatalogTypeAttributePayloadV2ModeBacklink { - inCurrentSchema := false - // Does it exist in the current schema? - if attr.Id == nil { - logger.Log("msg", "attribute ID is empty, which shouldn't be possible") - continue - } - - for _, existingAttr := range catalogType.Schema.Attributes { - if existingAttr.Id == *attr.Id { - inCurrentSchema = true - break - } - } - - if !inCurrentSchema { - // We can't add new backlinks yet in case the attribute it refers to doesn't exist yet. - continue + isBacklink := *attr.Mode == client.CatalogTypeAttributePayloadV2ModeBacklink + if isBacklink { + _, inCurrentSchema := lo.Find(catalogType.Schema.Attributes, func(existingAttr client.CatalogTypeAttributeV2) bool { + return existingAttr.Id == *attr.Id + }) + if inCurrentSchema { + attributesWithoutNewBacklinks = append(attributesWithoutNewBacklinks, attr) } + } else { + attributesWithoutNewBacklinks = append(attributesWithoutNewBacklinks, attr) } - attributesWithoutNewBacklinks = append(attributesWithoutNewBacklinks, attr) } logger.Log("msg", "updating catalog type", "catalog_type_id", catalogType.Id) @@ -345,19 +335,9 @@ func (opt *SyncOptions) Run(ctx context.Context, logger kitlog.Logger, cfg *conf hasNewBacklinks := false for _, attr := range model.Attributes { if attr.Mode != nil && attr.BacklinkAttribute != nil { - inCurrentSchema := false - // Does it exist in the current schema? - if attr.Id == nil { - logger.Log("msg", "attribute ID is empty, which shouldn't be possible") - continue - } - - for _, existingAttr := range catalogType.Schema.Attributes { - if existingAttr.Id == *attr.Id { - inCurrentSchema = true - break - } - } + _, inCurrentSchema := lo.Find(catalogType.Schema.Attributes, func(existingAttr client.CatalogTypeAttributeV2) bool { + return existingAttr.Id == *attr.Id + }) if !inCurrentSchema { hasNewBacklinks = true