Skip to content

Commit 60a6dde

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f2c01d5 of spec repo
1 parent 42deeaf commit 60a6dde

File tree

63 files changed

+1020
-178
lines changed

Some content is hidden

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

63 files changed

+1020
-178
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 14:00:09.710"
2+
"spec_repo_commit": "f2c01d5",
3+
"generated": "2025-07-21 16:33:05.430"
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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Update case attributes returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI;
4+
use datadog_api_client::datadogV2::model::CaseResourceType;
5+
use datadog_api_client::datadogV2::model::CaseUpdateAttributes;
6+
use datadog_api_client::datadogV2::model::CaseUpdateAttributesAttributes;
7+
use datadog_api_client::datadogV2::model::CaseUpdateAttributesRequest;
8+
use std::collections::BTreeMap;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
// there is a valid "case" in the system
13+
let case_id = std::env::var("CASE_ID").unwrap();
14+
let body = CaseUpdateAttributesRequest::new(CaseUpdateAttributes::new(
15+
CaseUpdateAttributesAttributes::new(BTreeMap::from([
16+
(
17+
"service".to_string(),
18+
vec!["web-store".to_string(), "web-api".to_string()],
19+
),
20+
("env".to_string(), vec!["test".to_string()]),
21+
("team".to_string(), vec!["engineer".to_string()]),
22+
])),
23+
CaseResourceType::CASE,
24+
));
25+
let configuration = datadog::Configuration::new();
26+
let api = CaseManagementAPI::with_config(configuration);
27+
let resp = api.update_attributes(case_id.clone(), body).await;
28+
if let Ok(value) = resp {
29+
println!("{:#?}", value);
30+
} else {
31+
println!("{:#?}", resp.unwrap_err());
32+
}
33+
}

0 commit comments

Comments
 (0)