Skip to content

Commit 09885d4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d98173c of spec repo
1 parent 502f8f8 commit 09885d4

13 files changed

Lines changed: 1582 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,14 @@ components:
11251125
schema:
11261126
example: 00000000-0000-9999-0000-000000000000
11271127
type: string
1128+
UserUUIDPathParameter:
1129+
description: User UUID
1130+
example: 8146583c-0b5f-11ec-abf8-da7ad0900001
1131+
in: path
1132+
name: user_id
1133+
required: true
1134+
schema:
1135+
type: string
11281136
WorkflowId:
11291137
description: The ID of the workflow.
11301138
in: path
@@ -64692,6 +64700,57 @@ components:
6469264700
- X_CONTENT_TYPE_HEADER_MISSING
6469364701
- X_PATH_INJECTION
6469464702
- XSS
64703+
Watcher:
64704+
description: Case watcher
64705+
properties:
64706+
id:
64707+
description: User UUID of the watcher
64708+
example: 8146583c-0b5f-11ec-abf8-da7ad0900001
64709+
type: string
64710+
relationships:
64711+
$ref: '#/components/schemas/WatcherRelationships'
64712+
type:
64713+
$ref: '#/components/schemas/WatcherResourceType'
64714+
required:
64715+
- id
64716+
- type
64717+
- relationships
64718+
type: object
64719+
WatcherRelationships:
64720+
description: Watcher relationships
64721+
properties:
64722+
user:
64723+
$ref: '#/components/schemas/WatcherUserRelationship'
64724+
required:
64725+
- user
64726+
type: object
64727+
WatcherResourceType:
64728+
description: Watcher resource type
64729+
enum:
64730+
- watcher
64731+
example: watcher
64732+
type: string
64733+
x-enum-varnames:
64734+
- WATCHER
64735+
WatcherUserRelationship:
64736+
description: Relationship to user
64737+
properties:
64738+
data:
64739+
$ref: '#/components/schemas/UserRelationshipData'
64740+
required:
64741+
- data
64742+
type: object
64743+
WatchersResponse:
64744+
description: Response with case watchers
64745+
properties:
64746+
data:
64747+
description: Array of watchers
64748+
items:
64749+
$ref: '#/components/schemas/Watcher'
64750+
type: array
64751+
required:
64752+
- data
64753+
type: object
6469564754
Weekday:
6469664755
description: A day of the week.
6469764756
enum:
@@ -70202,6 +70261,149 @@ paths:
7020270261
summary: Unassign case
7020370262
tags:
7020470263
- Case Management
70264+
/api/v2/cases/{case_id}/watchers:
70265+
get:
70266+
description: Get all users watching a case
70267+
operationId: ListCaseWatchers
70268+
parameters:
70269+
- $ref: '#/components/parameters/CaseIDPathParameter'
70270+
responses:
70271+
'200':
70272+
content:
70273+
application/json:
70274+
schema:
70275+
$ref: '#/components/schemas/WatchersResponse'
70276+
description: OK
70277+
'400':
70278+
content:
70279+
application/json:
70280+
schema:
70281+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70282+
description: Bad Request
70283+
'401':
70284+
content:
70285+
application/json:
70286+
schema:
70287+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70288+
description: Unauthorized
70289+
'403':
70290+
content:
70291+
application/json:
70292+
schema:
70293+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70294+
description: Forbidden
70295+
'404':
70296+
content:
70297+
application/json:
70298+
schema:
70299+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70300+
description: Not Found
70301+
'429':
70302+
$ref: '#/components/responses/TooManyRequestsResponse'
70303+
security:
70304+
- apiKeyAuth: []
70305+
appKeyAuth: []
70306+
- AuthZ:
70307+
- cases_read
70308+
summary: Get case watchers
70309+
tags:
70310+
- Case Management
70311+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
70312+
70313+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
70314+
/api/v2/cases/{case_id}/watchers/{user_id}:
70315+
delete:
70316+
description: Remove a user from the watchers list for a case
70317+
operationId: UnwatchCase
70318+
parameters:
70319+
- $ref: '#/components/parameters/CaseIDPathParameter'
70320+
- $ref: '#/components/parameters/UserUUIDPathParameter'
70321+
responses:
70322+
'204':
70323+
description: No Content
70324+
'400':
70325+
content:
70326+
application/json:
70327+
schema:
70328+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70329+
description: Bad Request
70330+
'401':
70331+
content:
70332+
application/json:
70333+
schema:
70334+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70335+
description: Unauthorized
70336+
'403':
70337+
content:
70338+
application/json:
70339+
schema:
70340+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70341+
description: Forbidden
70342+
'404':
70343+
content:
70344+
application/json:
70345+
schema:
70346+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70347+
description: Not Found
70348+
'429':
70349+
$ref: '#/components/responses/TooManyRequestsResponse'
70350+
security:
70351+
- apiKeyAuth: []
70352+
appKeyAuth: []
70353+
- AuthZ:
70354+
- cases_write
70355+
summary: Remove user as watcher
70356+
tags:
70357+
- Case Management
70358+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
70359+
70360+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
70361+
post:
70362+
description: Add a user as a watcher for a case
70363+
operationId: WatchCase
70364+
parameters:
70365+
- $ref: '#/components/parameters/CaseIDPathParameter'
70366+
- $ref: '#/components/parameters/UserUUIDPathParameter'
70367+
responses:
70368+
'201':
70369+
description: Created
70370+
'400':
70371+
content:
70372+
application/json:
70373+
schema:
70374+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70375+
description: Bad Request
70376+
'401':
70377+
content:
70378+
application/json:
70379+
schema:
70380+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70381+
description: Unauthorized
70382+
'403':
70383+
content:
70384+
application/json:
70385+
schema:
70386+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70387+
description: Forbidden
70388+
'404':
70389+
content:
70390+
application/json:
70391+
schema:
70392+
$ref: '#/components/schemas/JSONAPIErrorResponse'
70393+
description: Not Found
70394+
'429':
70395+
$ref: '#/components/responses/TooManyRequestsResponse'
70396+
security:
70397+
- apiKeyAuth: []
70398+
appKeyAuth: []
70399+
- AuthZ:
70400+
- cases_write
70401+
summary: Add user as watcher
70402+
tags:
70403+
- Case Management
70404+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
70405+
70406+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7020570407
/api/v2/catalog/entity:
7020670408
get:
7020770409
description: Get a list of entities from Software Catalog.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get case watchers returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CaseManagementApi;
6+
import com.datadog.api.client.v2.model.WatchersResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listCaseWatchers", true);
12+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
13+
14+
try {
15+
WatchersResponse result =
16+
apiInstance.listCaseWatchers("f98a5a5b-e0ff-45d4-b2f5-afe6e74de504");
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling CaseManagementApi#listCaseWatchers");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Remove user as watcher 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.CaseManagementApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.unwatchCase", true);
11+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
12+
13+
try {
14+
apiInstance.unwatchCase(
15+
"f98a5a5b-e0ff-45d4-b2f5-afe6e74de504", "8146583c-0b5f-11ec-abf8-da7ad0900001");
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling CaseManagementApi#unwatchCase");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Add user as watcher returns "Created" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CaseManagementApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.watchCase", true);
11+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
12+
13+
try {
14+
apiInstance.watchCase(
15+
"f98a5a5b-e0ff-45d4-b2f5-afe6e74de504", "8146583c-0b5f-11ec-abf8-da7ad0900001");
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling CaseManagementApi#watchCase");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ public class ApiClient {
775775
put("v2.getOpenAPI", false);
776776
put("v2.listAPIs", false);
777777
put("v2.updateOpenAPI", false);
778+
put("v2.listCaseWatchers", false);
779+
put("v2.unwatchCase", false);
780+
put("v2.watchCase", false);
778781
put("v2.cancelThreatHuntingJob", false);
779782
put("v2.convertJobResultToSignal", false);
780783
put("v2.deleteThreatHuntingJob", false);

0 commit comments

Comments
 (0)