diff --git a/.apigentools-info b/.apigentools-info index 8c54e5d0248..e6166180d84 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-27 15:21:07.185558", - "spec_repo_commit": "97968943" + "regenerated": "2025-05-27 17:12:14.968856", + "spec_repo_commit": "ed439f7c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-27 15:21:07.201322", - "spec_repo_commit": "97968943" + "regenerated": "2025-05-27 17:12:14.988382", + "spec_repo_commit": "ed439f7c" } } } \ No newline at end of file diff --git a/examples/v2/workflow-automation/CreateWorkflow.java b/examples/v2/workflow-automation/CreateWorkflow.java index 490caa0a0f1..0348ce4c048 100644 --- a/examples/v2/workflow-automation/CreateWorkflow.java +++ b/examples/v2/workflow-automation/CreateWorkflow.java @@ -56,7 +56,6 @@ public static void main(String[] args) { "11111111-1111-1111-1111-111111111111") .label("INTEGRATION_DATADOG"))) .env(ConnectionEnvEnv.DEFAULT))) - .handle("my-handle") .inputSchema( new InputSchema() .parameters( diff --git a/examples/v2/workflow-automation/UpdateWorkflow.java b/examples/v2/workflow-automation/UpdateWorkflow.java index 6fe21fa027c..42f29cbecc0 100644 --- a/examples/v2/workflow-automation/UpdateWorkflow.java +++ b/examples/v2/workflow-automation/UpdateWorkflow.java @@ -59,7 +59,6 @@ public static void main(String[] args) { "11111111-1111-1111-1111-111111111111") .label("INTEGRATION_DATADOG"))) .env(ConnectionEnvEnv.DEFAULT))) - .handle("my-handle") .inputSchema( new InputSchema() .parameters( diff --git a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Successfully_created_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Successfully_created_a_workflow_response.json index 67ccc9c880d..6156502b7db 100644 --- a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Successfully_created_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Successfully_created_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "4ea99b6c-255c-1141-3fea-0a5165d54bd8" + "id": "4ea99b6c-255c-1141-3fea-0a5165d54bd7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.freeze index 8fc4fe6507c..ae344d8d34f 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:32.931Z \ No newline at end of file +2025-05-26T17:23:42.973Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json index 18bfaac3c98..c995fd8ce46 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"detail\":\"workflow description exceeds size limit of [300] characters\"}]}", + "body": "{\"errors\":[{\"detail\":\"workflow description exceeds size limit of [300] characters\"},{\"detail\":\"spec is invalid\"},{\"detail\":\"no trigger found. At least one trigger is required.\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.freeze index 5a61727b754..cce0ea529dc 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.114Z \ No newline at end of file +2025-05-26T17:23:43.084Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.json index eac1670b1b2..acf17326f8b 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Successfully_created_a_workflow_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"handle\":\"my-handle\",\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"type\":\"workflows\"}}" + "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"type\":\"workflows\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"cb8dd95a-1463-495d-99d6-95efcd86e74e\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:33.224986Z\",\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"triggers\":[{\"startStepNames\":[\"Step1\"],\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}}},{\"startStepNames\":[\"Step1\"],\"githubWebhookTrigger\":{}}],\"steps\":[{\"name\":\"Step1\",\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}],\"outboundEdges\":[{\"nextStepName\":\"Step2\",\"branchName\":\"main\"}]},{\"name\":\"Step2\",\"actionId\":\"com.datadoghq.core.noop\"}],\"handle\":\"my-handle\",\"connectionEnvs\":[{\"env\":\"default\",\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}]}],\"inputSchema\":{\"parameters\":[{\"name\":\"input\",\"type\":\"STRING\",\"defaultValue\":\"default\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]}},\"tags\":[\"foo:bar\",\"team:infra\",\"service:monitoring\"],\"updatedAt\":\"2025-02-04T04:58:33.224986Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"c850935f-15fc-4e5b-8903-d68066c5343a\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:43.255617Z\",\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"triggers\":[{\"startStepNames\":[\"Step1\"],\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}}},{\"startStepNames\":[\"Step1\"],\"githubWebhookTrigger\":{}}],\"steps\":[{\"name\":\"Step1\",\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}],\"outboundEdges\":[{\"nextStepName\":\"Step2\",\"branchName\":\"main\"}]},{\"name\":\"Step2\",\"actionId\":\"com.datadoghq.core.noop\"}],\"connectionEnvs\":[{\"env\":\"default\",\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}]}],\"inputSchema\":{\"parameters\":[{\"name\":\"input\",\"type\":\"STRING\",\"defaultValue\":\"default\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]}},\"tags\":[\"foo:bar\",\"service:monitoring\",\"team:infra\"],\"updatedAt\":\"2025-05-26T17:23:43.255617Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "4ea99b6c-255c-1141-3fea-0a5165d54bd7" + "id": "fec91cc9-6202-9b2d-77bb-53fe2e45b9c4" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/cb8dd95a-1463-495d-99d6-95efcd86e74e", + "path": "/api/v2/workflows/c850935f-15fc-4e5b-8903-d68066c5343a", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "9384953c-7e69-c85a-3baf-0296d8482df5" + "id": "453a84c4-ac47-6fa8-49ae-639041414e15" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Not_found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Not_found_response.freeze index 8ffae6cef74..3e2e0bb9242 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Not_found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Not_found_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.338Z \ No newline at end of file +2025-05-26T17:23:43.439Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.freeze index eb026ef178f..b95be17065f 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.426Z \ No newline at end of file +2025-05-26T17:23:43.503Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json index 67b46b36826..a86b5756b5e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"94300e37-bf51-498b-b56b-83d17ef45e6b\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:33.538848Z\",\"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\":\"2025-02-04T04:58:33.538848Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"8b9af60d-3521-4ed0-85b2-8e2ab2131e58\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:43.642375Z\",\"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\":\"2025-05-26T17:23:43.642375Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,7 +33,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/94300e37-bf51-498b-b56b-83d17ef45e6b", + "path": "/api/v2/workflows/8b9af60d-3521-4ed0-85b2-8e2ab2131e58", "keepAlive": false, "secure": true }, @@ -48,13 +48,13 @@ "timeToLive": { "unlimited": true }, - "id": "e8341d25-c544-632e-afe2-e81fd2bcba07" + "id": "a36b351f-d4fd-3f10-8f49-457209eb6317" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/94300e37-bf51-498b-b56b-83d17ef45e6b", + "path": "/api/v2/workflows/8b9af60d-3521-4ed0-85b2-8e2ab2131e58", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "e8341d25-c544-632e-afe2-e81fd2bcba08" + "id": "a36b351f-d4fd-3f10-8f49-457209eb6318" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Bad_request_response.freeze b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Bad_request_response.freeze index 728a4fc6d9a..e2b80e01bbe 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Bad_request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Bad_request_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.693Z \ No newline at end of file +2025-05-26T17:23:43.912Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Not_found_response.freeze b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Not_found_response.freeze index 1192c2758c0..e84c1f1cfb7 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Not_found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Not_found_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.759Z \ No newline at end of file +2025-05-26T17:23:43.998Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.freeze b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.freeze index c1bb2bc7d00..75177115740 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:33.829Z \ No newline at end of file +2025-05-26T17:23:44.094Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json index 06fc770d47a..c859297de35 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6ffa14c3-816b-4463-9386-cb8eb5b73438\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:33.952654Z\",\"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\":\"2025-02-04T04:58:33.952654Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"dec8dfd0-2031-480a-90ce-4e9179b22793\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:44.222906Z\",\"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\":\"2025-05-26T17:23:44.222906Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/workflows/6ffa14c3-816b-4463-9386-cb8eb5b73438", + "path": "/api/v2/workflows/dec8dfd0-2031-480a-90ce-4e9179b22793", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6ffa14c3-816b-4463-9386-cb8eb5b73438\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:33.952654Z\",\"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\":\"2025-02-04T04:58:33.952654Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"dec8dfd0-2031-480a-90ce-4e9179b22793\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:44.222906Z\",\"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\":\"2025-05-26T17:23:44.222906Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "27cb74b4-39b5-1a32-253f-039d781db16f" + "id": "86542334-fa5d-35f4-887d-682a2adf7139" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/6ffa14c3-816b-4463-9386-cb8eb5b73438", + "path": "/api/v2/workflows/dec8dfd0-2031-480a-90ce-4e9179b22793", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "394bd3a4-9cbd-9afd-0ced-e3d9311c8247" + "id": "78aa6840-6135-8524-fbc0-713ed8449d58" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.freeze index d1b627bbdd3..0e8971f63f4 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:34.162Z \ No newline at end of file +2025-05-26T17:23:44.483Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json index a0929772d8e..3fff6d70d3c 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"748a9d1b-a9a5-415b-9360-3d8374329957\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:34.263325Z\",\"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\":\"2025-02-04T04:58:34.263325Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"b40d1eb8-5741-474c-a137-897f73527a77\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:44.603489Z\",\"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\":\"2025-05-26T17:23:44.603489Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/workflows/748a9d1b-a9a5-415b-9360-3d8374329957", + "path": "/api/v2/workflows/b40d1eb8-5741-474c-a137-897f73527a77", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"detail\":\"workflow description exceeds size limit of [300] characters\"}]}", + "body": "{\"errors\":[{\"detail\":\"workflow description exceeds size limit of [300] characters\"},{\"detail\":\"spec is invalid\"},{\"detail\":\"no trigger found. At least one trigger is required.\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "2a88c302-487a-a9dc-d84a-6250dba77e2b" + "id": "a578d81a-a8c5-aff6-9290-8ac24acd331c" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/748a9d1b-a9a5-415b-9360-3d8374329957", + "path": "/api/v2/workflows/b40d1eb8-5741-474c-a137-897f73527a77", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "68664620-392a-c355-4d90-95f4155a8b5c" + "id": "1c991af0-4d19-81c3-14bd-df83116917df" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.freeze index 41cf3852306..5a40e796721 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:34.413Z \ No newline at end of file +2025-05-26T17:23:44.853Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.json index c2fbd7202e4..da7312426dd 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Not_found_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"handle\":\"my-handle\",\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"id\":\"22222222-2222-2222-2222-222222222222\",\"type\":\"workflows\"}}" + "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"id\":\"22222222-2222-2222-2222-222222222222\",\"type\":\"workflows\"}}" }, "headers": {}, "method": "PATCH", @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c82ad1aa-2d39-b2d9-3b1d-b9060ae2a476" + "id": "927f41dd-2450-8ed5-4d22-79bb3cdef9fe" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.freeze index e1127f3d402..8bfed0b4823 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.freeze @@ -1 +1 @@ -2025-02-04T04:58:34.496Z \ No newline at end of file +2025-05-26T17:23:44.981Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json index 914065b9301..bc4c84bf23d 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"b7a23134-f18e-4896-acd6-73c9b8b813a5\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:34.597357Z\",\"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\":\"2025-02-04T04:58:34.597357Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"a08f59a2-97d7-484e-8dda-b5abbb003869\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:45.112536Z\",\"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\":\"2025-05-26T17:23:45.112536Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,16 +33,16 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"handle\":\"my-handle\",\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"id\":\"22222222-2222-2222-2222-222222222222\",\"type\":\"workflows\"}}" + "json": "{\"data\":{\"attributes\":{\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"connectionEnvs\":[{\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}],\"env\":\"default\"}],\"inputSchema\":{\"parameters\":[{\"defaultValue\":\"default\",\"name\":\"input\",\"type\":\"STRING\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]},\"steps\":[{\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"name\":\"Step1\",\"outboundEdges\":[{\"branchName\":\"main\",\"nextStepName\":\"Step2\"}],\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}]},{\"actionId\":\"com.datadoghq.core.noop\",\"name\":\"Step2\"}],\"triggers\":[{\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}},\"startStepNames\":[\"Step1\"]},{\"githubWebhookTrigger\":{},\"startStepNames\":[\"Step1\"]}]},\"tags\":[\"team:infra\",\"service:monitoring\",\"foo:bar\"]},\"id\":\"22222222-2222-2222-2222-222222222222\",\"type\":\"workflows\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/workflows/b7a23134-f18e-4896-acd6-73c9b8b813a5", + "path": "/api/v2/workflows/a08f59a2-97d7-484e-8dda-b5abbb003869", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"b7a23134-f18e-4896-acd6-73c9b8b813a5\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-02-04T04:58:34.597357Z\",\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"triggers\":[{\"startStepNames\":[\"Step1\"],\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}}},{\"startStepNames\":[\"Step1\"],\"githubWebhookTrigger\":{}}],\"steps\":[{\"name\":\"Step1\",\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}],\"outboundEdges\":[{\"nextStepName\":\"Step2\",\"branchName\":\"main\"}]},{\"name\":\"Step2\",\"actionId\":\"com.datadoghq.core.noop\"}],\"handle\":\"my-handle\",\"connectionEnvs\":[{\"env\":\"default\",\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}]}],\"inputSchema\":{\"parameters\":[{\"name\":\"input\",\"type\":\"STRING\",\"defaultValue\":\"default\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]}},\"tags\":[\"foo:bar\",\"team:infra\",\"service:monitoring\"],\"updatedAt\":\"2025-02-04T04:58:34.728719Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"a08f59a2-97d7-484e-8dda-b5abbb003869\",\"type\":\"workflows\",\"attributes\":{\"createdAt\":\"2025-05-26T17:23:45.112536Z\",\"description\":\"A sample workflow.\",\"name\":\"Example Workflow\",\"published\":true,\"spec\":{\"triggers\":[{\"startStepNames\":[\"Step1\"],\"monitorTrigger\":{\"rateLimit\":{\"count\":1,\"interval\":\"3600s\"}}},{\"startStepNames\":[\"Step1\"],\"githubWebhookTrigger\":{}}],\"steps\":[{\"name\":\"Step1\",\"actionId\":\"com.datadoghq.dd.monitor.listMonitors\",\"connectionLabel\":\"INTEGRATION_DATADOG\",\"parameters\":[{\"name\":\"tags\",\"value\":\"service:monitoring\"}],\"outboundEdges\":[{\"nextStepName\":\"Step2\",\"branchName\":\"main\"}]},{\"name\":\"Step2\",\"actionId\":\"com.datadoghq.core.noop\"}],\"connectionEnvs\":[{\"env\":\"default\",\"connections\":[{\"connectionId\":\"11111111-1111-1111-1111-111111111111\",\"label\":\"INTEGRATION_DATADOG\"}]}],\"inputSchema\":{\"parameters\":[{\"name\":\"input\",\"type\":\"STRING\",\"defaultValue\":\"default\"}]},\"outputSchema\":{\"parameters\":[{\"name\":\"output\",\"type\":\"ARRAY_OBJECT\",\"value\":\"outputValue\"}]}},\"tags\":[\"foo:bar\",\"service:monitoring\",\"team:infra\"],\"updatedAt\":\"2025-05-26T17:23:45.365681Z\"},\"relationships\":{\"creator\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"owner\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "3fe5398e-0bd7-7af3-6231-5f9149489a61" + "id": "125977a9-217f-aded-035c-1ed22930786c" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/workflows/b7a23134-f18e-4896-acd6-73c9b8b813a5", + "path": "/api/v2/workflows/a08f59a2-97d7-484e-8dda-b5abbb003869", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "073431aa-3fe5-9682-fc26-5b77ec6963f3" + "id": "5e061534-e994-c2a3-e15a-30f13c9018e4" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/workflow_automation.feature b/src/test/resources/com/datadog/api/client/v2/api/workflow_automation.feature index 6db797feb09..df51d501390 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/workflow_automation.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/workflow_automation.feature @@ -47,7 +47,7 @@ Feature: Workflow Automation @team:DataDog/workflow-automation-dev Scenario: Create a Workflow returns "Successfully created a workflow." response Given new "CreateWorkflow" request - And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "handle": "my-handle", "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "type": "workflows"}} + And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "type": "workflows"}} When the request is sent Then the response status is 201 Successfully created a workflow. @@ -155,7 +155,7 @@ Feature: Workflow Automation Scenario: Update an existing Workflow returns "Not found" response Given new "UpdateWorkflow" request And request contains "workflow_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" - And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "handle": "my-handle", "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}} + And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}} When the request is sent Then the response status is 404 Not found @@ -164,6 +164,6 @@ Feature: Workflow Automation Given there is a valid "workflow" in the system And new "UpdateWorkflow" request And request contains "workflow_id" parameter from "workflow.data.id" - And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "handle": "my-handle", "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}} + And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "11111111-1111-1111-1111-111111111111", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}} When the request is sent Then the response status is 200 Successfully updated a workflow.