This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
Workflow Automation
Automate your teams operational processes with Datadog Workflow Automation.
List all instances of a given workflow. This API requires an application key scoped with the workflows_read permission.
This endpoint requires the workflows_read permission.
OAuth apps require the workflows_read authorization scope to access this endpoint.
Argumentos
Parámetros de ruta
Nombre
Tipo
Descripción
workflow_id [required]
string
The ID of the workflow.
Cadenas de consulta
Nombre
Tipo
Descripción
page[size]
integer
Size for a given page. The maximum allowed value is 100.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List workflow instances returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.WorkflowAutomationApi(configuration);constparams: v2.WorkflowAutomationApiListWorkflowInstancesRequest={workflowId:"ccf73164-1998-4785-a7a3-8d06c7e5f558",};apiInstance.listWorkflowInstances(params).then((data: v2.WorkflowListInstancesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Execute the given workflow. This API requires an application key scoped with the workflows_run permission.
This endpoint requires the workflows_run permission.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Execute a workflow returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.WorkflowAutomationApi(configuration);constparams: v2.WorkflowAutomationApiCreateWorkflowInstanceRequest={body:{meta:{payload:{input:"value",},},},workflowId:"ccf73164-1998-4785-a7a3-8d06c7e5f558",};apiInstance.createWorkflowInstance(params).then((data: v2.WorkflowInstanceCreateResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Get a specific execution of a given workflow. This API requires an application key scoped with the workflows_read permission.
This endpoint requires the workflows_read permission.
OAuth apps require the workflows_read authorization scope to access this endpoint.
"""
Get a workflow instance returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.workflow_automation_apiimportWorkflowAutomationApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=WorkflowAutomationApi(api_client)response=api_instance.get_workflow_instance(workflow_id="ccf73164-1998-4785-a7a3-8d06c7e5f558",instance_id="305a472b-71ab-4ce8-8f8d-75db635627b5",)print(response)
# Get a workflow instance returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::WorkflowAutomationAPI.newpapi_instance.get_workflow_instance("ccf73164-1998-4785-a7a3-8d06c7e5f558","305a472b-71ab-4ce8-8f8d-75db635627b5")
// Get a workflow instance returns "OK" response
packagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewWorkflowAutomationApi(apiClient)resp,r,err:=api.GetWorkflowInstance(ctx,"ccf73164-1998-4785-a7a3-8d06c7e5f558","305a472b-71ab-4ce8-8f8d-75db635627b5")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WorkflowAutomationApi.GetWorkflowInstance`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `WorkflowAutomationApi.GetWorkflowInstance`:\n%s\n",responseContent)}
// Get a workflow instance returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=WorkflowAutomationAPI::with_config(configuration);letresp=api.get_workflow_instance("ccf73164-1998-4785-a7a3-8d06c7e5f558".to_string(),"305a472b-71ab-4ce8-8f8d-75db635627b5".to_string(),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get a workflow instance returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.WorkflowAutomationApi(configuration);constparams: v2.WorkflowAutomationApiGetWorkflowInstanceRequest={workflowId:"ccf73164-1998-4785-a7a3-8d06c7e5f558",instanceId:"305a472b-71ab-4ce8-8f8d-75db635627b5",};apiInstance.getWorkflowInstance(params).then((data: v2.WorklflowGetInstanceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Cancels a specific execution of a given workflow. This API requires an application key scoped with the workflows_run permission.
This endpoint requires the workflows_run permission.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Cancel a workflow instance returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.WorkflowAutomationApi(configuration);constparams: v2.WorkflowAutomationApiCancelWorkflowInstanceRequest={workflowId:"ccf73164-1998-4785-a7a3-8d06c7e5f558",instanceId:"305a472b-71ab-4ce8-8f8d-75db635627b5",};apiInstance.cancelWorkflowInstance(params).then((data: v2.WorklflowCancelInstanceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));