diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index edf52001413..8ac61c056a5 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -13103,6 +13103,100 @@ components:
- findings
- project
type: object
+ CreateComponentRequest:
+ example:
+ data:
+ attributes:
+ name: Metrics Intake
+ position: 0
+ type: component
+ relationships:
+ group:
+ data: null
+ type: components
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateComponentRequestData'
+ type: object
+ CreateComponentRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributes'
+ relationships:
+ $ref: '#/components/schemas/CreateComponentRequestDataRelationships'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ type: object
+ CreateComponentRequestDataAttributes:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesComponentsItems'
+ type: array
+ name:
+ example: ''
+ type: string
+ position:
+ example: 0
+ format: int64
+ type: integer
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ required:
+ - name
+ - position
+ - type
+ type: object
+ CreateComponentRequestDataAttributesComponentsItems:
+ properties:
+ name:
+ example: ''
+ type: string
+ position:
+ example: 0
+ format: int64
+ type: integer
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ required:
+ - name
+ - position
+ - type
+ type: object
+ CreateComponentRequestDataAttributesType:
+ enum:
+ - component
+ - group
+ example: component
+ type: string
+ x-enum-varnames:
+ - COMPONENT
+ - GROUP
+ CreateComponentRequestDataRelationships:
+ properties:
+ group:
+ $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroup'
+ type: object
+ CreateComponentRequestDataRelationshipsGroup:
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroupData'
+ required:
+ - data
+ type: object
+ CreateComponentRequestDataRelationshipsGroupData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ - id
+ type: object
CreateConnectionRequest:
example:
data:
@@ -13273,6 +13367,76 @@ components:
meta:
$ref: '#/components/schemas/DataDeletionResponseMeta'
type: object
+ CreateDegradationRequest:
+ example:
+ data:
+ attributes:
+ components_affected:
+ - id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ status: degraded
+ description: Our API is experiencing elevated latency. We are investigating
+ the issue.
+ status: investigating
+ title: Elevated API Latency
+ type: degradations
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateDegradationRequestData'
+ type: object
+ CreateDegradationRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateDegradationRequestDataAttributes'
+ type:
+ $ref: '#/components/schemas/PatchDegradationRequestDataType'
+ required:
+ - type
+ type: object
+ CreateDegradationRequestDataAttributes:
+ properties:
+ components_affected:
+ items:
+ $ref: '#/components/schemas/CreateDegradationRequestDataAttributesComponentsAffectedItems'
+ type: array
+ description:
+ type: string
+ status:
+ $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus'
+ title:
+ example: ''
+ type: string
+ required:
+ - components_affected
+ - status
+ - title
+ type: object
+ CreateDegradationRequestDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ example: ''
+ type: string
+ name:
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ required:
+ - id
+ - status
+ type: object
+ CreateDegradationRequestDataAttributesStatus:
+ enum:
+ - investigating
+ - identified
+ - monitoring
+ - resolved
+ example: investigating
+ type: string
+ x-enum-varnames:
+ - INVESTIGATING
+ - IDENTIFIED
+ - MONITORING
+ - RESOLVED
CreateDeploymentGateParams:
description: Parameters for creating a deployment gate.
properties:
@@ -13926,6 +14090,138 @@ components:
type: string
x-enum-varnames:
- CREATE_RULESET
+ CreateStatusPageRequest:
+ example:
+ data:
+ attributes:
+ company_logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM
+ components:
+ - name: API
+ position: 0
+ type: component
+ - components:
+ - name: Login
+ position: 0
+ type: component
+ - name: Settings
+ position: 1
+ type: component
+ name: Web App
+ position: 1
+ type: group
+ - name: Webhooks
+ position: 2
+ type: component
+ domain_prefix: status-page-us1
+ email_header_image: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF
+ enabled: true
+ favicon: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA
+ name: Status Page US1
+ subscriptions_enabled: true
+ type: public
+ visualization_type: bars_and_uptime_percentage
+ type: status_pages
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateStatusPageRequestData'
+ type: object
+ CreateStatusPageRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributes'
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ type: object
+ CreateStatusPageRequestDataAttributes:
+ properties:
+ company_logo:
+ type: string
+ components:
+ items:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItems'
+ type: array
+ domain_prefix:
+ example: ''
+ type: string
+ email_header_image:
+ type: string
+ enabled:
+ example: false
+ type: boolean
+ favicon:
+ type: string
+ name:
+ example: ''
+ type: string
+ subscriptions_enabled:
+ type: boolean
+ type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType'
+ visualization_type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType'
+ required:
+ - domain_prefix
+ - enabled
+ - name
+ - type
+ - visualization_type
+ type: object
+ CreateStatusPageRequestDataAttributesComponentsItems:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems'
+ type: array
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ type: object
+ CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems:
+ properties:
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ type: object
+ CreateStatusPageRequestDataAttributesType:
+ enum:
+ - public
+ - internal
+ example: public
+ type: string
+ x-enum-varnames:
+ - PUBLIC
+ - INTERNAL
+ CreateStatusPageRequestDataAttributesVisualizationType:
+ enum:
+ - bars_and_uptime_percentage
+ - bars_only
+ - component_name_only
+ example: bars_and_uptime_percentage
+ type: string
+ x-enum-varnames:
+ - BARS_AND_UPTIME_PERCENTAGE
+ - BARS_ONLY
+ - COMPONENT_NAME_ONLY
CreateTableRequest:
description: Request body for creating a new reference table from a local file
or cloud storage.
@@ -17319,6 +17615,184 @@ components:
example: 1722439510282
format: int64
type: integer
+ Degradation:
+ properties:
+ data:
+ $ref: '#/components/schemas/DegradationData'
+ included:
+ items:
+ $ref: '#/components/schemas/DegradationArrayIncluded'
+ type: array
+ type: object
+ DegradationArray:
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/DegradationData'
+ type: array
+ included:
+ items:
+ $ref: '#/components/schemas/DegradationArrayIncluded'
+ type: array
+ required:
+ - data
+ type: object
+ DegradationArrayIncluded:
+ oneOf:
+ - $ref: '#/components/schemas/StatusPagesUser'
+ - $ref: '#/components/schemas/StatusPageAsIncluded'
+ DegradationData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DegradationDataAttributes'
+ id:
+ type: string
+ relationships:
+ $ref: '#/components/schemas/DegradationDataRelationships'
+ type:
+ $ref: '#/components/schemas/PatchDegradationRequestDataType'
+ required:
+ - type
+ type: object
+ DegradationDataAttributes:
+ properties:
+ components_affected:
+ items:
+ $ref: '#/components/schemas/DegradationDataAttributesComponentsAffectedItems'
+ type: array
+ created_at:
+ format: date-time
+ type: string
+ description:
+ type: string
+ modified_at:
+ format: date-time
+ type: string
+ status:
+ $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus'
+ title:
+ type: string
+ updates:
+ items:
+ $ref: '#/components/schemas/DegradationDataAttributesUpdatesItems'
+ type: array
+ type: object
+ DegradationDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ example: ''
+ type: string
+ name:
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ required:
+ - id
+ - status
+ type: object
+ DegradationDataAttributesUpdatesItems:
+ properties:
+ components_affected:
+ items:
+ $ref: '#/components/schemas/DegradationDataAttributesUpdatesItemsComponentsAffectedItems'
+ type: array
+ created_at:
+ format: date-time
+ readOnly: true
+ type: string
+ description:
+ type: string
+ id:
+ readOnly: true
+ type: string
+ modified_at:
+ format: date-time
+ readOnly: true
+ type: string
+ started_at:
+ format: date-time
+ type: string
+ status:
+ $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus'
+ type: object
+ DegradationDataAttributesUpdatesItemsComponentsAffectedItems:
+ properties:
+ id:
+ example: ''
+ type: string
+ name:
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ required:
+ - id
+ - status
+ type: object
+ DegradationDataRelationships:
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUser'
+ last_modified_by_user:
+ $ref: '#/components/schemas/DegradationDataRelationshipsLastModifiedByUser'
+ status_page:
+ $ref: '#/components/schemas/DegradationDataRelationshipsStatusPage'
+ type: object
+ DegradationDataRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ DegradationDataRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ DegradationDataRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/DegradationDataRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ DegradationDataRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ DegradationDataRelationshipsStatusPage:
+ properties:
+ data:
+ $ref: '#/components/schemas/DegradationDataRelationshipsStatusPageData'
+ required:
+ - data
+ type: object
+ DegradationDataRelationshipsStatusPageData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ - id
+ type: object
DeleteAppResponse:
description: The response object after an app is successfully deleted.
properties:
@@ -40597,6 +41071,114 @@ components:
title:
type: string
type: object
+ PatchComponentRequest:
+ example:
+ data:
+ attributes:
+ name: Metrics Intake Service
+ position: 4
+ id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ type: components
+ properties:
+ data:
+ $ref: '#/components/schemas/PatchComponentRequestData'
+ type: object
+ PatchComponentRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/PatchComponentRequestDataAttributes'
+ id:
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ type: object
+ PatchComponentRequestDataAttributes:
+ properties:
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ type: object
+ PatchDegradationRequest:
+ example:
+ data:
+ attributes:
+ components_affected:
+ - id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ status: operational
+ description: We've deployed a fix and latency has returned to normal.
+ This issue has been resolved.
+ status: resolved
+ id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ type: degradations
+ properties:
+ data:
+ $ref: '#/components/schemas/PatchDegradationRequestData'
+ type: object
+ PatchDegradationRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/PatchDegradationRequestDataAttributes'
+ id:
+ type: string
+ type:
+ $ref: '#/components/schemas/PatchDegradationRequestDataType'
+ required:
+ - type
+ type: object
+ PatchDegradationRequestDataAttributes:
+ properties:
+ components_affected:
+ items:
+ $ref: '#/components/schemas/PatchDegradationRequestDataAttributesComponentsAffectedItems'
+ type: array
+ description:
+ type: string
+ status:
+ $ref: '#/components/schemas/PatchDegradationRequestDataAttributesStatus'
+ title:
+ $ref: '#/components/schemas/PatchDegradationRequestDataAttributesTitle'
+ type: object
+ PatchDegradationRequestDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ example: ''
+ type: string
+ name:
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ required:
+ - id
+ - status
+ type: object
+ PatchDegradationRequestDataAttributesStatus:
+ enum:
+ - investigating
+ - identified
+ - monitoring
+ - resolved
+ type: string
+ x-enum-varnames:
+ - INVESTIGATING
+ - IDENTIFIED
+ - MONITORING
+ - RESOLVED
+ PatchDegradationRequestDataAttributesTitle:
+ type: string
+ PatchDegradationRequestDataType:
+ default: degradations
+ description: Degradations resource type.
+ enum:
+ - degradations
+ example: degradations
+ type: string
+ x-enum-varnames:
+ - DEGRADATIONS
PatchIncidentNotificationTemplateRequest:
description: Update request for a notification template.
properties:
@@ -40643,6 +41225,63 @@ components:
version:
$ref: '#/components/schemas/Version'
type: object
+ PatchStatusPageRequest:
+ example:
+ data:
+ attributes:
+ company_logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM
+ domain_prefix: status-page-us1-east
+ email_header_image: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF
+ enabled: false
+ favicon: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA
+ name: Status Page US1 East
+ subscriptions_enabled: false
+ type: internal
+ visualization_type: bars_only
+ id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ type: status_pages
+ properties:
+ data:
+ $ref: '#/components/schemas/PatchStatusPageRequestData'
+ type: object
+ PatchStatusPageRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/PatchStatusPageRequestDataAttributes'
+ id:
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ type: object
+ PatchStatusPageRequestDataAttributes:
+ properties:
+ company_logo:
+ $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesCompanyLogo'
+ domain_prefix:
+ type: string
+ email_header_image:
+ $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesEmailHeaderImage'
+ enabled:
+ type: boolean
+ favicon:
+ $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesFavicon'
+ name:
+ type: string
+ subscriptions_enabled:
+ type: boolean
+ type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType'
+ visualization_type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType'
+ type: object
+ PatchStatusPageRequestDataAttributesCompanyLogo:
+ type: string
+ PatchStatusPageRequestDataAttributesEmailHeaderImage:
+ type: string
+ PatchStatusPageRequestDataAttributesFavicon:
+ type: string
PatchTableRequest:
description: Request body for updating an existing reference table.
example:
@@ -53709,6 +54348,666 @@ components:
required:
- type
type: object
+ StatusPage:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPageData'
+ included:
+ items:
+ $ref: '#/components/schemas/StatusPageArrayIncluded'
+ type: array
+ type: object
+ StatusPageArray:
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/StatusPageData'
+ type: array
+ included:
+ items:
+ $ref: '#/components/schemas/StatusPageArrayIncluded'
+ type: array
+ required:
+ - data
+ type: object
+ StatusPageArrayIncluded:
+ oneOf:
+ - $ref: '#/components/schemas/StatusPagesUser'
+ StatusPageAsIncluded:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/StatusPageAsIncludedAttributes'
+ id:
+ type: string
+ relationships:
+ $ref: '#/components/schemas/StatusPageAsIncludedRelationships'
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ type: object
+ StatusPageAsIncludedAttributes:
+ properties:
+ company_logo:
+ type: string
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPageAsIncludedAttributesComponentsItems'
+ type: array
+ created_at:
+ format: date-time
+ type: string
+ custom_domain:
+ type: string
+ custom_domain_enabled:
+ type: boolean
+ domain_prefix:
+ type: string
+ email_header_image:
+ type: string
+ enabled:
+ type: boolean
+ favicon:
+ type: string
+ modified_at:
+ format: date-time
+ type: string
+ name:
+ type: string
+ page_url:
+ type: string
+ subscriptions_enabled:
+ type: boolean
+ type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType'
+ visualization_type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType'
+ type: object
+ StatusPageAsIncludedAttributesComponentsItems:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPageAsIncludedAttributesComponentsItemsComponentsItems'
+ type: array
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ type: object
+ StatusPageAsIncludedAttributesComponentsItemsComponentsItems:
+ properties:
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ type: object
+ StatusPageAsIncludedRelationships:
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUser'
+ last_modified_by_user:
+ $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsLastModifiedByUser'
+ type: object
+ StatusPageAsIncludedRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ StatusPageAsIncludedRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPageAsIncludedRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ StatusPageAsIncludedRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPageData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/StatusPageDataAttributes'
+ id:
+ type: string
+ relationships:
+ $ref: '#/components/schemas/StatusPageDataRelationships'
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ type: object
+ StatusPageDataAttributes:
+ properties:
+ company_logo:
+ type: string
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPageDataAttributesComponentsItems'
+ type: array
+ created_at:
+ format: date-time
+ type: string
+ custom_domain:
+ type: string
+ custom_domain_enabled:
+ type: boolean
+ domain_prefix:
+ type: string
+ email_header_image:
+ type: string
+ enabled:
+ type: boolean
+ favicon:
+ type: string
+ modified_at:
+ format: date-time
+ type: string
+ name:
+ type: string
+ page_url:
+ type: string
+ subscriptions_enabled:
+ type: boolean
+ type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType'
+ visualization_type:
+ $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType'
+ type: object
+ StatusPageDataAttributesComponentsItems:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPageDataAttributesComponentsItemsComponentsItems'
+ type: array
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ type: object
+ StatusPageDataAttributesComponentsItemsComponentsItems:
+ properties:
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ type: object
+ StatusPageDataRelationships:
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUser'
+ last_modified_by_user:
+ $ref: '#/components/schemas/StatusPageDataRelationshipsLastModifiedByUser'
+ type: object
+ StatusPageDataRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ StatusPageDataRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPageDataRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPageDataRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ StatusPageDataRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPageDataType:
+ default: status_pages
+ description: Status pages resource type.
+ enum:
+ - status_pages
+ example: status_pages
+ type: string
+ x-enum-varnames:
+ - STATUS_PAGES
+ StatusPagesComponent:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentData'
+ included:
+ items:
+ $ref: '#/components/schemas/StatusPagesComponentArrayIncluded'
+ type: array
+ type: object
+ StatusPagesComponentArray:
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/StatusPagesComponentData'
+ type: array
+ included:
+ items:
+ $ref: '#/components/schemas/StatusPagesComponentArrayIncluded'
+ type: array
+ required:
+ - data
+ type: object
+ StatusPagesComponentArrayIncluded:
+ oneOf:
+ - $ref: '#/components/schemas/StatusPagesUser'
+ - $ref: '#/components/schemas/StatusPageAsIncluded'
+ - $ref: '#/components/schemas/StatusPagesComponentGroup'
+ StatusPagesComponentData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributes'
+ id:
+ type: string
+ relationships:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationships'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ type: object
+ StatusPagesComponentDataAttributes:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesComponentsItems'
+ type: array
+ created_at:
+ format: date-time
+ type: string
+ modified_at:
+ format: date-time
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ required:
+ - type
+ type: object
+ StatusPagesComponentDataAttributesComponentsItems:
+ properties:
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ type: object
+ StatusPagesComponentDataAttributesStatus:
+ enum:
+ - operational
+ - degraded
+ - partial_outage
+ - major_outage
+ example: operational
+ type: string
+ x-enum-varnames:
+ - OPERATIONAL
+ - DEGRADED
+ - PARTIAL_OUTAGE
+ - MAJOR_OUTAGE
+ StatusPagesComponentDataRelationships:
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUser'
+ group:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroup'
+ last_modified_by_user:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsLastModifiedByUser'
+ status_page:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsStatusPage'
+ type: object
+ StatusPagesComponentDataRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentDataRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentDataRelationshipsGroup:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroupData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentDataRelationshipsGroupData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentDataRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentDataRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentDataRelationshipsStatusPage:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsStatusPageData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentDataRelationshipsStatusPageData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentGroup:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributes'
+ id:
+ type: string
+ relationships:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationships'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ type: object
+ StatusPagesComponentGroupAttributes:
+ properties:
+ components:
+ items:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItems'
+ type: array
+ created_at:
+ format: date-time
+ type: string
+ modified_at:
+ format: date-time
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus'
+ type:
+ $ref: '#/components/schemas/CreateComponentRequestDataAttributesType'
+ required:
+ - type
+ type: object
+ StatusPagesComponentGroupAttributesComponentsItems:
+ properties:
+ id:
+ readOnly: true
+ type: string
+ name:
+ type: string
+ position:
+ format: int64
+ type: integer
+ status:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus'
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType'
+ type: object
+ StatusPagesComponentGroupAttributesComponentsItemsStatus:
+ enum:
+ - operational
+ - degraded
+ - partial_outage
+ - major_outage
+ readOnly: true
+ type: string
+ x-enum-varnames:
+ - OPERATIONAL
+ - DEGRADED
+ - PARTIAL_OUTAGE
+ - MAJOR_OUTAGE
+ StatusPagesComponentGroupAttributesComponentsItemsType:
+ enum:
+ - component
+ example: component
+ type: string
+ x-enum-varnames:
+ - COMPONENT
+ StatusPagesComponentGroupRelationships:
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsCreatedByUser'
+ group:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsGroup'
+ last_modified_by_user:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsLastModifiedByUser'
+ status_page:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsStatusPage'
+ type: object
+ StatusPagesComponentGroupRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentGroupRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentGroupRelationshipsGroup:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsGroupData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentGroupRelationshipsGroupData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesComponentGroupType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentGroupRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentGroupRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentGroupRelationshipsStatusPage:
+ properties:
+ data:
+ $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsStatusPageData'
+ required:
+ - data
+ type: object
+ StatusPagesComponentGroupRelationshipsStatusPageData:
+ properties:
+ id:
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ - id
+ type: object
+ StatusPagesComponentGroupType:
+ default: components
+ description: Components resource type.
+ enum:
+ - components
+ example: components
+ type: string
+ x-enum-varnames:
+ - COMPONENTS
+ StatusPagesUser:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/StatusPagesUserAttributes'
+ id:
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ type: object
+ StatusPagesUserAttributes:
+ properties:
+ email:
+ type: string
+ handle:
+ type: string
+ icon:
+ type: string
+ name:
+ type: string
+ uuid:
+ type: string
+ type: object
+ StatusPagesUserType:
+ default: users
+ description: Users resource type.
+ enum:
+ - users
+ example: users
+ type: string
+ x-enum-varnames:
+ - USERS
Step:
description: A Step is a sub-component of a workflow. Each Step performs an
action.
@@ -86683,6 +87982,650 @@ paths:
tags:
- Security Monitoring
x-unstable: '**Note**: This endpoint may be subject to changes.'
+ /api/v2/statuspages:
+ get:
+ description: Lists all status pages for the organization.
+ operationId: ListStatusPages
+ parameters:
+ - description: Offset to use as the start of the page.
+ in: query
+ name: page[offset]
+ schema:
+ default: 0
+ type: integer
+ - description: The number of status pages to return per page.
+ in: query
+ name: page[limit]
+ schema:
+ default: 50
+ type: integer
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPageArray'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List status pages
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ post:
+ description: Creates a new status page.
+ operationId: CreateStatusPage
+ parameters:
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateStatusPageRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPage'
+ description: Created
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create status page
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ /api/v2/statuspages/degradations:
+ get:
+ description: Lists all degradations for the organization. Optionally filter
+ by status and page.
+ operationId: ListDegradations
+ parameters:
+ - description: Optional page id filter.
+ in: query
+ name: filter[page_id]
+ schema:
+ type: string
+ - description: Offset to use as the start of the page.
+ in: query
+ name: page[offset]
+ schema:
+ default: 0
+ type: integer
+ - description: The number of degradations to return per page.
+ in: query
+ name: page[limit]
+ schema:
+ default: 50
+ type: integer
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ - description: 'Optional degradation status filter. Supported values: investigating,
+ identified, monitoring, resolved.'
+ in: query
+ name: filter[status]
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DegradationArray'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List degradations
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ /api/v2/statuspages/{page_id}:
+ delete:
+ description: Deletes a status page by its ID.
+ operationId: DeleteStatusPage
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Delete status page
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ get:
+ description: Retrieves a specific status page by its ID.
+ operationId: GetStatusPage
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPage'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get status page
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ patch:
+ description: Updates an existing status page's attributes.
+ operationId: UpdateStatusPage
+ parameters:
+ - description: Whether to delete existing subscribers when updating a status
+ page's type.
+ in: query
+ name: delete_subscribers
+ schema:
+ default: false
+ type: boolean
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchStatusPageRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPage'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Update status page
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ /api/v2/statuspages/{page_id}/components:
+ get:
+ description: Lists all components for a status page.
+ operationId: ListComponents
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page, group.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPagesComponentArray'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List components
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ post:
+ description: Creates a new component.
+ operationId: CreateComponent
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page, group.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateComponentRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPagesComponent'
+ description: Created
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create component
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ /api/v2/statuspages/{page_id}/components/{component_id}:
+ delete:
+ description: Deletes a component by its ID.
+ operationId: DeleteComponent
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the component.
+ in: path
+ name: component_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Delete component
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ get:
+ description: Retrieves a specific component by its ID.
+ operationId: GetComponent
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the component.
+ in: path
+ name: component_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page, group.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPagesComponent'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get component
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ patch:
+ description: Updates an existing component's attributes.
+ operationId: UpdateComponent
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the component.
+ in: path
+ name: component_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page, group.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchComponentRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/StatusPagesComponent'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Update component
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_write
+ /api/v2/statuspages/{page_id}/degradations:
+ post:
+ description: Creates a new degradation.
+ operationId: CreateDegradation
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: Whether to notify page subscribers of the degradation or maintenance.
+ in: query
+ name: notify_subscribers
+ schema:
+ default: true
+ type: boolean
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDegradationRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Degradation'
+ description: Created
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create degradation
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_incident_write
+ /api/v2/statuspages/{page_id}/degradations/{degradation_id}:
+ delete:
+ description: Deletes a degradation by its ID.
+ operationId: DeleteDegradation
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the degradation.
+ in: path
+ name: degradation_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Delete degradation
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_incident_write
+ get:
+ description: Retrieves a specific degradation by its ID.
+ operationId: GetDegradation
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the degradation.
+ in: path
+ name: degradation_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Degradation'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get degradation
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ patch:
+ description: Updates an existing degradation's attributes.
+ operationId: UpdateDegradation
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: Whether to notify page subscribers of the degradation or maintenance.
+ in: query
+ name: notify_subscribers
+ schema:
+ default: true
+ type: boolean
+ - description: The ID of the degradation.
+ in: path
+ name: degradation_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchDegradationRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Degradation'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Update degradation
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_incident_write
/api/v2/synthetics/settings/on_demand_concurrency_cap:
get:
description: Get the on-demand concurrency cap.
@@ -90955,6 +92898,8 @@ tags:
name: Spans Metrics
- description: API for static analysis
name: Static Analysis
+- description: Auto-generated tag Status Pages
+ name: Status Pages
- description: "Datadog Synthetics uses simulated user requests and browser rendering
to help you ensure uptime,\nidentify regional issues, and track your application
performance. Datadog Synthetics tests come in\ntwo different flavors, [API tests](https://docs.datadoghq.com/synthetics/api_tests/)\nand
diff --git a/examples/v2/status-pages/CreateComponent.java b/examples/v2/status-pages/CreateComponent.java
new file mode 100644
index 00000000000..8004d3f4df6
--- /dev/null
+++ b/examples/v2/status-pages/CreateComponent.java
@@ -0,0 +1,43 @@
+// Create component returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.CreateComponentRequest;
+import com.datadog.api.client.v2.model.CreateComponentRequestData;
+import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributesType;
+import com.datadog.api.client.v2.model.StatusPagesComponent;
+import com.datadog.api.client.v2.model.StatusPagesComponentGroupType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ CreateComponentRequest body =
+ new CreateComponentRequest()
+ .data(
+ new CreateComponentRequestData()
+ .attributes(
+ new CreateComponentRequestDataAttributes()
+ .name("5e2fd69be33e79aa")
+ .position(0L)
+ .type(CreateComponentRequestDataAttributesType.COMPONENT))
+ .type(StatusPagesComponentGroupType.COMPONENTS));
+
+ try {
+ StatusPagesComponent result = apiInstance.createComponent(STATUS_PAGE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#createComponent");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/CreateDegradation.java b/examples/v2/status-pages/CreateDegradation.java
new file mode 100644
index 00000000000..eb97de1a4a0
--- /dev/null
+++ b/examples/v2/status-pages/CreateDegradation.java
@@ -0,0 +1,54 @@
+// Create degradation returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.CreateDegradationRequest;
+import com.datadog.api.client.v2.model.CreateDegradationRequestData;
+import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesComponentsAffectedItems;
+import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesStatus;
+import com.datadog.api.client.v2.model.Degradation;
+import com.datadog.api.client.v2.model.PatchDegradationRequestDataType;
+import com.datadog.api.client.v2.model.StatusPagesComponentDataAttributesStatus;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
+ System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID");
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ CreateDegradationRequest body =
+ new CreateDegradationRequest()
+ .data(
+ new CreateDegradationRequestData()
+ .attributes(
+ new CreateDegradationRequestDataAttributes()
+ .componentsAffected(
+ Collections.singletonList(
+ new CreateDegradationRequestDataAttributesComponentsAffectedItems()
+ .id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID)
+ .status(
+ StatusPagesComponentDataAttributesStatus.MAJOR_OUTAGE)))
+ .description("5e2fd69be33e79aa")
+ .status(CreateDegradationRequestDataAttributesStatus.INVESTIGATING)
+ .title("5e2fd69be33e79aa"))
+ .type(PatchDegradationRequestDataType.DEGRADATIONS));
+
+ try {
+ Degradation result = apiInstance.createDegradation(STATUS_PAGE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#createDegradation");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/CreateStatusPage.java b/examples/v2/status-pages/CreateStatusPage.java
new file mode 100644
index 00000000000..2d92e34bf44
--- /dev/null
+++ b/examples/v2/status-pages/CreateStatusPage.java
@@ -0,0 +1,45 @@
+// Create status page returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.CreateStatusPageRequest;
+import com.datadog.api.client.v2.model.CreateStatusPageRequestData;
+import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesType;
+import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesVisualizationType;
+import com.datadog.api.client.v2.model.StatusPage;
+import com.datadog.api.client.v2.model.StatusPageDataType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ CreateStatusPageRequest body =
+ new CreateStatusPageRequest()
+ .data(
+ new CreateStatusPageRequestData()
+ .attributes(
+ new CreateStatusPageRequestDataAttributes()
+ .name("[DD Integration Tests] 5e2fd69be33e79aa")
+ .domainPrefix("dd-integrations-tests-5e2fd69be33e79aa")
+ .enabled(true)
+ .type(CreateStatusPageRequestDataAttributesType.INTERNAL)
+ .visualizationType(
+ CreateStatusPageRequestDataAttributesVisualizationType
+ .BARS_AND_UPTIME_PERCENTAGE))
+ .type(StatusPageDataType.STATUS_PAGES));
+
+ try {
+ StatusPage result = apiInstance.createStatusPage(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#createStatusPage");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/DeleteComponent.java b/examples/v2/status-pages/DeleteComponent.java
new file mode 100644
index 00000000000..853b8893a2c
--- /dev/null
+++ b/examples/v2/status-pages/DeleteComponent.java
@@ -0,0 +1,27 @@
+// Delete component returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
+ System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID");
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ try {
+ apiInstance.deleteComponent(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#deleteComponent");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/DeleteDegradation.java b/examples/v2/status-pages/DeleteDegradation.java
new file mode 100644
index 00000000000..218be955c0f
--- /dev/null
+++ b/examples/v2/status-pages/DeleteDegradation.java
@@ -0,0 +1,28 @@
+// Delete degradation returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ // there is a valid "degradation" in the system
+ String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID");
+
+ try {
+ apiInstance.deleteDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#deleteDegradation");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/DeleteStatusPage.java b/examples/v2/status-pages/DeleteStatusPage.java
new file mode 100644
index 00000000000..64fc1ba1795
--- /dev/null
+++ b/examples/v2/status-pages/DeleteStatusPage.java
@@ -0,0 +1,25 @@
+// Delete status page returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ try {
+ apiInstance.deleteStatusPage(STATUS_PAGE_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#deleteStatusPage");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/GetComponent.java b/examples/v2/status-pages/GetComponent.java
new file mode 100644
index 00000000000..3fc37cdac99
--- /dev/null
+++ b/examples/v2/status-pages/GetComponent.java
@@ -0,0 +1,31 @@
+// Get component returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.StatusPagesComponent;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
+ System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID");
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ try {
+ StatusPagesComponent result =
+ apiInstance.getComponent(
+ STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#getComponent");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/GetDegradation.java b/examples/v2/status-pages/GetDegradation.java
new file mode 100644
index 00000000000..1c3e0d3358d
--- /dev/null
+++ b/examples/v2/status-pages/GetDegradation.java
@@ -0,0 +1,30 @@
+// Get degradation returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.Degradation;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ // there is a valid "degradation" in the system
+ String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID");
+
+ try {
+ Degradation result = apiInstance.getDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#getDegradation");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/GetStatusPage.java b/examples/v2/status-pages/GetStatusPage.java
new file mode 100644
index 00000000000..1020195792b
--- /dev/null
+++ b/examples/v2/status-pages/GetStatusPage.java
@@ -0,0 +1,27 @@
+// Get status page returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.StatusPage;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ try {
+ StatusPage result = apiInstance.getStatusPage(STATUS_PAGE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#getStatusPage");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/ListComponents.java b/examples/v2/status-pages/ListComponents.java
new file mode 100644
index 00000000000..7571b6d107a
--- /dev/null
+++ b/examples/v2/status-pages/ListComponents.java
@@ -0,0 +1,27 @@
+// List components returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.StatusPagesComponentArray;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ try {
+ StatusPagesComponentArray result = apiInstance.listComponents(STATUS_PAGE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#listComponents");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/ListDegradations.java b/examples/v2/status-pages/ListDegradations.java
new file mode 100644
index 00000000000..259bc3b6739
--- /dev/null
+++ b/examples/v2/status-pages/ListDegradations.java
@@ -0,0 +1,24 @@
+// List degradations returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.DegradationArray;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ try {
+ DegradationArray result = apiInstance.listDegradations();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#listDegradations");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/ListStatusPages.java b/examples/v2/status-pages/ListStatusPages.java
new file mode 100644
index 00000000000..f4081f8d476
--- /dev/null
+++ b/examples/v2/status-pages/ListStatusPages.java
@@ -0,0 +1,24 @@
+// List status pages returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.StatusPageArray;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ try {
+ StatusPageArray result = apiInstance.listStatusPages();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#listStatusPages");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/UpdateComponent.java b/examples/v2/status-pages/UpdateComponent.java
new file mode 100644
index 00000000000..6aebba1d299
--- /dev/null
+++ b/examples/v2/status-pages/UpdateComponent.java
@@ -0,0 +1,43 @@
+// Update component returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.PatchComponentRequest;
+import com.datadog.api.client.v2.model.PatchComponentRequestData;
+import com.datadog.api.client.v2.model.PatchComponentRequestDataAttributes;
+import com.datadog.api.client.v2.model.StatusPagesComponent;
+import com.datadog.api.client.v2.model.StatusPagesComponentGroupType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
+ System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID");
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ PatchComponentRequest body =
+ new PatchComponentRequest()
+ .data(
+ new PatchComponentRequestData()
+ .attributes(new PatchComponentRequestDataAttributes().name("5e2fd69be33e79aa"))
+ .id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID)
+ .type(StatusPagesComponentGroupType.COMPONENTS));
+
+ try {
+ StatusPagesComponent result =
+ apiInstance.updateComponent(
+ STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#updateComponent");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/UpdateDegradation.java b/examples/v2/status-pages/UpdateDegradation.java
new file mode 100644
index 00000000000..e56a5cd0b7f
--- /dev/null
+++ b/examples/v2/status-pages/UpdateDegradation.java
@@ -0,0 +1,44 @@
+// Update degradation returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.Degradation;
+import com.datadog.api.client.v2.model.PatchDegradationRequest;
+import com.datadog.api.client.v2.model.PatchDegradationRequestData;
+import com.datadog.api.client.v2.model.PatchDegradationRequestDataAttributes;
+import com.datadog.api.client.v2.model.PatchDegradationRequestDataType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ // there is a valid "degradation" in the system
+ String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID");
+
+ PatchDegradationRequest body =
+ new PatchDegradationRequest()
+ .data(
+ new PatchDegradationRequestData()
+ .attributes(
+ new PatchDegradationRequestDataAttributes().title("5e2fd69be33e79aa"))
+ .id(DEGRADATION_DATA_ID)
+ .type(PatchDegradationRequestDataType.DEGRADATIONS));
+
+ try {
+ Degradation result =
+ apiInstance.updateDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#updateDegradation");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/status-pages/UpdateStatusPage.java b/examples/v2/status-pages/UpdateStatusPage.java
new file mode 100644
index 00000000000..ec80f05d89c
--- /dev/null
+++ b/examples/v2/status-pages/UpdateStatusPage.java
@@ -0,0 +1,41 @@
+// Update status page returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.PatchStatusPageRequest;
+import com.datadog.api.client.v2.model.PatchStatusPageRequestData;
+import com.datadog.api.client.v2.model.PatchStatusPageRequestDataAttributes;
+import com.datadog.api.client.v2.model.StatusPage;
+import com.datadog.api.client.v2.model.StatusPageDataType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID");
+
+ PatchStatusPageRequest body =
+ new PatchStatusPageRequest()
+ .data(
+ new PatchStatusPageRequestData()
+ .attributes(
+ new PatchStatusPageRequestDataAttributes()
+ .name("[DD Integration Tests] 5e2fd69be33e79aa"))
+ .id(STATUS_PAGE_DATA_ID)
+ .type(StatusPageDataType.STATUS_PAGES));
+
+ try {
+ StatusPage result = apiInstance.updateStatusPage(STATUS_PAGE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#updateStatusPage");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java
new file mode 100644
index 00000000000..734446cf34d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java
@@ -0,0 +1,3183 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.CreateComponentRequest;
+import com.datadog.api.client.v2.model.CreateDegradationRequest;
+import com.datadog.api.client.v2.model.CreateStatusPageRequest;
+import com.datadog.api.client.v2.model.Degradation;
+import com.datadog.api.client.v2.model.DegradationArray;
+import com.datadog.api.client.v2.model.PatchComponentRequest;
+import com.datadog.api.client.v2.model.PatchDegradationRequest;
+import com.datadog.api.client.v2.model.PatchStatusPageRequest;
+import com.datadog.api.client.v2.model.StatusPage;
+import com.datadog.api.client.v2.model.StatusPageArray;
+import com.datadog.api.client.v2.model.StatusPagesComponent;
+import com.datadog.api.client.v2.model.StatusPagesComponentArray;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class StatusPagesApi {
+ private ApiClient apiClient;
+
+ public StatusPagesApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public StatusPagesApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /** Manage optional parameters to createComponent. */
+ public static class CreateComponentOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page, group. (optional)
+ * @return CreateComponentOptionalParameters
+ */
+ public CreateComponentOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Create component.
+ *
+ *
See {@link #createComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return StatusPagesComponent
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponent createComponent(UUID pageId, CreateComponentRequest body)
+ throws ApiException {
+ return createComponentWithHttpInfo(pageId, body, new CreateComponentOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Create component.
+ *
+ *
See {@link #createComponentWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return CompletableFuture<StatusPagesComponent>
+ */
+ public CompletableFuture createComponentAsync(
+ UUID pageId, CreateComponentRequest body) {
+ return createComponentWithHttpInfoAsync(pageId, body, new CreateComponentOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create component.
+ *
+ * See {@link #createComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPagesComponent
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponent createComponent(
+ UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters)
+ throws ApiException {
+ return createComponentWithHttpInfo(pageId, body, parameters).getData();
+ }
+
+ /**
+ * Create component.
+ *
+ *
See {@link #createComponentWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPagesComponent>
+ */
+ public CompletableFuture createComponentAsync(
+ UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters) {
+ return createComponentWithHttpInfoAsync(pageId, body, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates a new component.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPagesComponent>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createComponentWithHttpInfo(
+ UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createComponent");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createComponent");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createComponent",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create component.
+ *
+ * See {@link #createComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPagesComponent>>
+ */
+ public CompletableFuture> createComponentWithHttpInfoAsync(
+ UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createComponent"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createComponent"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createComponent",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to createDegradation. */
+ public static class CreateDegradationOptionalParameters {
+ private Boolean notifySubscribers;
+ private String include;
+
+ /**
+ * Set notifySubscribers.
+ *
+ * @param notifySubscribers Whether to notify page subscribers of the degradation or
+ * maintenance. (optional, default to true)
+ * @return CreateDegradationOptionalParameters
+ */
+ public CreateDegradationOptionalParameters notifySubscribers(Boolean notifySubscribers) {
+ this.notifySubscribers = notifySubscribers;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return CreateDegradationOptionalParameters
+ */
+ public CreateDegradationOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Create degradation.
+ *
+ * See {@link #createDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return Degradation
+ * @throws ApiException if fails to make API call
+ */
+ public Degradation createDegradation(UUID pageId, CreateDegradationRequest body)
+ throws ApiException {
+ return createDegradationWithHttpInfo(pageId, body, new CreateDegradationOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Create degradation.
+ *
+ *
See {@link #createDegradationWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return CompletableFuture<Degradation>
+ */
+ public CompletableFuture createDegradationAsync(
+ UUID pageId, CreateDegradationRequest body) {
+ return createDegradationWithHttpInfoAsync(
+ pageId, body, new CreateDegradationOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create degradation.
+ *
+ * See {@link #createDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return Degradation
+ * @throws ApiException if fails to make API call
+ */
+ public Degradation createDegradation(
+ UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters)
+ throws ApiException {
+ return createDegradationWithHttpInfo(pageId, body, parameters).getData();
+ }
+
+ /**
+ * Create degradation.
+ *
+ *
See {@link #createDegradationWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<Degradation>
+ */
+ public CompletableFuture createDegradationAsync(
+ UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters) {
+ return createDegradationWithHttpInfoAsync(pageId, body, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates a new degradation.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<Degradation>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createDegradationWithHttpInfo(
+ UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createDegradation");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDegradation");
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createDegradation",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create degradation.
+ *
+ * See {@link #createDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<Degradation>>
+ */
+ public CompletableFuture> createDegradationWithHttpInfoAsync(
+ UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createDegradation"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDegradation"));
+ return result;
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createDegradation",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to createStatusPage. */
+ public static class CreateStatusPageOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user. (optional)
+ * @return CreateStatusPageOptionalParameters
+ */
+ public CreateStatusPageOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Create status page.
+ *
+ * See {@link #createStatusPageWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage createStatusPage(CreateStatusPageRequest body) throws ApiException {
+ return createStatusPageWithHttpInfo(body, new CreateStatusPageOptionalParameters()).getData();
+ }
+
+ /**
+ * Create status page.
+ *
+ *
See {@link #createStatusPageWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture createStatusPageAsync(CreateStatusPageRequest body) {
+ return createStatusPageWithHttpInfoAsync(body, new CreateStatusPageOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create status page.
+ *
+ * See {@link #createStatusPageWithHttpInfo}.
+ *
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage createStatusPage(
+ CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters)
+ throws ApiException {
+ return createStatusPageWithHttpInfo(body, parameters).getData();
+ }
+
+ /**
+ * Create status page.
+ *
+ *
See {@link #createStatusPageWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture createStatusPageAsync(
+ CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) {
+ return createStatusPageWithHttpInfoAsync(body, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates a new status page.
+ *
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPage>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createStatusPageWithHttpInfo(
+ CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createStatusPage");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create status page.
+ *
+ * See {@link #createStatusPageWithHttpInfo}.
+ *
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPage>>
+ */
+ public CompletableFuture> createStatusPageWithHttpInfoAsync(
+ CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createStatusPage"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete component.
+ *
+ * See {@link #deleteComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteComponent(UUID pageId, UUID componentId) throws ApiException {
+ deleteComponentWithHttpInfo(pageId, componentId);
+ }
+
+ /**
+ * Delete component.
+ *
+ *
See {@link #deleteComponentWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteComponentAsync(UUID pageId, UUID componentId) {
+ return deleteComponentWithHttpInfoAsync(pageId, componentId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Deletes a component by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteComponentWithHttpInfo(UUID pageId, UUID componentId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteComponent");
+ }
+
+ // verify the required parameter 'componentId' is set
+ if (componentId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'componentId' when calling deleteComponent");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components/{component_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteComponent",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete component.
+ *
+ * See {@link #deleteComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteComponentWithHttpInfoAsync(
+ UUID pageId, UUID componentId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteComponent"));
+ return result;
+ }
+
+ // verify the required parameter 'componentId' is set
+ if (componentId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'componentId' when calling deleteComponent"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components/{component_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteComponent",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete degradation.
+ *
+ * See {@link #deleteDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteDegradation(UUID pageId, UUID degradationId) throws ApiException {
+ deleteDegradationWithHttpInfo(pageId, degradationId);
+ }
+
+ /**
+ * Delete degradation.
+ *
+ *
See {@link #deleteDegradationWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteDegradationAsync(UUID pageId, UUID degradationId) {
+ return deleteDegradationWithHttpInfoAsync(pageId, degradationId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Deletes a degradation by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteDegradationWithHttpInfo(UUID pageId, UUID degradationId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteDegradation");
+ }
+
+ // verify the required parameter 'degradationId' is set
+ if (degradationId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'degradationId' when calling deleteDegradation");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations/{degradation_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteDegradation",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete degradation.
+ *
+ * See {@link #deleteDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteDegradationWithHttpInfoAsync(
+ UUID pageId, UUID degradationId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteDegradation"));
+ return result;
+ }
+
+ // verify the required parameter 'degradationId' is set
+ if (degradationId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'degradationId' when calling deleteDegradation"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations/{degradation_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteDegradation",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete status page.
+ *
+ * See {@link #deleteStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteStatusPage(UUID pageId) throws ApiException {
+ deleteStatusPageWithHttpInfo(pageId);
+ }
+
+ /**
+ * Delete status page.
+ *
+ *
See {@link #deleteStatusPageWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteStatusPageAsync(UUID pageId) {
+ return deleteStatusPageWithHttpInfoAsync(pageId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Deletes a status page by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteStatusPageWithHttpInfo(UUID pageId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteStatusPage");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteStatusPage",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete status page.
+ *
+ * See {@link #deleteStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteStatusPageWithHttpInfoAsync(UUID pageId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling deleteStatusPage"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.deleteStatusPage",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /** Manage optional parameters to getComponent. */
+ public static class GetComponentOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page, group. (optional)
+ * @return GetComponentOptionalParameters
+ */
+ public GetComponentOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Get component.
+ *
+ * See {@link #getComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @return StatusPagesComponent
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponent getComponent(UUID pageId, UUID componentId) throws ApiException {
+ return getComponentWithHttpInfo(pageId, componentId, new GetComponentOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Get component.
+ *
+ *
See {@link #getComponentWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @return CompletableFuture<StatusPagesComponent>
+ */
+ public CompletableFuture getComponentAsync(UUID pageId, UUID componentId) {
+ return getComponentWithHttpInfoAsync(pageId, componentId, new GetComponentOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get component.
+ *
+ * See {@link #getComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPagesComponent
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponent getComponent(
+ UUID pageId, UUID componentId, GetComponentOptionalParameters parameters)
+ throws ApiException {
+ return getComponentWithHttpInfo(pageId, componentId, parameters).getData();
+ }
+
+ /**
+ * Get component.
+ *
+ *
See {@link #getComponentWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPagesComponent>
+ */
+ public CompletableFuture getComponentAsync(
+ UUID pageId, UUID componentId, GetComponentOptionalParameters parameters) {
+ return getComponentWithHttpInfoAsync(pageId, componentId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieves a specific component by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPagesComponent>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getComponentWithHttpInfo(
+ UUID pageId, UUID componentId, GetComponentOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getComponent");
+ }
+
+ // verify the required parameter 'componentId' is set
+ if (componentId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'componentId' when calling getComponent");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components/{component_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getComponent",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get component.
+ *
+ * See {@link #getComponentWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param componentId The ID of the component. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPagesComponent>>
+ */
+ public CompletableFuture> getComponentWithHttpInfoAsync(
+ UUID pageId, UUID componentId, GetComponentOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getComponent"));
+ return result;
+ }
+
+ // verify the required parameter 'componentId' is set
+ if (componentId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'componentId' when calling getComponent"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components/{component_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getComponent",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to getDegradation. */
+ public static class GetDegradationOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return GetDegradationOptionalParameters
+ */
+ public GetDegradationOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Get degradation.
+ *
+ * See {@link #getDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @return Degradation
+ * @throws ApiException if fails to make API call
+ */
+ public Degradation getDegradation(UUID pageId, UUID degradationId) throws ApiException {
+ return getDegradationWithHttpInfo(pageId, degradationId, new GetDegradationOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Get degradation.
+ *
+ *
See {@link #getDegradationWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @return CompletableFuture<Degradation>
+ */
+ public CompletableFuture getDegradationAsync(UUID pageId, UUID degradationId) {
+ return getDegradationWithHttpInfoAsync(
+ pageId, degradationId, new GetDegradationOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get degradation.
+ *
+ * See {@link #getDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @param parameters Optional parameters for the request.
+ * @return Degradation
+ * @throws ApiException if fails to make API call
+ */
+ public Degradation getDegradation(
+ UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters)
+ throws ApiException {
+ return getDegradationWithHttpInfo(pageId, degradationId, parameters).getData();
+ }
+
+ /**
+ * Get degradation.
+ *
+ *
See {@link #getDegradationWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<Degradation>
+ */
+ public CompletableFuture getDegradationAsync(
+ UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters) {
+ return getDegradationWithHttpInfoAsync(pageId, degradationId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieves a specific degradation by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<Degradation>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getDegradationWithHttpInfo(
+ UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getDegradation");
+ }
+
+ // verify the required parameter 'degradationId' is set
+ if (degradationId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'degradationId' when calling getDegradation");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations/{degradation_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getDegradation",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get degradation.
+ *
+ * See {@link #getDegradationWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param degradationId The ID of the degradation. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<Degradation>>
+ */
+ public CompletableFuture> getDegradationWithHttpInfoAsync(
+ UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getDegradation"));
+ return result;
+ }
+
+ // verify the required parameter 'degradationId' is set
+ if (degradationId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'degradationId' when calling getDegradation"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/degradations/{degradation_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getDegradation",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to getStatusPage. */
+ public static class GetStatusPageOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user. (optional)
+ * @return GetStatusPageOptionalParameters
+ */
+ public GetStatusPageOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Get status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage getStatusPage(UUID pageId) throws ApiException {
+ return getStatusPageWithHttpInfo(pageId, new GetStatusPageOptionalParameters()).getData();
+ }
+
+ /**
+ * Get status page.
+ *
+ *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture getStatusPageAsync(UUID pageId) {
+ return getStatusPageWithHttpInfoAsync(pageId, new GetStatusPageOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage getStatusPage(UUID pageId, GetStatusPageOptionalParameters parameters)
+ throws ApiException {
+ return getStatusPageWithHttpInfo(pageId, parameters).getData();
+ }
+
+ /**
+ * Get status page.
+ *
+ *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture getStatusPageAsync(
+ UUID pageId, GetStatusPageOptionalParameters parameters) {
+ return getStatusPageWithHttpInfoAsync(pageId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieves a specific status page by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPage>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getStatusPageWithHttpInfo(
+ UUID pageId, GetStatusPageOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getStatusPage");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPage>>
+ */
+ public CompletableFuture> getStatusPageWithHttpInfoAsync(
+ UUID pageId, GetStatusPageOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getStatusPage"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listComponents. */
+ public static class ListComponentsOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page, group. (optional)
+ * @return ListComponentsOptionalParameters
+ */
+ public ListComponentsOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * List components.
+ *
+ * See {@link #listComponentsWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return StatusPagesComponentArray
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponentArray listComponents(UUID pageId) throws ApiException {
+ return listComponentsWithHttpInfo(pageId, new ListComponentsOptionalParameters()).getData();
+ }
+
+ /**
+ * List components.
+ *
+ *
See {@link #listComponentsWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return CompletableFuture<StatusPagesComponentArray>
+ */
+ public CompletableFuture listComponentsAsync(UUID pageId) {
+ return listComponentsWithHttpInfoAsync(pageId, new ListComponentsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List components.
+ *
+ * See {@link #listComponentsWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPagesComponentArray
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPagesComponentArray listComponents(
+ UUID pageId, ListComponentsOptionalParameters parameters) throws ApiException {
+ return listComponentsWithHttpInfo(pageId, parameters).getData();
+ }
+
+ /**
+ * List components.
+ *
+ *
See {@link #listComponentsWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPagesComponentArray>
+ */
+ public CompletableFuture listComponentsAsync(
+ UUID pageId, ListComponentsOptionalParameters parameters) {
+ return listComponentsWithHttpInfoAsync(pageId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists all components for a status page.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPagesComponentArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listComponentsWithHttpInfo(
+ UUID pageId, ListComponentsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling listComponents");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listComponents",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List components.
+ *
+ * See {@link #listComponentsWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPagesComponentArray>>
+ */
+ public CompletableFuture> listComponentsWithHttpInfoAsync(
+ UUID pageId, ListComponentsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling listComponents"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/components"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listComponents",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listDegradations. */
+ public static class ListDegradationsOptionalParameters {
+ private String filterPageId;
+ private Integer pageOffset;
+ private Integer pageLimit;
+ private String include;
+ private String filterStatus;
+
+ /**
+ * Set filterPageId.
+ *
+ * @param filterPageId Optional page id filter. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters filterPageId(String filterPageId) {
+ this.filterPageId = filterPageId;
+ return this;
+ }
+
+ /**
+ * Set pageOffset.
+ *
+ * @param pageOffset Offset to use as the start of the page. (optional, default to 0)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) {
+ this.pageOffset = pageOffset;
+ return this;
+ }
+
+ /**
+ * Set pageLimit.
+ *
+ * @param pageLimit The number of degradations to return per page. (optional, default to 50)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters pageLimit(Integer pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+
+ /**
+ * Set filterStatus.
+ *
+ * @param filterStatus Optional degradation status filter. Supported values: investigating,
+ * identified, monitoring, resolved. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters filterStatus(String filterStatus) {
+ this.filterStatus = filterStatus;
+ return this;
+ }
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @return DegradationArray
+ * @throws ApiException if fails to make API call
+ */
+ public DegradationArray listDegradations() throws ApiException {
+ return listDegradationsWithHttpInfo(new ListDegradationsOptionalParameters()).getData();
+ }
+
+ /**
+ * List degradations.
+ *
+ *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<DegradationArray>
+ */
+ public CompletableFuture listDegradationsAsync() {
+ return listDegradationsWithHttpInfoAsync(new ListDegradationsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return DegradationArray
+ * @throws ApiException if fails to make API call
+ */
+ public DegradationArray listDegradations(ListDegradationsOptionalParameters parameters)
+ throws ApiException {
+ return listDegradationsWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List degradations.
+ *
+ *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<DegradationArray>
+ */
+ public CompletableFuture listDegradationsAsync(
+ ListDegradationsOptionalParameters parameters) {
+ return listDegradationsWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists all degradations for the organization. Optionally filter by status and page.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<DegradationArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listDegradationsWithHttpInfo(
+ ListDegradationsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ String filterPageId = parameters.filterPageId;
+ Integer pageOffset = parameters.pageOffset;
+ Integer pageLimit = parameters.pageLimit;
+ String include = parameters.include;
+ String filterStatus = parameters.filterStatus;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages/degradations";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[page_id]", filterPageId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listDegradations",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<DegradationArray>>
+ */
+ public CompletableFuture> listDegradationsWithHttpInfoAsync(
+ ListDegradationsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ String filterPageId = parameters.filterPageId;
+ Integer pageOffset = parameters.pageOffset;
+ Integer pageLimit = parameters.pageLimit;
+ String include = parameters.include;
+ String filterStatus = parameters.filterStatus;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages/degradations";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[page_id]", filterPageId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listDegradations",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listStatusPages. */
+ public static class ListStatusPagesOptionalParameters {
+ private Integer pageOffset;
+ private Integer pageLimit;
+ private String include;
+
+ /**
+ * Set pageOffset.
+ *
+ * @param pageOffset Offset to use as the start of the page. (optional, default to 0)
+ * @return ListStatusPagesOptionalParameters
+ */
+ public ListStatusPagesOptionalParameters pageOffset(Integer pageOffset) {
+ this.pageOffset = pageOffset;
+ return this;
+ }
+
+ /**
+ * Set pageLimit.
+ *
+ * @param pageLimit The number of status pages to return per page. (optional, default to 50)
+ * @return ListStatusPagesOptionalParameters
+ */
+ public ListStatusPagesOptionalParameters pageLimit(Integer pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user. (optional)
+ * @return ListStatusPagesOptionalParameters
+ */
+ public ListStatusPagesOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * List status pages.
+ *
+ * See {@link #listStatusPagesWithHttpInfo}.
+ *
+ * @return StatusPageArray
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPageArray listStatusPages() throws ApiException {
+ return listStatusPagesWithHttpInfo(new ListStatusPagesOptionalParameters()).getData();
+ }
+
+ /**
+ * List status pages.
+ *
+ *
See {@link #listStatusPagesWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<StatusPageArray>
+ */
+ public CompletableFuture listStatusPagesAsync() {
+ return listStatusPagesWithHttpInfoAsync(new ListStatusPagesOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List status pages.
+ *
+ * See {@link #listStatusPagesWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return StatusPageArray
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPageArray listStatusPages(ListStatusPagesOptionalParameters parameters)
+ throws ApiException {
+ return listStatusPagesWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List status pages.
+ *
+ *
See {@link #listStatusPagesWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPageArray>
+ */
+ public CompletableFuture listStatusPagesAsync(
+ ListStatusPagesOptionalParameters parameters) {
+ return listStatusPagesWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists all status pages for the organization.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPageArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listStatusPagesWithHttpInfo(
+ ListStatusPagesOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ Integer pageOffset = parameters.pageOffset;
+ Integer pageLimit = parameters.pageLimit;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listStatusPages",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List status pages.
+ *
+ * See {@link #listStatusPagesWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPageArray>>
+ */
+ public CompletableFuture