Skip to content

Commit f7607dc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d98173c of spec repo
1 parent 6ad3ac3 commit f7607dc

File tree

15 files changed

+746
-0
lines changed

15 files changed

+746
-0
lines changed

.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.

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28536,6 +28536,41 @@ datadog\_api\_client.v2.model.vulnerability\_type module
2853628536
:members:
2853728537
:show-inheritance:
2853828538

28539+
datadog\_api\_client.v2.model.watcher module
28540+
--------------------------------------------
28541+
28542+
.. automodule:: datadog_api_client.v2.model.watcher
28543+
:members:
28544+
:show-inheritance:
28545+
28546+
datadog\_api\_client.v2.model.watcher\_relationships module
28547+
-----------------------------------------------------------
28548+
28549+
.. automodule:: datadog_api_client.v2.model.watcher_relationships
28550+
:members:
28551+
:show-inheritance:
28552+
28553+
datadog\_api\_client.v2.model.watcher\_resource\_type module
28554+
------------------------------------------------------------
28555+
28556+
.. automodule:: datadog_api_client.v2.model.watcher_resource_type
28557+
:members:
28558+
:show-inheritance:
28559+
28560+
datadog\_api\_client.v2.model.watcher\_user\_relationship module
28561+
----------------------------------------------------------------
28562+
28563+
.. automodule:: datadog_api_client.v2.model.watcher_user_relationship
28564+
:members:
28565+
:show-inheritance:
28566+
28567+
datadog\_api\_client.v2.model.watchers\_response module
28568+
-------------------------------------------------------
28569+
28570+
.. automodule:: datadog_api_client.v2.model.watchers_response
28571+
:members:
28572+
:show-inheritance:
28573+
2853928574
datadog\_api\_client.v2.model.weekday module
2854028575
--------------------------------------------
2854128576

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get case watchers returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_case_watchers"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CaseManagementApi(api_client)
12+
response = api_instance.list_case_watchers(
13+
case_id="case_id",
14+
)
15+
16+
print(response)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Remove user as watcher returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["unwatch_case"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CaseManagementApi(api_client)
12+
api_instance.unwatch_case(
13+
case_id="case_id",
14+
user_id="user_id",
15+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Add user as watcher returns "Created" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["watch_case"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CaseManagementApi(api_client)
12+
api_instance.watch_case(
13+
case_id="case_id",
14+
user_id="user_id",
15+
)

src/datadog_api_client/configuration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ def __init__(
266266
"v2.get_open_api": False,
267267
"v2.list_apis": False,
268268
"v2.update_open_api": False,
269+
"v2.list_case_watchers": False,
270+
"v2.unwatch_case": False,
271+
"v2.watch_case": False,
269272
"v2.cancel_threat_hunting_job": False,
270273
"v2.convert_job_result_to_signal": False,
271274
"v2.delete_threat_hunting_job": False,

0 commit comments

Comments
 (0)