Skip to content

Commit c959274

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 64ef0dc of spec repo
1 parent 16bb708 commit c959274

File tree

49 files changed

+799
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+799
-209
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107213,7 +107213,7 @@ paths:
107213107213
permissions:
107214107214
- status_pages_settings_read
107215107215
post:
107216-
description: Creates a new status page.
107216+
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."
107217107217
operationId: CreateStatusPage
107218107218
parameters:
107219107219
- description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user."
@@ -107428,7 +107428,7 @@ paths:
107428107428
permissions:
107429107429
- status_pages_settings_read
107430107430
patch:
107431-
description: Updates an existing status page's attributes.
107431+
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."
107432107432
operationId: UpdateStatusPage
107433107433
parameters:
107434107434
- description: Whether to delete existing subscribers when updating a status page's type.
@@ -108027,6 +108027,66 @@ paths:
108027108027
operator: AND
108028108028
permissions:
108029108029
- status_pages_incident_write
108030+
/api/v2/statuspages/{page_id}/publish:
108031+
post:
108032+
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.
108033+
operationId: PublishStatusPage
108034+
parameters:
108035+
- description: The ID of the status page.
108036+
in: path
108037+
name: page_id
108038+
required: true
108039+
schema:
108040+
format: uuid
108041+
type: string
108042+
responses:
108043+
"204":
108044+
description: No Content
108045+
"429":
108046+
$ref: "#/components/responses/TooManyRequestsResponse"
108047+
security:
108048+
- apiKeyAuth: []
108049+
appKeyAuth: []
108050+
- AuthZ: []
108051+
summary: Publish status page
108052+
tags:
108053+
- Status Pages
108054+
x-permission:
108055+
operator: OR
108056+
permissions:
108057+
- status_pages_settings_write
108058+
- status_pages_public_page_publish
108059+
- status_pages_internal_page_publish
108060+
/api/v2/statuspages/{page_id}/unpublish:
108061+
post:
108062+
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.
108063+
operationId: UnpublishStatusPage
108064+
parameters:
108065+
- description: The ID of the status page.
108066+
in: path
108067+
name: page_id
108068+
required: true
108069+
schema:
108070+
format: uuid
108071+
type: string
108072+
responses:
108073+
"204":
108074+
description: No Content
108075+
"429":
108076+
$ref: "#/components/responses/TooManyRequestsResponse"
108077+
security:
108078+
- apiKeyAuth: []
108079+
appKeyAuth: []
108080+
- AuthZ: []
108081+
summary: Unpublish status page
108082+
tags:
108083+
- Status Pages
108084+
x-permission:
108085+
operator: OR
108086+
permissions:
108087+
- status_pages_settings_write
108088+
- status_pages_public_page_publish
108089+
- status_pages_internal_page_publish
108030108090
/api/v2/synthetics/api-multistep/subtests/{public_id}:
108031108091
get:
108032108092
description: |-
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Publish status page returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.StatusPagesApi;
6+
import java.util.UUID;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
12+
13+
// there is a valid "unpublished_status_page" in the system
14+
UUID UNPUBLISHED_STATUS_PAGE_DATA_ID = null;
15+
try {
16+
UNPUBLISHED_STATUS_PAGE_DATA_ID =
17+
UUID.fromString(System.getenv("UNPUBLISHED_STATUS_PAGE_DATA_ID"));
18+
} catch (IllegalArgumentException e) {
19+
System.err.println("Error parsing UUID: " + e.getMessage());
20+
}
21+
22+
try {
23+
apiInstance.publishStatusPage(UNPUBLISHED_STATUS_PAGE_DATA_ID);
24+
} catch (ApiException e) {
25+
System.err.println("Exception when calling StatusPagesApi#publishStatusPage");
26+
System.err.println("Status code: " + e.getCode());
27+
System.err.println("Reason: " + e.getResponseBody());
28+
System.err.println("Response headers: " + e.getResponseHeaders());
29+
e.printStackTrace();
30+
}
31+
}
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Unpublish status page returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.StatusPagesApi;
6+
import java.util.UUID;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
12+
13+
// there is a valid "status_page" in the system
14+
UUID STATUS_PAGE_DATA_ID = null;
15+
try {
16+
STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
17+
} catch (IllegalArgumentException e) {
18+
System.err.println("Error parsing UUID: " + e.getMessage());
19+
}
20+
21+
try {
22+
apiInstance.unpublishStatusPage(STATUS_PAGE_DATA_ID);
23+
} catch (ApiException e) {
24+
System.err.println("Exception when calling StatusPagesApi#unpublishStatusPage");
25+
System.err.println("Status code: " + e.getCode());
26+
System.err.println("Reason: " + e.getResponseBody());
27+
System.err.println("Response headers: " + e.getResponseHeaders());
28+
e.printStackTrace();
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)