Skip to content

Commit 02536f9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f2c01d5 of spec repo
1 parent aa180a1 commit 02536f9

File tree

54 files changed

+1185
-197
lines changed

Some content is hidden

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

54 files changed

+1185
-197
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "06ccc32",
3-
"generated": "2025-07-21 13:56:40.276"
2+
"spec_repo_commit": "f2c01d5",
3+
"generated": "2025-07-21 16:29:34.894"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 120 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6834,7 +6834,7 @@ components:
68346834
description: A case
68356835
properties:
68366836
attributes:
6837-
$ref: '#/components/schemas/CaseAttributes'
6837+
$ref: '#/components/schemas/CaseResourceAttributes'
68386838
id:
68396839
description: Case's identifier
68406840
example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
@@ -6892,52 +6892,11 @@ components:
68926892
- data
68936893
type: object
68946894
CaseAttributes:
6895-
description: Case attributes
6896-
properties:
6897-
archived_at:
6898-
description: Timestamp of when the case was archived
6899-
format: date-time
6900-
nullable: true
6901-
readOnly: true
6902-
type: string
6903-
closed_at:
6904-
description: Timestamp of when the case was closed
6905-
format: date-time
6906-
nullable: true
6907-
readOnly: true
6908-
type: string
6909-
created_at:
6910-
description: Timestamp of when the case was created
6911-
format: date-time
6912-
readOnly: true
6913-
type: string
6914-
description:
6915-
description: Description
6916-
type: string
6917-
jira_issue:
6918-
$ref: '#/components/schemas/JiraIssue'
6919-
key:
6920-
description: Key
6921-
example: CASEM-4523
6922-
type: string
6923-
modified_at:
6924-
description: Timestamp of when the case was last modified
6925-
format: date-time
6926-
nullable: true
6927-
readOnly: true
6928-
type: string
6929-
priority:
6930-
$ref: '#/components/schemas/CasePriority'
6931-
service_now_ticket:
6932-
$ref: '#/components/schemas/ServiceNowTicket'
6933-
status:
6934-
$ref: '#/components/schemas/CaseStatus'
6935-
title:
6936-
description: Title
6937-
example: Memory leak investigation on API
6895+
additionalProperties:
6896+
items:
69386897
type: string
6939-
type:
6940-
$ref: '#/components/schemas/CaseType'
6898+
type: array
6899+
description: The definition of `CaseAttributes` object.
69416900
type: object
69426901
CaseCreate:
69436902
description: Case creation data
@@ -7035,6 +6994,56 @@ components:
70356994
project:
70366995
$ref: '#/components/schemas/ProjectRelationship'
70376996
type: object
6997+
CaseResourceAttributes:
6998+
description: Case resource attributes
6999+
properties:
7000+
archived_at:
7001+
description: Timestamp of when the case was archived
7002+
format: date-time
7003+
nullable: true
7004+
readOnly: true
7005+
type: string
7006+
attributes:
7007+
$ref: '#/components/schemas/CaseAttributes'
7008+
closed_at:
7009+
description: Timestamp of when the case was closed
7010+
format: date-time
7011+
nullable: true
7012+
readOnly: true
7013+
type: string
7014+
created_at:
7015+
description: Timestamp of when the case was created
7016+
format: date-time
7017+
readOnly: true
7018+
type: string
7019+
description:
7020+
description: Description
7021+
type: string
7022+
jira_issue:
7023+
$ref: '#/components/schemas/JiraIssue'
7024+
key:
7025+
description: Key
7026+
example: CASEM-4523
7027+
type: string
7028+
modified_at:
7029+
description: Timestamp of when the case was last modified
7030+
format: date-time
7031+
nullable: true
7032+
readOnly: true
7033+
type: string
7034+
priority:
7035+
$ref: '#/components/schemas/CasePriority'
7036+
service_now_ticket:
7037+
$ref: '#/components/schemas/ServiceNowTicket'
7038+
status:
7039+
$ref: '#/components/schemas/CaseStatus'
7040+
title:
7041+
description: Title
7042+
example: Memory leak investigation on API
7043+
type: string
7044+
type:
7045+
$ref: '#/components/schemas/CaseType'
7046+
type: object
70387047
CaseResourceType:
70397048
default: case
70407049
description: Case resource type
@@ -7099,6 +7108,33 @@ components:
70997108
type: string
71007109
x-enum-varnames:
71017110
- STANDARD
7111+
CaseUpdateAttributes:
7112+
description: Case update attributes
7113+
properties:
7114+
attributes:
7115+
$ref: '#/components/schemas/CaseUpdateAttributesAttributes'
7116+
type:
7117+
$ref: '#/components/schemas/CaseResourceType'
7118+
required:
7119+
- attributes
7120+
- type
7121+
type: object
7122+
CaseUpdateAttributesAttributes:
7123+
description: Case update attributes attributes
7124+
properties:
7125+
attributes:
7126+
$ref: '#/components/schemas/CaseAttributes'
7127+
required:
7128+
- attributes
7129+
type: object
7130+
CaseUpdateAttributesRequest:
7131+
description: Case update attributes request
7132+
properties:
7133+
data:
7134+
$ref: '#/components/schemas/CaseUpdateAttributes'
7135+
required:
7136+
- data
7137+
type: object
71027138
CaseUpdatePriority:
71037139
description: Case priority status
71047140
properties:
@@ -45529,6 +45565,44 @@ paths:
4552945565
summary: Assign case
4553045566
tags:
4553145567
- Case Management
45568+
/api/v2/cases/{case_id}/attributes:
45569+
post:
45570+
description: Update case attributes
45571+
operationId: UpdateAttributes
45572+
parameters:
45573+
- $ref: '#/components/parameters/CaseIDPathParameter'
45574+
requestBody:
45575+
content:
45576+
application/json:
45577+
schema:
45578+
$ref: '#/components/schemas/CaseUpdateAttributesRequest'
45579+
description: Case attributes update payload
45580+
required: true
45581+
responses:
45582+
'200':
45583+
content:
45584+
application/json:
45585+
schema:
45586+
$ref: '#/components/schemas/CaseResponse'
45587+
description: OK
45588+
'400':
45589+
$ref: '#/components/responses/BadRequestResponse'
45590+
'401':
45591+
$ref: '#/components/responses/UnauthorizedResponse'
45592+
'403':
45593+
$ref: '#/components/responses/ForbiddenResponse'
45594+
'404':
45595+
$ref: '#/components/responses/NotFoundResponse'
45596+
'429':
45597+
$ref: '#/components/responses/TooManyRequestsResponse'
45598+
security:
45599+
- apiKeyAuth: []
45600+
appKeyAuth: []
45601+
- AuthZ:
45602+
- cases_write
45603+
summary: Update case attributes
45604+
tags:
45605+
- Case Management
4553245606
/api/v2/cases/{case_id}/priority:
4553345607
post:
4553445608
description: Update case priority
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Update case attributes 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.CaseResourceType;
7+
import com.datadog.api.client.v2.model.CaseResponse;
8+
import com.datadog.api.client.v2.model.CaseUpdateAttributes;
9+
import com.datadog.api.client.v2.model.CaseUpdateAttributesAttributes;
10+
import com.datadog.api.client.v2.model.CaseUpdateAttributesRequest;
11+
import java.util.Arrays;
12+
import java.util.Collections;
13+
import java.util.Map;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
19+
20+
// there is a valid "case" in the system
21+
String CASE_ID = System.getenv("CASE_ID");
22+
23+
CaseUpdateAttributesRequest body =
24+
new CaseUpdateAttributesRequest()
25+
.data(
26+
new CaseUpdateAttributes()
27+
.attributes(
28+
new CaseUpdateAttributesAttributes()
29+
.attributes(
30+
Map.ofEntries(
31+
Map.entry("service", Arrays.asList("web-store", "web-api")),
32+
Map.entry("env", Collections.singletonList("test")),
33+
Map.entry("team", Collections.singletonList("engineer")))))
34+
.type(CaseResourceType.CASE));
35+
36+
try {
37+
CaseResponse result = apiInstance.updateAttributes(CASE_ID, body);
38+
System.out.println(result);
39+
} catch (ApiException e) {
40+
System.err.println("Exception when calling CaseManagementApi#updateAttributes");
41+
System.err.println("Status code: " + e.getCode());
42+
System.err.println("Reason: " + e.getResponseBody());
43+
System.err.println("Response headers: " + e.getResponseHeaders());
44+
e.printStackTrace();
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)