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
420 changes: 420 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28970,6 +28970,104 @@ datadog\_api\_client.v2.model.workflow\_data\_update\_attributes module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.workflow\_favorite\_request module
----------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_favorite\_request\_attributes module
----------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_favorite\_request\_data module
----------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_favorite\_request\_type module
----------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_config module
--------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_connection module
------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_request module
---------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_request\_attributes module
---------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_request\_data module
---------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_request\_type module
---------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_response module
----------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_response\_attributes module
----------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_response\_data module
----------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_headless\_execution\_response\_type module
----------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_instance\_create\_meta module
---------------------------------------------------------------------

Expand Down Expand Up @@ -29054,6 +29152,34 @@ datadog\_api\_client.v2.model.workflow\_user\_relationship\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.workflow\_webhook\_execution\_response module
---------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_webhook\_execution\_response\_attributes module
---------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_webhook\_execution\_response\_data module
---------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.workflow\_webhook\_execution\_response\_type module
---------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.worklflow\_cancel\_instance\_response module
--------------------------------------------------------------------------

Expand Down
42 changes: 42 additions & 0 deletions examples/v2/workflow-automation/ExecuteWorkflowFromTemplate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""
Execute a workflow from a template returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
from datadog_api_client.v2.model.workflow_headless_execution_config import WorkflowHeadlessExecutionConfig
from datadog_api_client.v2.model.workflow_headless_execution_connection import WorkflowHeadlessExecutionConnection
from datadog_api_client.v2.model.workflow_headless_execution_request import WorkflowHeadlessExecutionRequest
from datadog_api_client.v2.model.workflow_headless_execution_request_attributes import (
WorkflowHeadlessExecutionRequestAttributes,
)
from datadog_api_client.v2.model.workflow_headless_execution_request_data import WorkflowHeadlessExecutionRequestData
from datadog_api_client.v2.model.workflow_headless_execution_request_type import WorkflowHeadlessExecutionRequestType
from uuid import UUID

body = WorkflowHeadlessExecutionRequest(
data=WorkflowHeadlessExecutionRequestData(
attributes=WorkflowHeadlessExecutionRequestAttributes(
config=WorkflowHeadlessExecutionConfig(
connections=[
WorkflowHeadlessExecutionConnection(
connection_id=UUID("11111111-1111-1111-1111-111111111111"),
label="INTEGRATION_DATADOG",
),
],
inputs=dict(),
),
template_id="template-789",
),
id="1234",
type=WorkflowHeadlessExecutionRequestType.WORKFLOW_HEADLESS_EXECUTION_REQUEST,
),
)

configuration = Configuration()
configuration.unstable_operations["execute_workflow_from_template"] = True
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.execute_workflow_from_template(parent_id="parent_id", body=body)

print(response)
20 changes: 20 additions & 0 deletions examples/v2/workflow-automation/ExecuteWorkflowFromWebhook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Execute a workflow from a webhook returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
from uuid import UUID

configuration = Configuration()
configuration.unstable_operations["execute_workflow_from_webhook"] = True
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.execute_workflow_from_webhook(
workflow_id="workflow_id",
org_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
x_hub_signature_256="sha256=abcdef123456...",
user_agent="GitHub-Hookshot/abc123",
)

print(response)
25 changes: 25 additions & 0 deletions examples/v2/workflow-automation/UpdateWorkflowFavorite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Update workflow favorite status returns "No Content" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
from datadog_api_client.v2.model.workflow_favorite_request import WorkflowFavoriteRequest
from datadog_api_client.v2.model.workflow_favorite_request_attributes import WorkflowFavoriteRequestAttributes
from datadog_api_client.v2.model.workflow_favorite_request_data import WorkflowFavoriteRequestData
from datadog_api_client.v2.model.workflow_favorite_request_type import WorkflowFavoriteRequestType

body = WorkflowFavoriteRequest(
data=WorkflowFavoriteRequestData(
attributes=WorkflowFavoriteRequestAttributes(
favorite=True,
),
type=WorkflowFavoriteRequestType.WORKFLOW_FAVORITE_REQUEST,
),
)

configuration = Configuration()
configuration.unstable_operations["update_workflow_favorite"] = True
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
api_instance.update_workflow_favorite(workflow_id="workflow_id", body=body)
3 changes: 3 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ def __init__(
"v2.update_incident_team": False,
"v2.search_flaky_tests": False,
"v2.update_flaky_tests": False,
"v2.execute_workflow_from_template": False,
"v2.execute_workflow_from_webhook": False,
"v2.update_workflow_favorite": False,
}
)

Expand Down
Loading