Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
783 changes: 783 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ datadog\_api\_client.v2.api.agentless\_scanning\_api module
:members:
:show-inheritance:

datadog\_api\_client.v2.api.annotations\_api module
---------------------------------------------------

.. automodule:: datadog_api_client.v2.api.annotations_api
:members:
:show-inheritance:

datadog\_api\_client.v2.api.api\_management\_api module
-------------------------------------------------------

Expand Down
133 changes: 133 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,48 @@ datadog\_api\_client.v2.model.annotation module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_attributes module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_color module
------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_color
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_create\_attributes module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_create_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_create\_data module
-------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_create_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_create\_request module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_create_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_data module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_display module
--------------------------------------------------------

Expand All @@ -403,13 +445,69 @@ datadog\_api\_client.v2.model.annotation\_display\_bounds module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_in\_page module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_in_page
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_kind module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_kind
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_markdown\_text\_annotation module
---------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_markdown_text_annotation
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_response module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_type module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_update\_data module
-------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_update_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotation\_update\_request module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotation_update_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotations\_in\_page\_map module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotations_in_page_map
:members:
:show-inheritance:

datadog\_api\_client.v2.model.annotations\_response module
----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.annotations_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.anonymize\_user\_error module
-----------------------------------------------------------

Expand Down Expand Up @@ -25736,6 +25834,34 @@ datadog\_api\_client.v2.model.overwrite\_allocations\_request module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.page\_annotations\_attributes module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.page_annotations_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.page\_annotations\_data module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.page_annotations_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.page\_annotations\_response module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.page_annotations_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.page\_annotations\_type module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.page_annotations_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.page\_urgency module
--------------------------------------------------

Expand Down Expand Up @@ -39260,6 +39386,13 @@ datadog\_api\_client.v2.model.weekday module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.widget\_annotations\_map module
-------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.widget_annotations_map
:members:
:show-inheritance:

datadog\_api\_client.v2.model.widget\_attributes module
-------------------------------------------------------

Expand Down
37 changes: 37 additions & 0 deletions examples/v2/annotations/CreateAnnotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""
Create an annotation returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.annotations_api import AnnotationsApi
from datadog_api_client.v2.model.annotation_color import AnnotationColor
from datadog_api_client.v2.model.annotation_create_attributes import AnnotationCreateAttributes
from datadog_api_client.v2.model.annotation_create_data import AnnotationCreateData
from datadog_api_client.v2.model.annotation_create_request import AnnotationCreateRequest
from datadog_api_client.v2.model.annotation_kind import AnnotationKind
from datadog_api_client.v2.model.annotation_type import AnnotationType

body = AnnotationCreateRequest(
data=AnnotationCreateData(
attributes=AnnotationCreateAttributes(
color=AnnotationColor.BLUE,
description="Deployed v2.3.1 to production.",
end_time=1704070800000,
page_id="dashboard:abc-def-xyz",
start_time=1704067200000,
type=AnnotationKind.POINT_IN_TIME,
widget_ids=[
"1234567890",
],
),
type=AnnotationType.ANNOTATION,
),
)

configuration = Configuration()
configuration.unstable_operations["create_annotation"] = True
with ApiClient(configuration) as api_client:
api_instance = AnnotationsApi(api_client)
response = api_instance.create_annotation(body=body)

print(response)
15 changes: 15 additions & 0 deletions examples/v2/annotations/DeleteAnnotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Delete an annotation returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.annotations_api import AnnotationsApi
from uuid import UUID

configuration = Configuration()
configuration.unstable_operations["delete_annotation"] = True
with ApiClient(configuration) as api_client:
api_instance = AnnotationsApi(api_client)
api_instance.delete_annotation(
annotation_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
)
18 changes: 18 additions & 0 deletions examples/v2/annotations/GetPageAnnotations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Get annotations for a page returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.annotations_api import AnnotationsApi

configuration = Configuration()
configuration.unstable_operations["get_page_annotations"] = True
with ApiClient(configuration) as api_client:
api_instance = AnnotationsApi(api_client)
response = api_instance.get_page_annotations(
page_id="page_id",
start_time=9223372036854775807,
end_time=9223372036854775807,
)

print(response)
18 changes: 18 additions & 0 deletions examples/v2/annotations/ListAnnotations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
List annotations returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.annotations_api import AnnotationsApi

configuration = Configuration()
configuration.unstable_operations["list_annotations"] = True
with ApiClient(configuration) as api_client:
api_instance = AnnotationsApi(api_client)
response = api_instance.list_annotations(
page_id="page_id",
start_time=9223372036854775807,
end_time=9223372036854775807,
)

print(response)
39 changes: 39 additions & 0 deletions examples/v2/annotations/UpdateAnnotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""
Update an annotation returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.annotations_api import AnnotationsApi
from datadog_api_client.v2.model.annotation_color import AnnotationColor
from datadog_api_client.v2.model.annotation_create_attributes import AnnotationCreateAttributes
from datadog_api_client.v2.model.annotation_kind import AnnotationKind
from datadog_api_client.v2.model.annotation_type import AnnotationType
from datadog_api_client.v2.model.annotation_update_data import AnnotationUpdateData
from datadog_api_client.v2.model.annotation_update_request import AnnotationUpdateRequest
from uuid import UUID

body = AnnotationUpdateRequest(
data=AnnotationUpdateData(
attributes=AnnotationCreateAttributes(
color=AnnotationColor.BLUE,
description="Deployed v2.3.1 to production.",
end_time=1704070800000,
page_id="dashboard:abc-def-xyz",
start_time=1704067200000,
type=AnnotationKind.POINT_IN_TIME,
widget_ids=[
"1234567890",
],
),
id=UUID("00000000-0000-0000-0000-000000000000"),
type=AnnotationType.ANNOTATION,
),
)

configuration = Configuration()
configuration.unstable_operations["update_annotation"] = True
with ApiClient(configuration) as api_client:
api_instance = AnnotationsApi(api_client)
response = api_instance.update_annotation(annotation_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)

print(response)
5 changes: 5 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ def __init__(
"v2.update_llm_obs_dataset_records": False,
"v2.update_llm_obs_experiment": False,
"v2.update_llm_obs_project": False,
"v2.create_annotation": False,
"v2.delete_annotation": False,
"v2.get_page_annotations": False,
"v2.list_annotations": False,
"v2.update_annotation": False,
"v2.anonymize_users": False,
"v2.validate": False,
"v2.create_open_api": False,
Expand Down
Loading
Loading