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
32 changes: 32 additions & 0 deletions examples/v2/status-pages/PublishStatusPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Publish 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;
import java.util.UUID;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

// there is a valid "unpublished_status_page" in the system
UUID UNPUBLISHED_STATUS_PAGE_DATA_ID = null;
try {
UNPUBLISHED_STATUS_PAGE_DATA_ID =
UUID.fromString(System.getenv("UNPUBLISHED_STATUS_PAGE_DATA_ID"));
} catch (IllegalArgumentException e) {
System.err.println("Error parsing UUID: " + e.getMessage());
}

try {
apiInstance.publishStatusPage(UNPUBLISHED_STATUS_PAGE_DATA_ID);
} catch (ApiException e) {
System.err.println("Exception when calling StatusPagesApi#publishStatusPage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
31 changes: 31 additions & 0 deletions examples/v2/status-pages/UnpublishStatusPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Unpublish 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;
import java.util.UUID;

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
UUID STATUS_PAGE_DATA_ID = null;
try {
STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
} catch (IllegalArgumentException e) {
System.err.println("Error parsing UUID: " + e.getMessage());
}

try {
apiInstance.unpublishStatusPage(STATUS_PAGE_DATA_ID);
} catch (ApiException e) {
System.err.println("Exception when calling StatusPagesApi#unpublishStatusPage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading
Loading