Skip to content

Commit 8c85824

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add documentation for GET, POST, PATCH, and DELETE api/v2/incidents/incident_id/attachments endpoints (#2995)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 6c427f3 commit 8c85824

File tree

53 files changed

+1714
-1501
lines changed

Some content is hidden

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

53 files changed

+1714
-1501
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 338 additions & 307 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 140 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,76 @@ datadog\_api\_client.v2.model.attach\_jira\_issue\_request\_data\_relationships
12711271
:members:
12721272
:show-inheritance:
12731273

1274+
datadog\_api\_client.v2.model.attachment module
1275+
-----------------------------------------------
1276+
1277+
.. automodule:: datadog_api_client.v2.model.attachment
1278+
:members:
1279+
:show-inheritance:
1280+
1281+
datadog\_api\_client.v2.model.attachment\_array module
1282+
------------------------------------------------------
1283+
1284+
.. automodule:: datadog_api_client.v2.model.attachment_array
1285+
:members:
1286+
:show-inheritance:
1287+
1288+
datadog\_api\_client.v2.model.attachment\_data module
1289+
-----------------------------------------------------
1290+
1291+
.. automodule:: datadog_api_client.v2.model.attachment_data
1292+
:members:
1293+
:show-inheritance:
1294+
1295+
datadog\_api\_client.v2.model.attachment\_data\_attributes module
1296+
-----------------------------------------------------------------
1297+
1298+
.. automodule:: datadog_api_client.v2.model.attachment_data_attributes
1299+
:members:
1300+
:show-inheritance:
1301+
1302+
datadog\_api\_client.v2.model.attachment\_data\_attributes\_attachment module
1303+
-----------------------------------------------------------------------------
1304+
1305+
.. automodule:: datadog_api_client.v2.model.attachment_data_attributes_attachment
1306+
:members:
1307+
:show-inheritance:
1308+
1309+
datadog\_api\_client.v2.model.attachment\_data\_attributes\_attachment\_type module
1310+
-----------------------------------------------------------------------------------
1311+
1312+
.. automodule:: datadog_api_client.v2.model.attachment_data_attributes_attachment_type
1313+
:members:
1314+
:show-inheritance:
1315+
1316+
datadog\_api\_client.v2.model.attachment\_data\_relationships module
1317+
--------------------------------------------------------------------
1318+
1319+
.. automodule:: datadog_api_client.v2.model.attachment_data_relationships
1320+
:members:
1321+
:show-inheritance:
1322+
1323+
datadog\_api\_client.v2.model.attachment\_data\_relationships\_last\_modified\_by\_user module
1324+
----------------------------------------------------------------------------------------------
1325+
1326+
.. automodule:: datadog_api_client.v2.model.attachment_data_relationships_last_modified_by_user
1327+
:members:
1328+
:show-inheritance:
1329+
1330+
datadog\_api\_client.v2.model.attachment\_data\_relationships\_last\_modified\_by\_user\_data module
1331+
----------------------------------------------------------------------------------------------------
1332+
1333+
.. automodule:: datadog_api_client.v2.model.attachment_data_relationships_last_modified_by_user_data
1334+
:members:
1335+
:show-inheritance:
1336+
1337+
datadog\_api\_client.v2.model.attachment\_included module
1338+
---------------------------------------------------------
1339+
1340+
.. automodule:: datadog_api_client.v2.model.attachment_included
1341+
:members:
1342+
:show-inheritance:
1343+
12741344
datadog\_api\_client.v2.model.audit\_logs\_event module
12751345
-------------------------------------------------------
12761346

@@ -5128,6 +5198,34 @@ datadog\_api\_client.v2.model.create\_apps\_datastore\_response\_data module
51285198
:members:
51295199
:show-inheritance:
51305200

5201+
datadog\_api\_client.v2.model.create\_attachment\_request module
5202+
----------------------------------------------------------------
5203+
5204+
.. automodule:: datadog_api_client.v2.model.create_attachment_request
5205+
:members:
5206+
:show-inheritance:
5207+
5208+
datadog\_api\_client.v2.model.create\_attachment\_request\_data module
5209+
----------------------------------------------------------------------
5210+
5211+
.. automodule:: datadog_api_client.v2.model.create_attachment_request_data
5212+
:members:
5213+
:show-inheritance:
5214+
5215+
datadog\_api\_client.v2.model.create\_attachment\_request\_data\_attributes module
5216+
----------------------------------------------------------------------------------
5217+
5218+
.. automodule:: datadog_api_client.v2.model.create_attachment_request_data_attributes
5219+
:members:
5220+
:show-inheritance:
5221+
5222+
datadog\_api\_client.v2.model.create\_attachment\_request\_data\_attributes\_attachment module
5223+
----------------------------------------------------------------------------------------------
5224+
5225+
.. automodule:: datadog_api_client.v2.model.create_attachment_request_data_attributes_attachment
5226+
:members:
5227+
:show-inheritance:
5228+
51315229
datadog\_api\_client.v2.model.create\_case\_request\_array module
51325230
-----------------------------------------------------------------
51335231

@@ -10847,132 +10945,13 @@ datadog\_api\_client.v2.model.idp\_metadata\_form\_data module
1084710945
:members:
1084810946
:show-inheritance:
1084910947

10850-
datadog\_api\_client.v2.model.incident\_attachment\_attachment\_type module
10851-
---------------------------------------------------------------------------
10852-
10853-
.. automodule:: datadog_api_client.v2.model.incident_attachment_attachment_type
10854-
:members:
10855-
:show-inheritance:
10856-
10857-
datadog\_api\_client.v2.model.incident\_attachment\_attributes module
10858-
---------------------------------------------------------------------
10859-
10860-
.. automodule:: datadog_api_client.v2.model.incident_attachment_attributes
10861-
:members:
10862-
:show-inheritance:
10863-
10864-
datadog\_api\_client.v2.model.incident\_attachment\_data module
10865-
---------------------------------------------------------------
10866-
10867-
.. automodule:: datadog_api_client.v2.model.incident_attachment_data
10868-
:members:
10869-
:show-inheritance:
10870-
10871-
datadog\_api\_client.v2.model.incident\_attachment\_link\_attachment\_type module
10872-
---------------------------------------------------------------------------------
10873-
10874-
.. automodule:: datadog_api_client.v2.model.incident_attachment_link_attachment_type
10875-
:members:
10876-
:show-inheritance:
10877-
10878-
datadog\_api\_client.v2.model.incident\_attachment\_link\_attributes module
10879-
---------------------------------------------------------------------------
10880-
10881-
.. automodule:: datadog_api_client.v2.model.incident_attachment_link_attributes
10882-
:members:
10883-
:show-inheritance:
10884-
10885-
datadog\_api\_client.v2.model.incident\_attachment\_link\_attributes\_attachment\_object module
10886-
-----------------------------------------------------------------------------------------------
10887-
10888-
.. automodule:: datadog_api_client.v2.model.incident_attachment_link_attributes_attachment_object
10889-
:members:
10890-
:show-inheritance:
10891-
10892-
datadog\_api\_client.v2.model.incident\_attachment\_postmortem\_attachment\_type module
10893-
---------------------------------------------------------------------------------------
10894-
10895-
.. automodule:: datadog_api_client.v2.model.incident_attachment_postmortem_attachment_type
10896-
:members:
10897-
:show-inheritance:
10898-
10899-
datadog\_api\_client.v2.model.incident\_attachment\_postmortem\_attributes module
10900-
---------------------------------------------------------------------------------
10901-
10902-
.. automodule:: datadog_api_client.v2.model.incident_attachment_postmortem_attributes
10903-
:members:
10904-
:show-inheritance:
10905-
10906-
datadog\_api\_client.v2.model.incident\_attachment\_related\_object module
10907-
--------------------------------------------------------------------------
10908-
10909-
.. automodule:: datadog_api_client.v2.model.incident_attachment_related_object
10910-
:members:
10911-
:show-inheritance:
10912-
10913-
datadog\_api\_client.v2.model.incident\_attachment\_relationships module
10914-
------------------------------------------------------------------------
10915-
10916-
.. automodule:: datadog_api_client.v2.model.incident_attachment_relationships
10917-
:members:
10918-
:show-inheritance:
10919-
1092010948
datadog\_api\_client.v2.model.incident\_attachment\_type module
1092110949
---------------------------------------------------------------
1092210950

1092310951
.. automodule:: datadog_api_client.v2.model.incident_attachment_type
1092410952
:members:
1092510953
:show-inheritance:
1092610954

10927-
datadog\_api\_client.v2.model.incident\_attachment\_update\_attributes module
10928-
-----------------------------------------------------------------------------
10929-
10930-
.. automodule:: datadog_api_client.v2.model.incident_attachment_update_attributes
10931-
:members:
10932-
:show-inheritance:
10933-
10934-
datadog\_api\_client.v2.model.incident\_attachment\_update\_data module
10935-
-----------------------------------------------------------------------
10936-
10937-
.. automodule:: datadog_api_client.v2.model.incident_attachment_update_data
10938-
:members:
10939-
:show-inheritance:
10940-
10941-
datadog\_api\_client.v2.model.incident\_attachment\_update\_request module
10942-
--------------------------------------------------------------------------
10943-
10944-
.. automodule:: datadog_api_client.v2.model.incident_attachment_update_request
10945-
:members:
10946-
:show-inheritance:
10947-
10948-
datadog\_api\_client.v2.model.incident\_attachment\_update\_response module
10949-
---------------------------------------------------------------------------
10950-
10951-
.. automodule:: datadog_api_client.v2.model.incident_attachment_update_response
10952-
:members:
10953-
:show-inheritance:
10954-
10955-
datadog\_api\_client.v2.model.incident\_attachments\_postmortem\_attributes\_attachment\_object module
10956-
------------------------------------------------------------------------------------------------------
10957-
10958-
.. automodule:: datadog_api_client.v2.model.incident_attachments_postmortem_attributes_attachment_object
10959-
:members:
10960-
:show-inheritance:
10961-
10962-
datadog\_api\_client.v2.model.incident\_attachments\_response module
10963-
--------------------------------------------------------------------
10964-
10965-
.. automodule:: datadog_api_client.v2.model.incident_attachments_response
10966-
:members:
10967-
:show-inheritance:
10968-
10969-
datadog\_api\_client.v2.model.incident\_attachments\_response\_included\_item module
10970-
------------------------------------------------------------------------------------
10971-
10972-
.. automodule:: datadog_api_client.v2.model.incident_attachments_response_included_item
10973-
:members:
10974-
:show-inheritance:
10975-
1097610955
datadog\_api\_client.v2.model.incident\_create\_attributes module
1097710956
-----------------------------------------------------------------
1097810957

@@ -17714,6 +17693,34 @@ datadog\_api\_client.v2.model.partial\_application\_key\_response module
1771417693
:members:
1771517694
:show-inheritance:
1771617695

17696+
datadog\_api\_client.v2.model.patch\_attachment\_request module
17697+
---------------------------------------------------------------
17698+
17699+
.. automodule:: datadog_api_client.v2.model.patch_attachment_request
17700+
:members:
17701+
:show-inheritance:
17702+
17703+
datadog\_api\_client.v2.model.patch\_attachment\_request\_data module
17704+
---------------------------------------------------------------------
17705+
17706+
.. automodule:: datadog_api_client.v2.model.patch_attachment_request_data
17707+
:members:
17708+
:show-inheritance:
17709+
17710+
datadog\_api\_client.v2.model.patch\_attachment\_request\_data\_attributes module
17711+
---------------------------------------------------------------------------------
17712+
17713+
.. automodule:: datadog_api_client.v2.model.patch_attachment_request_data_attributes
17714+
:members:
17715+
:show-inheritance:
17716+
17717+
datadog\_api\_client.v2.model.patch\_attachment\_request\_data\_attributes\_attachment module
17718+
---------------------------------------------------------------------------------------------
17719+
17720+
.. automodule:: datadog_api_client.v2.model.patch_attachment_request_data_attributes_attachment
17721+
:members:
17722+
:show-inheritance:
17723+
1771717724
datadog\_api\_client.v2.model.patch\_incident\_notification\_template\_request module
1771817725
-------------------------------------------------------------------------------------
1771917726

@@ -25358,6 +25365,13 @@ datadog\_api\_client.v2.model.user module
2535825365
:members:
2535925366
:show-inheritance:
2536025367

25368+
datadog\_api\_client.v2.model.user140420082644000 module
25369+
--------------------------------------------------------
25370+
25371+
.. automodule:: datadog_api_client.v2.model.user140420082644000
25372+
:members:
25373+
:show-inheritance:
25374+
2536125375
datadog\_api\_client.v2.model.user\_attributes module
2536225376
-----------------------------------------------------
2536325377

@@ -25624,6 +25638,13 @@ datadog\_api\_client.v2.model.user\_teams\_response module
2562425638
:members:
2562525639
:show-inheritance:
2562625640

25641+
datadog\_api\_client.v2.model.user\_type module
25642+
-----------------------------------------------
25643+
25644+
.. automodule:: datadog_api_client.v2.model.user_type
25645+
:members:
25646+
:show-inheritance:
25647+
2562725648
datadog\_api\_client.v2.model.user\_update\_attributes module
2562825649
-------------------------------------------------------------
2562925650

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""
2+
Create incident attachment returns "Created" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.incidents_api import IncidentsApi
7+
from datadog_api_client.v2.model.attachment_data_attributes_attachment_type import (
8+
AttachmentDataAttributesAttachmentType,
9+
)
10+
from datadog_api_client.v2.model.create_attachment_request import CreateAttachmentRequest
11+
from datadog_api_client.v2.model.create_attachment_request_data import CreateAttachmentRequestData
12+
from datadog_api_client.v2.model.create_attachment_request_data_attributes import CreateAttachmentRequestDataAttributes
13+
from datadog_api_client.v2.model.create_attachment_request_data_attributes_attachment import (
14+
CreateAttachmentRequestDataAttributesAttachment,
15+
)
16+
from datadog_api_client.v2.model.incident_attachment_type import IncidentAttachmentType
17+
18+
body = CreateAttachmentRequest(
19+
data=CreateAttachmentRequestData(
20+
attributes=CreateAttachmentRequestDataAttributes(
21+
attachment=CreateAttachmentRequestDataAttributesAttachment(
22+
document_url="https://app.datadoghq.com/notebook/123/Postmortem-IR-123",
23+
title="Postmortem-IR-123",
24+
),
25+
attachment_type=AttachmentDataAttributesAttachmentType.POSTMORTEM,
26+
),
27+
id="00000000-0000-0000-0000-000000000000",
28+
type=IncidentAttachmentType.INCIDENT_ATTACHMENTS,
29+
),
30+
)
31+
32+
configuration = Configuration()
33+
configuration.unstable_operations["create_incident_attachment"] = True
34+
with ApiClient(configuration) as api_client:
35+
api_instance = IncidentsApi(api_client)
36+
response = api_instance.create_incident_attachment(incident_id="incident_id", body=body)
37+
38+
print(response)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Delete incident attachment returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.incidents_api import IncidentsApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["delete_incident_attachment"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = IncidentsApi(api_client)
12+
api_instance.delete_incident_attachment(
13+
incident_id="incident_id",
14+
attachment_id="00000000-0000-0000-0000-000000000002",
15+
)

examples/v2/incidents/ListIncidentAttachments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get a list of attachments returns "OK" response
2+
List incident attachments returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

examples/v2/incidents/ListIncidentAttachments_2457735435.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)