From ff1692da41cf0613c4cebbe02756fad6aad89faa Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 16 Jun 2026 19:30:37 +0000 Subject: [PATCH] Regenerate client from commit 65561ac of spec repo --- .generator/schemas/v2/openapi.yaml | 195 ++++++++++++++ .../v2_workflow-automation_ListWorkflows.rs | 18 ++ ...kflow-automation_ListWorkflows_71111569.rs | 25 ++ src/datadogV2/api/api_workflow_automation.rs | 250 ++++++++++++++++++ src/datadogV2/model/mod.rs | 22 +- .../model/model_list_workflows_response.rs | 122 +++++++++ .../model_list_workflows_response_meta.rs | 105 ++++++++ ...model_list_workflows_response_meta_page.rs | 124 +++++++++ .../model/model_workflow_list_item.rs | 155 +++++++++++ .../model_workflow_list_item_attributes.rs | 195 ++++++++++++++ ...returns-OK-response-with-pagination.frozen | 1 + ...s-returns-OK-response-with-pagination.json | 33 +++ .../List-workflows-returns-OK-response.frozen | 1 + .../List-workflows-returns-OK-response.json | 91 +++++++ tests/scenarios/features/v2/undo.json | 6 + .../features/v2/workflow_automation.feature | 22 ++ tests/scenarios/function_mappings.rs | 125 +++++++++ 17 files changed, 1484 insertions(+), 6 deletions(-) create mode 100644 examples/v2_workflow-automation_ListWorkflows.rs create mode 100644 examples/v2_workflow-automation_ListWorkflows_71111569.rs create mode 100644 src/datadogV2/model/model_list_workflows_response.rs create mode 100644 src/datadogV2/model/model_list_workflows_response_meta.rs create mode 100644 src/datadogV2/model/model_list_workflows_response_meta_page.rs create mode 100644 src/datadogV2/model/model_workflow_list_item.rs create mode 100644 src/datadogV2/model/model_workflow_list_item_attributes.rs create mode 100644 tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.frozen create mode 100644 tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.json create mode 100644 tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.frozen create mode 100644 tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 842f6f5c46..607e2e287b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -55232,6 +55232,35 @@ components: required: - data type: object + ListWorkflowsResponse: + description: The response object for a listing workflows request. + properties: + data: + description: A list of workflows. + items: + $ref: "#/components/schemas/WorkflowListItem" + type: array + meta: + $ref: "#/components/schemas/ListWorkflowsResponseMeta" + type: object + ListWorkflowsResponseMeta: + description: Metadata for a List Workflows response. + properties: + page: + $ref: "#/components/schemas/ListWorkflowsResponseMetaPage" + type: object + ListWorkflowsResponseMetaPage: + description: Pagination metadata for a List Workflows response. + properties: + totalCount: + description: The total number of workflows in the organization. + format: int64 + type: integer + totalFilteredCount: + description: The total number of workflows matching the applied filters. + format: int64 + type: integer + type: object Log: description: Object description of a log after being processed and stored by Datadog. properties: @@ -106572,6 +106601,58 @@ components: format: int64 type: integer type: object + WorkflowListItem: + description: A workflow returned by the list workflows endpoint. + properties: + attributes: + $ref: "#/components/schemas/WorkflowListItemAttributes" + id: + description: The workflow identifier. + readOnly: true + type: string + relationships: + $ref: "#/components/schemas/WorkflowDataRelationships" + type: + $ref: "#/components/schemas/WorkflowDataType" + required: + - type + - attributes + type: object + WorkflowListItemAttributes: + description: Attributes of a workflow returned in a list response. + properties: + createdAt: + description: When the workflow was created. + format: date-time + readOnly: true + type: string + description: + description: Description of the workflow. + type: string + name: + description: Name of the workflow. + example: "My Workflow" + type: string + published: + description: Whether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published. + type: boolean + spec: + $ref: "#/components/schemas/Spec" + nullable: true + tags: + description: Tags of the workflow. + items: + description: A tag string in `key:value` format. + type: string + type: array + updatedAt: + description: When the workflow was last updated. + format: date-time + readOnly: true + type: string + required: + - name + type: object WorkflowTriggerWrapper: description: "Schema for a Workflow-based trigger." properties: @@ -188773,6 +188854,120 @@ paths: - manage_log_reports - product_analytics_saved_widgets_write /api/v2/workflows: + get: + description: List all workflows in your organization. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). + operationId: ListWorkflows + parameters: + - description: The maximum number of workflows to return per page. + example: 50 + in: query + name: limit + required: false + schema: + default: 50 + format: int64 + type: integer + - description: The page number to return, starting from 0. + example: 0 + in: query + name: page + required: false + schema: + default: 0 + format: int64 + type: integer + - description: "The sort order for the returned workflows. Provide a comma-separated list of fields, each optionally prefixed with `-` for descending order. Supported fields are `name`, `createdAt`, `updatedAt`, `creatorName`, `ownerName`, and `lastExecutedAt`." + example: "-updatedAt" + in: query + name: sort + required: false + schema: + type: string + - description: "A search query used to filter the returned workflows. The query performs a case-insensitive substring match against each workflow's name, creator name, and handle. If the query contains a colon (for example, `team:infra`), the query is treated as a `key:value` tag filter." + example: deploy + in: query + name: filter[query] + required: false + schema: + type: string + - description: Filters the returned workflows by one or more trigger types, such as `monitor`, `schedule`, or `githubWebhook`. To specify the multiple types, repeat this parameter. + example: + - monitor + explode: true + in: query + name: filter[triggerIds] + required: false + schema: + items: + type: string + type: array + - description: Whether to include unpublished workflows in the response. + in: query + name: filter[includeUnpublished] + required: false + schema: + default: false + type: boolean + - description: Whether to include the full spec of each workflow in the response. When `false` (the default), each workflow's `spec` is returned as `null`. + in: query + name: filter[includeSpecs] + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + createdAt: "2024-01-01T00:00:00+00:00" + description: A sample workflow. + name: Example Workflow + published: true + spec: {} + tags: + - team:infra + updatedAt: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000002 + relationships: + creator: + data: + id: 00000000-0000-0000-0000-000000000009 + type: users + owner: + data: + id: 00000000-0000-0000-0000-000000000009 + type: users + type: workflows + meta: + page: + totalCount: 1 + totalFilteredCount: 1 + schema: + $ref: "#/components/schemas/ListWorkflowsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List workflows + tags: + - Workflow Automation + x-pagination: + limitParam: limit + pageParam: page + pageStart: 0 + resultsPath: data + "x-permission": + operator: OR + permissions: + - workflows_read post: description: Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). operationId: CreateWorkflow diff --git a/examples/v2_workflow-automation_ListWorkflows.rs b/examples/v2_workflow-automation_ListWorkflows.rs new file mode 100644 index 0000000000..327f1bed80 --- /dev/null +++ b/examples/v2_workflow-automation_ListWorkflows.rs @@ -0,0 +1,18 @@ +// List workflows returns "OK" response +use datadog_api_client::datadog; +use datadog_api_client::datadogV2::api_workflow_automation::ListWorkflowsOptionalParams; +use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI; + +#[tokio::main] +async fn main() { + let configuration = datadog::Configuration::new(); + let api = WorkflowAutomationAPI::with_config(configuration); + let resp = api + .list_workflows(ListWorkflowsOptionalParams::default()) + .await; + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } +} diff --git a/examples/v2_workflow-automation_ListWorkflows_71111569.rs b/examples/v2_workflow-automation_ListWorkflows_71111569.rs new file mode 100644 index 0000000000..7475d6766a --- /dev/null +++ b/examples/v2_workflow-automation_ListWorkflows_71111569.rs @@ -0,0 +1,25 @@ +// List workflows returns "OK" response with pagination +use datadog_api_client::datadog; +use datadog_api_client::datadogV2::api_workflow_automation::ListWorkflowsOptionalParams; +use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI; +use futures_util::pin_mut; +use futures_util::stream::StreamExt; + +#[tokio::main] +async fn main() { + let configuration = datadog::Configuration::new(); + let api = WorkflowAutomationAPI::with_config(configuration); + let response = api.list_workflows_with_pagination( + ListWorkflowsOptionalParams::default() + .filter_query("Example-Workflow-Automation".to_string()) + .limit(2), + ); + pin_mut!(response); + while let Some(resp) = response.next().await { + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } + } +} diff --git a/src/datadogV2/api/api_workflow_automation.rs b/src/datadogV2/api/api_workflow_automation.rs index 3e79651e7b..2d855ac8cd 100644 --- a/src/datadogV2/api/api_workflow_automation.rs +++ b/src/datadogV2/api/api_workflow_automation.rs @@ -2,10 +2,12 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2019-Present Datadog, Inc. use crate::datadog; +use async_stream::try_stream; use flate2::{ write::{GzEncoder, ZlibEncoder}, Compression, }; +use futures_core::stream::Stream; use reqwest::header::{HeaderMap, HeaderValue}; use serde::{Deserialize, Serialize}; use std::io::Write; @@ -33,6 +35,64 @@ impl ListWorkflowInstancesOptionalParams { } } +/// ListWorkflowsOptionalParams is a struct for passing parameters to the method [`WorkflowAutomationAPI::list_workflows`] +#[non_exhaustive] +#[derive(Clone, Default, Debug)] +pub struct ListWorkflowsOptionalParams { + /// The maximum number of workflows to return per page. + pub limit: Option, + /// The page number to return, starting from 0. + pub page: Option, + /// The sort order for the returned workflows. Provide a comma-separated list of fields, each optionally prefixed with `-` for descending order. Supported fields are `name`, `createdAt`, `updatedAt`, `creatorName`, `ownerName`, and `lastExecutedAt`. + pub sort: Option, + /// A search query used to filter the returned workflows. The query performs a case-insensitive substring match against each workflow's name, creator name, and handle. If the query contains a colon (for example, `team:infra`), the query is treated as a `key:value` tag filter. + pub filter_query: Option, + /// Filters the returned workflows by one or more trigger types, such as `monitor`, `schedule`, or `githubWebhook`. To specify the multiple types, repeat this parameter. + pub filter_trigger_ids: Option>, + /// Whether to include unpublished workflows in the response. + pub filter_include_unpublished: Option, + /// Whether to include the full spec of each workflow in the response. When `false` (the default), each workflow's `spec` is returned as `null`. + pub filter_include_specs: Option, +} + +impl ListWorkflowsOptionalParams { + /// The maximum number of workflows to return per page. + pub fn limit(mut self, value: i64) -> Self { + self.limit = Some(value); + self + } + /// The page number to return, starting from 0. + pub fn page(mut self, value: i64) -> Self { + self.page = Some(value); + self + } + /// The sort order for the returned workflows. Provide a comma-separated list of fields, each optionally prefixed with `-` for descending order. Supported fields are `name`, `createdAt`, `updatedAt`, `creatorName`, `ownerName`, and `lastExecutedAt`. + pub fn sort(mut self, value: String) -> Self { + self.sort = Some(value); + self + } + /// A search query used to filter the returned workflows. The query performs a case-insensitive substring match against each workflow's name, creator name, and handle. If the query contains a colon (for example, `team:infra`), the query is treated as a `key:value` tag filter. + pub fn filter_query(mut self, value: String) -> Self { + self.filter_query = Some(value); + self + } + /// Filters the returned workflows by one or more trigger types, such as `monitor`, `schedule`, or `githubWebhook`. To specify the multiple types, repeat this parameter. + pub fn filter_trigger_ids(mut self, value: Vec) -> Self { + self.filter_trigger_ids = Some(value); + self + } + /// Whether to include unpublished workflows in the response. + pub fn filter_include_unpublished(mut self, value: bool) -> Self { + self.filter_include_unpublished = Some(value); + self + } + /// Whether to include the full spec of each workflow in the response. When `false` (the default), each workflow's `spec` is returned as `null`. + pub fn filter_include_specs(mut self, value: bool) -> Self { + self.filter_include_specs = Some(value); + self + } +} + /// CancelWorkflowInstanceError is a struct for typed errors of method [`WorkflowAutomationAPI::cancel_workflow_instance`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -89,6 +149,14 @@ pub enum ListWorkflowInstancesError { UnknownValue(serde_json::Value), } +/// ListWorkflowsError is a struct for typed errors of method [`WorkflowAutomationAPI::list_workflows`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListWorkflowsError { + APIErrorResponse(crate::datadogV2::model::APIErrorResponse), + UnknownValue(serde_json::Value), +} + /// UpdateWorkflowError is a struct for typed errors of method [`WorkflowAutomationAPI::update_workflow`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1036,6 +1104,188 @@ impl WorkflowAutomationAPI { } } + /// List all workflows in your organization. This API requires a [registered application key](). Alternatively, you can configure these permissions [in the UI](). + pub async fn list_workflows( + &self, + params: ListWorkflowsOptionalParams, + ) -> Result> + { + match self.list_workflows_with_http_info(params).await { + Ok(response_content) => { + if let Some(e) = response_content.entity { + Ok(e) + } else { + Err(datadog::Error::Serde(serde::de::Error::custom( + "response content was None", + ))) + } + } + Err(err) => Err(err), + } + } + + pub fn list_workflows_with_pagination( + &self, + mut params: ListWorkflowsOptionalParams, + ) -> impl Stream< + Item = Result< + crate::datadogV2::model::WorkflowListItem, + datadog::Error, + >, + > + '_ { + try_stream! { + let mut page_size: i64 = 50; + if params.limit.is_none() { + params.limit = Some(page_size); + } else { + page_size = params.limit.unwrap().clone(); + } + if params.page.is_none() { + params.page = Some(0); + } + loop { + let resp = self.list_workflows(params.clone()).await?; + let Some(data) = resp.data else { break }; + + let r = data; + let count = r.len(); + for team in r { + yield team; + } + if count < page_size as usize { + break; + } + params.page = Some(params.page.unwrap() + 1); + } + } + } + + /// List all workflows in your organization. This API requires a [registered application key](). Alternatively, you can configure these permissions [in the UI](). + pub async fn list_workflows_with_http_info( + &self, + params: ListWorkflowsOptionalParams, + ) -> Result< + datadog::ResponseContent, + datadog::Error, + > { + let local_configuration = &self.config; + let operation_id = "v2.list_workflows"; + + // unbox and build optional parameters + let limit = params.limit; + let page = params.page; + let sort = params.sort; + let filter_query = params.filter_query; + let filter_trigger_ids = params.filter_trigger_ids; + let filter_include_unpublished = params.filter_include_unpublished; + let filter_include_specs = params.filter_include_specs; + + let local_client = &self.client; + + let local_uri_str = format!( + "{}/api/v2/workflows", + local_configuration.get_operation_host(operation_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_query_param) = limit { + local_req_builder = + local_req_builder.query(&[("limit", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = page { + local_req_builder = + local_req_builder.query(&[("page", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); + }; + if let Some(ref local) = filter_trigger_ids { + for param in local { + local_req_builder = + local_req_builder.query(&[("filter[triggerIds]", ¶m.to_string())]); + } + }; + if let Some(ref local_query_param) = filter_include_unpublished { + local_req_builder = local_req_builder + .query(&[("filter[includeUnpublished]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_include_specs { + local_req_builder = local_req_builder + .query(&[("filter[includeSpecs]", &local_query_param.to_string())]); + }; + + // build headers + let mut headers = HeaderMap::new(); + headers.insert("Accept", HeaderValue::from_static("application/json")); + + // build user agent + match HeaderValue::from_str(local_configuration.user_agent.as_str()) { + Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), + Err(e) => { + log::warn!("Failed to parse user agent header: {e}, falling back to default"); + headers.insert( + reqwest::header::USER_AGENT, + HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), + ) + } + }; + + // build auth + if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { + headers.insert( + "DD-API-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-API-KEY header"), + ); + }; + if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { + headers.insert( + "DD-APPLICATION-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-APPLICATION-KEY header"), + ); + }; + + local_req_builder = local_req_builder.headers(headers); + let local_req = local_req_builder.build()?; + log::debug!("request content: {:?}", local_req.body()); + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + log::debug!("response content: {}", local_content); + + if !local_status.is_client_error() && !local_status.is_server_error() { + match serde_json::from_str::( + &local_content, + ) { + Ok(e) => { + return Ok(datadog::ResponseContent { + status: local_status, + content: local_content, + entity: Some(e), + }) + } + Err(e) => return Err(datadog::Error::Serde(e)), + }; + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = datadog::ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(datadog::Error::ResponseError(local_error)) + } + } + /// Update a workflow by ID. This API requires a [registered application key](). Alternatively, you can configure these permissions [in the UI](). pub async fn update_workflow( &self, diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index 388195ef8a..4ef2139ad3 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -12886,12 +12886,12 @@ pub mod model_create_or_update_widget_request_attributes; pub use self::model_create_or_update_widget_request_attributes::CreateOrUpdateWidgetRequestAttributes; pub mod model_widget_response; pub use self::model_widget_response::WidgetResponse; -pub mod model_create_workflow_request; -pub use self::model_create_workflow_request::CreateWorkflowRequest; -pub mod model_workflow_data; -pub use self::model_workflow_data::WorkflowData; -pub mod model_workflow_data_attributes; -pub use self::model_workflow_data_attributes::WorkflowDataAttributes; +pub mod model_list_workflows_response; +pub use self::model_list_workflows_response::ListWorkflowsResponse; +pub mod model_workflow_list_item; +pub use self::model_workflow_list_item::WorkflowListItem; +pub mod model_workflow_list_item_attributes; +pub use self::model_workflow_list_item_attributes::WorkflowListItemAttributes; pub mod model_spec; pub use self::model_spec::Spec; pub mod model_annotation; @@ -13022,6 +13022,16 @@ pub mod model_workflow_user_relationship_type; pub use self::model_workflow_user_relationship_type::WorkflowUserRelationshipType; pub mod model_workflow_data_type; pub use self::model_workflow_data_type::WorkflowDataType; +pub mod model_list_workflows_response_meta; +pub use self::model_list_workflows_response_meta::ListWorkflowsResponseMeta; +pub mod model_list_workflows_response_meta_page; +pub use self::model_list_workflows_response_meta_page::ListWorkflowsResponseMetaPage; +pub mod model_create_workflow_request; +pub use self::model_create_workflow_request::CreateWorkflowRequest; +pub mod model_workflow_data; +pub use self::model_workflow_data::WorkflowData; +pub mod model_workflow_data_attributes; +pub use self::model_workflow_data_attributes::WorkflowDataAttributes; pub mod model_create_workflow_response; pub use self::model_create_workflow_response::CreateWorkflowResponse; pub mod model_get_workflow_response; diff --git a/src/datadogV2/model/model_list_workflows_response.rs b/src/datadogV2/model/model_list_workflows_response.rs new file mode 100644 index 0000000000..0f7909fc18 --- /dev/null +++ b/src/datadogV2/model/model_list_workflows_response.rs @@ -0,0 +1,122 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// The response object for a listing workflows request. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ListWorkflowsResponse { + /// A list of workflows. + #[serde(rename = "data")] + pub data: Option>, + /// Metadata for a List Workflows response. + #[serde(rename = "meta")] + pub meta: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ListWorkflowsResponse { + pub fn new() -> ListWorkflowsResponse { + ListWorkflowsResponse { + data: None, + meta: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn data(mut self, value: Vec) -> Self { + self.data = Some(value); + self + } + + pub fn meta(mut self, value: crate::datadogV2::model::ListWorkflowsResponseMeta) -> Self { + self.meta = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for ListWorkflowsResponse { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for ListWorkflowsResponse { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ListWorkflowsResponseVisitor; + impl<'a> Visitor<'a> for ListWorkflowsResponseVisitor { + type Value = ListWorkflowsResponse; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut data: Option> = None; + let mut meta: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "data" => { + if v.is_null() { + continue; + } + data = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "meta" => { + if v.is_null() { + continue; + } + meta = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = ListWorkflowsResponse { + data, + meta, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ListWorkflowsResponseVisitor) + } +} diff --git a/src/datadogV2/model/model_list_workflows_response_meta.rs b/src/datadogV2/model/model_list_workflows_response_meta.rs new file mode 100644 index 0000000000..1d27cc551d --- /dev/null +++ b/src/datadogV2/model/model_list_workflows_response_meta.rs @@ -0,0 +1,105 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Metadata for a List Workflows response. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ListWorkflowsResponseMeta { + /// Pagination metadata for a List Workflows response. + #[serde(rename = "page")] + pub page: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ListWorkflowsResponseMeta { + pub fn new() -> ListWorkflowsResponseMeta { + ListWorkflowsResponseMeta { + page: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn page(mut self, value: crate::datadogV2::model::ListWorkflowsResponseMetaPage) -> Self { + self.page = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for ListWorkflowsResponseMeta { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for ListWorkflowsResponseMeta { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ListWorkflowsResponseMetaVisitor; + impl<'a> Visitor<'a> for ListWorkflowsResponseMetaVisitor { + type Value = ListWorkflowsResponseMeta; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut page: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "page" => { + if v.is_null() { + continue; + } + page = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = ListWorkflowsResponseMeta { + page, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ListWorkflowsResponseMetaVisitor) + } +} diff --git a/src/datadogV2/model/model_list_workflows_response_meta_page.rs b/src/datadogV2/model/model_list_workflows_response_meta_page.rs new file mode 100644 index 0000000000..3e393b2dee --- /dev/null +++ b/src/datadogV2/model/model_list_workflows_response_meta_page.rs @@ -0,0 +1,124 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Pagination metadata for a List Workflows response. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ListWorkflowsResponseMetaPage { + /// The total number of workflows in the organization. + #[serde(rename = "totalCount")] + pub total_count: Option, + /// The total number of workflows matching the applied filters. + #[serde(rename = "totalFilteredCount")] + pub total_filtered_count: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ListWorkflowsResponseMetaPage { + pub fn new() -> ListWorkflowsResponseMetaPage { + ListWorkflowsResponseMetaPage { + total_count: None, + total_filtered_count: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn total_count(mut self, value: i64) -> Self { + self.total_count = Some(value); + self + } + + pub fn total_filtered_count(mut self, value: i64) -> Self { + self.total_filtered_count = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for ListWorkflowsResponseMetaPage { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for ListWorkflowsResponseMetaPage { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ListWorkflowsResponseMetaPageVisitor; + impl<'a> Visitor<'a> for ListWorkflowsResponseMetaPageVisitor { + type Value = ListWorkflowsResponseMetaPage; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut total_count: Option = None; + let mut total_filtered_count: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "totalCount" => { + if v.is_null() { + continue; + } + total_count = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "totalFilteredCount" => { + if v.is_null() { + continue; + } + total_filtered_count = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = ListWorkflowsResponseMetaPage { + total_count, + total_filtered_count, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ListWorkflowsResponseMetaPageVisitor) + } +} diff --git a/src/datadogV2/model/model_workflow_list_item.rs b/src/datadogV2/model/model_workflow_list_item.rs new file mode 100644 index 0000000000..e3401c0259 --- /dev/null +++ b/src/datadogV2/model/model_workflow_list_item.rs @@ -0,0 +1,155 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// A workflow returned by the list workflows endpoint. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct WorkflowListItem { + /// Attributes of a workflow returned in a list response. + #[serde(rename = "attributes")] + pub attributes: crate::datadogV2::model::WorkflowListItemAttributes, + /// The workflow identifier. + #[serde(rename = "id")] + pub id: Option, + /// The definition of `WorkflowDataRelationships` object. + #[serde(rename = "relationships")] + pub relationships: Option, + /// The definition of `WorkflowDataType` object. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::WorkflowDataType, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl WorkflowListItem { + pub fn new( + attributes: crate::datadogV2::model::WorkflowListItemAttributes, + type_: crate::datadogV2::model::WorkflowDataType, + ) -> WorkflowListItem { + WorkflowListItem { + attributes, + id: None, + relationships: None, + type_, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn id(mut self, value: String) -> Self { + self.id = Some(value); + self + } + + pub fn relationships( + mut self, + value: crate::datadogV2::model::WorkflowDataRelationships, + ) -> Self { + self.relationships = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for WorkflowListItem { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct WorkflowListItemVisitor; + impl<'a> Visitor<'a> for WorkflowListItemVisitor { + type Value = WorkflowListItem; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut attributes: Option = + None; + let mut id: Option = None; + let mut relationships: Option = + None; + let mut type_: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "attributes" => { + attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "id" => { + if v.is_null() { + continue; + } + id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "relationships" => { + if v.is_null() { + continue; + } + relationships = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "type" => { + type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _type_) = type_ { + match _type_ { + crate::datadogV2::model::WorkflowDataType::UnparsedObject( + _type_, + ) => { + _unparsed = true; + } + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let attributes = attributes.ok_or_else(|| M::Error::missing_field("attributes"))?; + let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; + + let content = WorkflowListItem { + attributes, + id, + relationships, + type_, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(WorkflowListItemVisitor) + } +} diff --git a/src/datadogV2/model/model_workflow_list_item_attributes.rs b/src/datadogV2/model/model_workflow_list_item_attributes.rs new file mode 100644 index 0000000000..d752c702fe --- /dev/null +++ b/src/datadogV2/model/model_workflow_list_item_attributes.rs @@ -0,0 +1,195 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Attributes of a workflow returned in a list response. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct WorkflowListItemAttributes { + /// When the workflow was created. + #[serde(rename = "createdAt")] + pub created_at: Option>, + /// Description of the workflow. + #[serde(rename = "description")] + pub description: Option, + /// Name of the workflow. + #[serde(rename = "name")] + pub name: String, + /// Whether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published. + #[serde(rename = "published")] + pub published: Option, + /// The spec defines what the workflow does. + #[serde(rename = "spec")] + pub spec: Option, + /// Tags of the workflow. + #[serde(rename = "tags")] + pub tags: Option>, + /// When the workflow was last updated. + #[serde(rename = "updatedAt")] + pub updated_at: Option>, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl WorkflowListItemAttributes { + pub fn new(name: String) -> WorkflowListItemAttributes { + WorkflowListItemAttributes { + created_at: None, + description: None, + name, + published: None, + spec: None, + tags: None, + updated_at: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn created_at(mut self, value: chrono::DateTime) -> Self { + self.created_at = Some(value); + self + } + + pub fn description(mut self, value: String) -> Self { + self.description = Some(value); + self + } + + pub fn published(mut self, value: bool) -> Self { + self.published = Some(value); + self + } + + pub fn spec(mut self, value: crate::datadogV2::model::Spec) -> Self { + self.spec = Some(value); + self + } + + pub fn tags(mut self, value: Vec) -> Self { + self.tags = Some(value); + self + } + + pub fn updated_at(mut self, value: chrono::DateTime) -> Self { + self.updated_at = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for WorkflowListItemAttributes { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct WorkflowListItemAttributesVisitor; + impl<'a> Visitor<'a> for WorkflowListItemAttributesVisitor { + type Value = WorkflowListItemAttributes; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut created_at: Option> = None; + let mut description: Option = None; + let mut name: Option = None; + let mut published: Option = None; + let mut spec: Option = None; + let mut tags: Option> = None; + let mut updated_at: Option> = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "createdAt" => { + if v.is_null() { + continue; + } + created_at = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "description" => { + if v.is_null() { + continue; + } + description = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "name" => { + name = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "published" => { + if v.is_null() { + continue; + } + published = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "spec" => { + if v.is_null() { + continue; + } + spec = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "tags" => { + if v.is_null() { + continue; + } + tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "updatedAt" => { + if v.is_null() { + continue; + } + updated_at = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let name = name.ok_or_else(|| M::Error::missing_field("name"))?; + + let content = WorkflowListItemAttributes { + created_at, + description, + name, + published, + spec, + tags, + updated_at, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(WorkflowListItemAttributesVisitor) + } +} diff --git a/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.frozen b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.frozen new file mode 100644 index 0000000000..9c4802e3e5 --- /dev/null +++ b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.frozen @@ -0,0 +1 @@ +2026-06-01T21:52:42.662Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.json b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.json new file mode 100644 index 0000000000..67f7fc92f5 --- /dev/null +++ b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response-with-pagination.json @@ -0,0 +1,33 @@ +{ + "http_interactions": [ + { + "request": { + "body": "", + "headers": { + "Accept": [ + "application/json" + ] + }, + "method": "get", + "uri": "https://api.datadoghq.com/api/v2/workflows?filter%5Bquery%5D=Test-List_workflows_returns_OK_response_with_pagination-1780350762&limit=2&page=0" + }, + "response": { + "body": { + "string": "{\"data\":[],\"meta\":{\"page\":{\"totalCount\":547,\"totalFilteredCount\":0}}}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 01 Jun 2026 21:52:42 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.frozen new file mode 100644 index 0000000000..efce7c4929 --- /dev/null +++ b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-06-01T20:36:33.245Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.json b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.json new file mode 100644 index 0000000000..7a795abfa2 --- /dev/null +++ b/tests/scenarios/cassettes/v2/workflow_automation/List-workflows-returns-OK-response.json @@ -0,0 +1,91 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"name\":\"Cassette Workflow x-given\",\"spec\":{\"steps\":[{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"No_op\"}],\"triggers\":[{\"startStepNames\":[\"No_op\"],\"workflowTrigger\":{}}]}},\"type\":\"workflows\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/workflows" + }, + "response": { + "body": { + "string": "{\"data\":{\"id\":\"72ea47e5-3bf2-41a2-bf7b-1857908234b6\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2026-06-01T20:36:33.514948Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":{\"triggers\":[{\"startStepNames\":[\"No_op\"],\"workflowTrigger\":{}}],\"steps\":[{\"name\":\"No_op\",\"actionId\":\"com.datadoghq.core.noop\"}]},\"tags\":[],\"updatedAt\":\"2026-06-01T20:36:33.514948Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 201, + "message": "Created" + } + }, + "recorded_at": "Mon, 01 Jun 2026 20:36:33 GMT" + }, + { + "request": { + "body": "", + "headers": { + "Accept": [ + "application/json" + ] + }, + "method": "get", + "uri": "https://api.datadoghq.com/api/v2/workflows" + }, + "response": { + "body": { + "string": "{\"data\":[{\"id\":\"72cfa149-f153-45bc-aad6-2f601b7bfd9b\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-25T11:21:13.41766Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-25T11:21:13.41766Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"fe8c24c3-6574-4cf9-a3ee-4d84dd9b4354\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-25T11:21:14.456399Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-25T11:21:14.456399Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"7049520d-e564-4f35-8955-1750577b508e\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-25T11:21:14.872733Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-25T11:21:14.872733Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"c0e61b1b-486a-498d-a6ef-5b18d713a022\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-28T11:14:25.070776Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-28T11:14:25.070776Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"ceaea4db-f9b7-4133-8049-734c20e08170\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-25T11:21:15.742156Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-25T11:21:15.742156Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"d5f402b6-c5b1-4d8f-ab32-b7102fb3ef5e\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-20T11:20:34.434583Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-20T11:20:34.434583Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"59006312-23ea-4467-9921-310d1a17c2d9\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-20T11:20:35.557523Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-20T11:20:35.557523Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"8e9f8221-5788-4f1a-a341-afe4a73e8d2d\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-20T11:20:35.915972Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-20T11:20:35.915972Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"73c21683-cf0b-4140-92b3-d3f1be896160\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-20T11:20:36.779377Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-20T11:20:36.779377Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"8cf1582b-d398-4d35-bbba-a4b957c3db30\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-21T11:16:44.847574Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-21T11:16:44.847574Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"58031916-ffdb-4021-8670-d78298875765\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-21T11:16:45.55826Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-21T11:16:45.55826Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"3b7de88e-731c-4d2f-80d9-32ed547dff86\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-21T11:16:45.777562Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-21T11:16:45.777562Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a187147a-094a-443a-a811-7b106914ec96\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-21T11:16:46.261047Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-21T11:16:46.261047Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"b7c893dc-f694-41a7-aa2b-633ceca08c2f\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-02T11:22:01.701809Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-02T11:22:01.701809Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"1d598ddd-5b9b-4ab7-9f7a-5e2574404ec7\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-02T11:22:02.789201Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-02T11:22:02.789201Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"e8508f29-ced6-4f95-a348-2ac062177472\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-02T11:22:03.20927Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-02T11:22:03.20927Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"f6d3e46b-eeaf-4017-a865-e1f045deae3f\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-02T11:22:04.030122Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-02T11:22:04.030122Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"e5fe54aa-9e17-4200-a710-cd916bfd39db\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-24T11:13:41.595876Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-24T11:13:41.595876Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"615d90f0-3478-4748-b489-177a4e3e2b74\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-24T11:13:41.828316Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-24T11:13:41.828316Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a7a049f3-4c58-4e30-8157-a3a9b3132843\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-24T11:13:41.921301Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-24T11:13:41.921301Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a8a64e61-7a8e-46fb-83ae-4220c7aa33ca\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-24T11:13:42.204916Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-24T11:13:42.204916Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a50f8797-df93-4227-968b-4a653602d405\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-03T11:15:35.801277Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-03T11:15:35.801277Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"5567b478-806b-4768-9a3f-2b4ac9ad04e4\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-03T11:15:36.152307Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-03T11:15:36.152307Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"7f306d13-6e65-4962-b89d-5acfe0ada98a\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-03T11:15:35.623566Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-03T11:15:35.623566Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"8e9be134-5307-451f-8e40-0cc2546b6ed2\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-06-03T11:15:35.127727Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-06-03T11:15:35.127727Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"98144b6c-fc26-4e13-9fd9-943619e791d8\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-09-23T11:13:25.508416Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-09-23T11:13:25.508416Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"f422939b-e916-46fc-ba26-d25e1dcd2c66\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-09-23T11:13:25.765614Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-09-23T11:13:25.765614Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"5480f5c0-6128-4a56-9801-37e2e44496db\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-20T11:16:34.563405Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-20T11:16:34.563405Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"f00c51f1-6b32-401a-8bd4-08e360f94278\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-20T11:16:33.073415Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-20T11:16:33.073415Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"27fae62b-27e0-4802-94f4-5fc2fdef43f7\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-20T11:16:33.978668Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-20T11:16:33.978668Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"c0ccd673-e34a-49dd-a16f-bac77817fa62\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-20T11:16:33.744349Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-20T11:16:33.744349Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"f7380a3f-dd8f-4811-ac33-3245e6ad7dec\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-28T11:13:45.369167Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-28T11:13:45.369167Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"03bda67d-2cee-4828-a152-b263085b59cd\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-22T11:13:37.2763Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-22T11:13:37.2763Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"06c78ee4-a4aa-402e-8940-63ef512490d8\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-22T11:13:36.897095Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-22T11:13:36.897095Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"7aa75a8b-17b9-4c7e-b5fa-194dcd5f54c9\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-22T11:13:36.579513Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-22T11:13:36.579513Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"81112f53-d69b-4139-8790-f2adf2d80260\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-22T11:13:36.994612Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-22T11:13:36.994612Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"ba03c9fa-aa23-436c-ac69-e20bde5fb108\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-28T11:13:45.553954Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-28T11:13:45.553954Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"cbe3cd7d-4902-4863-9aba-ac4cb9038995\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-28T11:13:45.659208Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-28T11:13:45.659208Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"4c1cc171-9757-4e67-874e-64c962ed5352\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-28T11:13:45.894752Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-28T11:13:45.894752Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"52bfc481-46b4-44c1-8392-a32f405c21be\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-07-03T11:21:31.639998Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-07-03T11:21:31.639998Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a12f3d3d-2dfb-449f-b1da-9d73dcc1284f\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T11:16:57.708411Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-26T11:16:57.708411Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"5a3ee825-3f39-4842-978c-afb8c997ba76\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-30T11:19:54.84087Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-30T11:19:54.84087Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"5b6dc390-841e-46e2-ad18-29aa33cd0aa1\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-30T11:19:52.696163Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-30T11:19:52.696163Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"80d42530-2ef1-40bb-ba31-7c44a0159a92\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-27T11:17:22.645064Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-27T11:17:22.645064Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a2d791d3-407a-468b-b1eb-f38676b238d9\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T11:16:56.170659Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-26T11:16:56.170659Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"08620ae9-44ed-43c3-9941-e3936f3fd68b\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T11:16:56.942366Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-26T11:16:56.942366Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"d3bba643-1ce2-44c3-8ccb-3ad7647ec64d\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T11:16:57.184285Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-26T11:16:57.184285Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"a7ba3c17-c21b-4e50-8109-ae258395fcf0\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-27T11:17:22.915147Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-27T11:17:22.915147Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"8222b63d-8c1d-49fd-b31a-f18c870785e8\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-27T11:17:23.444244Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-27T11:17:23.444244Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}},{\"id\":\"cb5040a1-b989-41bf-9a4f-59c75c0523e0\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-27T11:17:21.869589Z\",\"description\":\"\",\"name\":\"Cassette Workflow x-given\",\"published\":true,\"spec\":null,\"tags\":[],\"updatedAt\":\"2025-05-27T11:17:21.869589Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"totalCount\":548,\"totalFilteredCount\":548}}}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 01 Jun 2026 20:36:33 GMT" + }, + { + "request": { + "body": "", + "headers": { + "Accept": [ + "*/*" + ] + }, + "method": "delete", + "uri": "https://api.datadoghq.com/api/v2/workflows/72ea47e5-3bf2-41a2-bf7b-1857908234b6" + }, + "response": { + "body": { + "string": "", + "encoding": null + }, + "headers": {}, + "status": { + "code": 204, + "message": "No Content" + } + }, + "recorded_at": "Mon, 01 Jun 2026 20:36:33 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index 3f66e97af8..32eeb14e33 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -9234,6 +9234,12 @@ "type": "safe" } }, + "ListWorkflows": { + "tag": "Workflow Automation", + "undo": { + "type": "safe" + } + }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/tests/scenarios/features/v2/workflow_automation.feature b/tests/scenarios/features/v2/workflow_automation.feature index df51d50139..96b0adf4e2 100644 --- a/tests/scenarios/features/v2/workflow_automation.feature +++ b/tests/scenarios/features/v2/workflow_automation.feature @@ -142,6 +142,28 @@ Feature: Workflow Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/workflow-automation-dev + Scenario: List workflows returns "Bad Request" response + Given new "ListWorkflows" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: List workflows returns "OK" response + Given there is a valid "workflow" in the system + And new "ListWorkflows" request + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/workflow-automation-dev @with-pagination + Scenario: List workflows returns "OK" response with pagination + Given new "ListWorkflows" request + And request contains "filter[query]" parameter with value "{{ unique }}" + And request contains "limit" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 0 items + @team:DataDog/workflow-automation-dev Scenario: Update an existing Workflow returns "Bad request" response Given there is a valid "workflow" in the system diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index 2e625ff372..804fc31c2b 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -7350,6 +7350,13 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { world .function_mappings .insert("v2.UpdateWidget".into(), test_v2_update_widget); + world + .function_mappings + .insert("v2.ListWorkflows".into(), test_v2_list_workflows); + world.function_mappings.insert( + "v2.ListWorkflowsWithPagination".into(), + test_v2_list_workflows_with_pagination, + ); world .function_mappings .insert("v2.CreateWorkflow".into(), test_v2_create_workflow); @@ -58649,6 +58656,124 @@ fn test_v2_update_widget(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_workflow_automation + .as_ref() + .expect("api instance not found"); + let limit = _parameters + .get("limit") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let page = _parameters + .get("page") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let sort = _parameters + .get("sort") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_query = _parameters + .get("filter[query]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_trigger_ids = _parameters + .get("filter[triggerIds]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_include_unpublished = _parameters + .get("filter[includeUnpublished]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_include_specs = _parameters + .get("filter[includeSpecs]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let mut params = datadogV2::api_workflow_automation::ListWorkflowsOptionalParams::default(); + params.limit = limit; + params.page = page; + params.sort = sort; + params.filter_query = filter_query; + params.filter_trigger_ids = filter_trigger_ids; + params.filter_include_unpublished = filter_include_unpublished; + params.filter_include_specs = filter_include_specs; + let response = match block_on(api.list_workflows_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } + } + _ => panic!("error parsing response: {error}"), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} +fn test_v2_list_workflows_with_pagination( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_workflow_automation + .as_ref() + .expect("api instance not found"); + let limit = _parameters + .get("limit") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let page = _parameters + .get("page") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let sort = _parameters + .get("sort") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_query = _parameters + .get("filter[query]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_trigger_ids = _parameters + .get("filter[triggerIds]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_include_unpublished = _parameters + .get("filter[includeUnpublished]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let filter_include_specs = _parameters + .get("filter[includeSpecs]") + .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); + let mut params = datadogV2::api_workflow_automation::ListWorkflowsOptionalParams::default(); + params.limit = limit; + params.page = page; + params.sort = sort; + params.filter_query = filter_query; + params.filter_trigger_ids = filter_trigger_ids; + params.filter_include_unpublished = filter_include_unpublished; + params.filter_include_specs = filter_include_specs; + let response = api.list_workflows_with_pagination(params); + let mut result = Vec::new(); + + block_on(async { + pin_mut!(response); + + while let Some(resp) = response.next().await { + match resp { + Ok(response) => { + result.push(response); + } + Err(error) => { + return match error { + Error::ResponseError(e) => { + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } + } + _ => panic!("error parsing response: {}", error), + }; + } + } + } + }); + world.response.object = serde_json::to_value(result).unwrap(); + world.response.code = 200; +} + fn test_v2_create_workflow(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances