Skip to content

Commit 7c72128

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f2c01d5 of spec repo
1 parent b46aa1c commit 7c72128

File tree

57 files changed

+781
-281
lines changed

Some content is hidden

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

57 files changed

+781
-281
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:55:33.672"
2+
"spec_repo_commit": "f2c01d5",
3+
"generated": "2025-07-21 16:28:10.857"
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

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,13 @@ datadog\_api\_client.v2.model.case\_relationships module
21322132
:members:
21332133
:show-inheritance:
21342134

2135+
datadog\_api\_client.v2.model.case\_resource\_attributes module
2136+
---------------------------------------------------------------
2137+
2138+
.. automodule:: datadog_api_client.v2.model.case_resource_attributes
2139+
:members:
2140+
:show-inheritance:
2141+
21352142
datadog\_api\_client.v2.model.case\_resource\_type module
21362143
---------------------------------------------------------
21372144

@@ -2181,6 +2188,27 @@ datadog\_api\_client.v2.model.case\_type module
21812188
:members:
21822189
:show-inheritance:
21832190

2191+
datadog\_api\_client.v2.model.case\_update\_attributes module
2192+
-------------------------------------------------------------
2193+
2194+
.. automodule:: datadog_api_client.v2.model.case_update_attributes
2195+
:members:
2196+
:show-inheritance:
2197+
2198+
datadog\_api\_client.v2.model.case\_update\_attributes\_attributes module
2199+
-------------------------------------------------------------------------
2200+
2201+
.. automodule:: datadog_api_client.v2.model.case_update_attributes_attributes
2202+
:members:
2203+
:show-inheritance:
2204+
2205+
datadog\_api\_client.v2.model.case\_update\_attributes\_request module
2206+
----------------------------------------------------------------------
2207+
2208+
.. automodule:: datadog_api_client.v2.model.case_update_attributes_request
2209+
:members:
2210+
:show-inheritance:
2211+
21842212
datadog\_api\_client.v2.model.case\_update\_priority module
21852213
-----------------------------------------------------------
21862214

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"""
2+
Update case attributes returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
8+
from datadog_api_client.v2.model.case_attributes import CaseAttributes
9+
from datadog_api_client.v2.model.case_resource_type import CaseResourceType
10+
from datadog_api_client.v2.model.case_update_attributes import CaseUpdateAttributes
11+
from datadog_api_client.v2.model.case_update_attributes_attributes import CaseUpdateAttributesAttributes
12+
from datadog_api_client.v2.model.case_update_attributes_request import CaseUpdateAttributesRequest
13+
14+
# there is a valid "case" in the system
15+
CASE_ID = environ["CASE_ID"]
16+
17+
body = CaseUpdateAttributesRequest(
18+
data=CaseUpdateAttributes(
19+
attributes=CaseUpdateAttributesAttributes(
20+
attributes=CaseAttributes(
21+
service=[
22+
"web-store",
23+
"web-api",
24+
],
25+
env=[
26+
"test",
27+
],
28+
team=[
29+
"engineer",
30+
],
31+
),
32+
),
33+
type=CaseResourceType.CASE,
34+
),
35+
)
36+
37+
configuration = Configuration()
38+
with ApiClient(configuration) as api_client:
39+
api_instance = CaseManagementApi(api_client)
40+
response = api_instance.update_attributes(case_id=CASE_ID, body=body)
41+
42+
print(response)

src/datadog_api_client/v2/api/case_management_api.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from datadog_api_client.v2.model.project_create_request import ProjectCreateRequest
2525
from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest
2626
from datadog_api_client.v2.model.case_assign_request import CaseAssignRequest
27+
from datadog_api_client.v2.model.case_update_attributes_request import CaseUpdateAttributesRequest
2728
from datadog_api_client.v2.model.case_update_priority_request import CaseUpdatePriorityRequest
2829
from datadog_api_client.v2.model.case_update_status_request import CaseUpdateStatusRequest
2930

@@ -309,6 +310,32 @@ def __init__(self, api_client=None):
309310
api_client=api_client,
310311
)
311312

313+
self._update_attributes_endpoint = _Endpoint(
314+
settings={
315+
"response_type": (CaseResponse,),
316+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
317+
"endpoint_path": "/api/v2/cases/{case_id}/attributes",
318+
"operation_id": "update_attributes",
319+
"http_method": "POST",
320+
"version": "v2",
321+
},
322+
params_map={
323+
"case_id": {
324+
"required": True,
325+
"openapi_types": (str,),
326+
"attribute": "case_id",
327+
"location": "path",
328+
},
329+
"body": {
330+
"required": True,
331+
"openapi_types": (CaseUpdateAttributesRequest,),
332+
"location": "body",
333+
},
334+
},
335+
headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
336+
api_client=api_client,
337+
)
338+
312339
self._update_priority_endpoint = _Endpoint(
313340
settings={
314341
"response_type": (CaseResponse,),
@@ -644,6 +671,28 @@ def unassign_case(
644671

645672
return self._unassign_case_endpoint.call_with_http_info(**kwargs)
646673

674+
def update_attributes(
675+
self,
676+
case_id: str,
677+
body: CaseUpdateAttributesRequest,
678+
) -> CaseResponse:
679+
"""Update case attributes.
680+
681+
Update case attributes
682+
683+
:param case_id: Case's UUID or key
684+
:type case_id: str
685+
:param body: Case attributes update payload
686+
:type body: CaseUpdateAttributesRequest
687+
:rtype: CaseResponse
688+
"""
689+
kwargs: Dict[str, Any] = {}
690+
kwargs["case_id"] = case_id
691+
692+
kwargs["body"] = body
693+
694+
return self._update_attributes_endpoint.call_with_http_info(**kwargs)
695+
647696
def update_priority(
648697
self,
649698
case_id: str,

0 commit comments

Comments
 (0)