Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 62 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107213,7 +107213,7 @@ paths:
permissions:
- status_pages_settings_read
post:
description: Creates a new status page.
description: "Creates a new status page. **Note**: Publishing a status page on creation via the `enabled` property will be deprecated. Use the dedicated [publish](#publish-status-page) status page endpoint after creation instead."
operationId: CreateStatusPage
parameters:
- description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user."
Expand Down Expand Up @@ -107428,7 +107428,7 @@ paths:
permissions:
- status_pages_settings_read
patch:
description: Updates an existing status page's attributes.
description: "Updates an existing status page's attributes. **Note**: Publishing and unpublishing via the `enabled` property will be deprecated on this endpoint. Use the dedicated [publish](#publish-status-page) and [unpublish](#unpublish-status-page) status page endpoints instead."
operationId: UpdateStatusPage
parameters:
- description: Whether to delete existing subscribers when updating a status page's type.
Expand Down Expand Up @@ -108027,6 +108027,66 @@ paths:
operator: AND
permissions:
- status_pages_incident_write
/api/v2/statuspages/{page_id}/publish:
post:
description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate publishing functionality from the update status page endpoint to the publish status page endpoint.
operationId: PublishStatusPage
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: Publish status page
tags:
- Status Pages
x-permission:
operator: OR
permissions:
- status_pages_settings_write
- status_pages_public_page_publish
- status_pages_internal_page_publish
/api/v2/statuspages/{page_id}/unpublish:
post:
description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint.
operationId: UnpublishStatusPage
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: Unpublish status page
tags:
- Status Pages
x-permission:
operator: OR
permissions:
- status_pages_settings_write
- status_pages_public_page_publish
- status_pages_internal_page_publish
/api/v2/synthetics/api-multistep/subtests/{public_id}:
get:
description: |-
Expand Down
17 changes: 17 additions & 0 deletions examples/v2/status-pages/PublishStatusPage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Publish status page returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi

# there is a valid "unpublished_status_page" in the system
UNPUBLISHED_STATUS_PAGE_DATA_ID = environ["UNPUBLISHED_STATUS_PAGE_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = StatusPagesApi(api_client)
api_instance.publish_status_page(
page_id=UNPUBLISHED_STATUS_PAGE_DATA_ID,
)
17 changes: 17 additions & 0 deletions examples/v2/status-pages/UnpublishStatusPage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Unpublish status page returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = StatusPagesApi(api_client)
api_instance.unpublish_status_page(
page_id=STATUS_PAGE_DATA_ID,
)
84 changes: 82 additions & 2 deletions src/datadog_api_client/v2/api/status_pages_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,52 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._publish_status_page_endpoint = _Endpoint(
settings={
"response_type": None,
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
"endpoint_path": "/api/v2/statuspages/{page_id}/publish",
"operation_id": "publish_status_page",
"http_method": "POST",
"version": "v2",
},
params_map={
"page_id": {
"required": True,
"openapi_types": (UUID,),
"attribute": "page_id",
"location": "path",
},
},
headers_map={
"accept": ["*/*"],
},
api_client=api_client,
)

self._unpublish_status_page_endpoint = _Endpoint(
settings={
"response_type": None,
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
"endpoint_path": "/api/v2/statuspages/{page_id}/unpublish",
"operation_id": "unpublish_status_page",
"http_method": "POST",
"version": "v2",
},
params_map={
"page_id": {
"required": True,
"openapi_types": (UUID,),
"attribute": "page_id",
"location": "path",
},
},
headers_map={
"accept": ["*/*"],
},
api_client=api_client,
)

self._update_component_endpoint = _Endpoint(
settings={
"response_type": (StatusPagesComponent,),
Expand Down Expand Up @@ -794,7 +840,7 @@ def create_status_page(
) -> StatusPage:
"""Create status page.

Creates a new status page.
Creates a new status page. **Note** : Publishing a status page on creation via the ``enabled`` property will be deprecated. Use the dedicated `publish <#publish-status-page>`_ status page endpoint after creation instead.

:type body: CreateStatusPageRequest
:param include: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.
Expand Down Expand Up @@ -1134,6 +1180,40 @@ def list_status_pages(

return self._list_status_pages_endpoint.call_with_http_info(**kwargs)

def publish_status_page(
self,
page_id: UUID,
) -> None:
"""Publish status page.

Publishes a status page. For pages of type ``public`` , makes the status page available on the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , makes the status page available under the ``status-pages/$domain_prefix/view`` route within the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. The ``status_pages_settings_write`` permission is temporarily honored as we migrate publishing functionality from the update status page endpoint to the publish status page endpoint.

:param page_id: The ID of the status page.
:type page_id: UUID
:rtype: None
"""
kwargs: Dict[str, Any] = {}
kwargs["page_id"] = page_id

return self._publish_status_page_endpoint.call_with_http_info(**kwargs)

def unpublish_status_page(
self,
page_id: UUID,
) -> None:
"""Unpublish status page.

Unpublishes a status page. For pages of type ``public`` , removes the status page from the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , removes the ``status-pages/$domain_prefix/view`` route from the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. The ``status_pages_settings_write`` permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint.

:param page_id: The ID of the status page.
:type page_id: UUID
:rtype: None
"""
kwargs: Dict[str, Any] = {}
kwargs["page_id"] = page_id

return self._unpublish_status_page_endpoint.call_with_http_info(**kwargs)

def update_component(
self,
page_id: UUID,
Expand Down Expand Up @@ -1255,7 +1335,7 @@ def update_status_page(
) -> StatusPage:
"""Update status page.

Updates an existing status page's attributes.
Updates an existing status page's attributes. **Note** : Publishing and unpublishing via the ``enabled`` property will be deprecated on this endpoint. Use the dedicated `publish <#publish-status-page>`_ and `unpublish <#unpublish-status-page>`_ status page endpoints instead.

:param page_id: The ID of the status page.
:type page_id: UUID
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-02-24T17:00:35.997Z
2026-03-31T18:43:45.443Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"df531f11f71a2e23","enabled":true,"name":"A
body: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"9dbd15ff66733c82","enabled":true,"name":"A
Status Page","type":"internal","visualization_type":"bars_and_uptime_percentage"},"type":"status_pages"}}'
headers:
accept:
Expand All @@ -11,8 +11,8 @@ interactions:
uri: https://api.datadoghq.com/api/v2/statuspages
response:
body:
string: '{"data":{"id":"3483924e-54de-4b7f-9177-56f224f8c6e6","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"d03bffa2-720c-4f82-871e-3f1599d38089","name":"Application","type":"group","position":0,"components":[{"id":"6fe382cb-5309-49bf-b56b-c9921a7d8153","name":"Login","type":"component","status":"operational","position":0},{"id":"b8a9ac5d-2470-4c43-b90d-817ba996822c","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-02-24T17:00:36.165599Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"df531f11f71a2e23","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-02-24T17:00:36.165599Z","name":"A
Status Page","page_url":"https://frog.datadoghq.com/status-pages/3483924e-54de-4b7f-9177-56f224f8c6e6/view","subscriptions_enabled":false,"type":"internal","visualization_type":"bars_and_uptime_percentage"},"relationships":{"created_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"last_modified_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}}}}}'
string: '{"data":{"id":"daae96b1-2114-4979-8668-2f782fe4a82b","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"0827c72a-5886-4850-b9a0-3c0b62fd5cbd","name":"Application","type":"group","position":0,"components":[{"id":"2944ac68-cc1f-43bc-9950-a81912daf613","name":"Login","type":"component","status":"operational","position":0},{"id":"7374a8e5-7d66-43be-83f0-4337a739bdfb","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-03-31T18:43:45.548049Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"9dbd15ff66733c82","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-03-31T18:43:45.548049Z","name":"A
Status Page","page_url":"https://frog.datadoghq.com/status-pages/daae96b1-2114-4979-8668-2f782fe4a82b/view","subscriptions_enabled":false,"type":"internal","visualization_type":"bars_and_uptime_percentage"},"relationships":{"created_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"last_modified_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}}}}}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -27,10 +27,10 @@ interactions:
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/statuspages/3483924e-54de-4b7f-9177-56f224f8c6e6/components
uri: https://api.datadoghq.com/api/v2/statuspages/daae96b1-2114-4979-8668-2f782fe4a82b/components
response:
body:
string: '{"data":{"id":"060dba63-7f63-4d0f-9278-aecabc6f9c30","type":"components","attributes":{"created_at":"2026-02-24T17:00:36.79986Z","modified_at":"2026-02-24T17:00:36.79986Z","name":"Logs","position":0,"status":"operational","type":"component"},"relationships":{"created_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"group":{"data":null},"last_modified_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"status_page":{"data":{"id":"3483924e-54de-4b7f-9177-56f224f8c6e6","type":"status_pages"}}}}}'
string: '{"data":{"id":"dc1f6182-86a0-4f18-a4de-78f99ff1455f","type":"components","attributes":{"created_at":"2026-03-31T18:43:46.083871Z","modified_at":"2026-03-31T18:43:46.083871Z","name":"Logs","position":0,"status":"operational","type":"component"},"relationships":{"created_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"group":{"data":null},"last_modified_by_user":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"users"}},"status_page":{"data":{"id":"daae96b1-2114-4979-8668-2f782fe4a82b","type":"status_pages"}}}}}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -43,7 +43,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/statuspages/3483924e-54de-4b7f-9177-56f224f8c6e6/components/060dba63-7f63-4d0f-9278-aecabc6f9c30
uri: https://api.datadoghq.com/api/v2/statuspages/daae96b1-2114-4979-8668-2f782fe4a82b/components/dc1f6182-86a0-4f18-a4de-78f99ff1455f
response:
body:
string: ''
Expand All @@ -57,7 +57,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/statuspages/3483924e-54de-4b7f-9177-56f224f8c6e6
uri: https://api.datadoghq.com/api/v2/statuspages/daae96b1-2114-4979-8668-2f782fe4a82b
response:
body:
string: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-02-24T17:00:37.682Z
2026-03-31T18:43:46.834Z
Loading
Loading