Update Test
Update a specific workflow test by its ID.
curl --request PATCH \
--url https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [
null
],
"status": "PASSED"
}
],
"step_key": "<string>"
}
'import requests
url = "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}"
payload = {
"name": "<string>",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [None],
"status": "PASSED"
}
],
"step_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
input: {},
input_default: {},
input_context: {},
expectations: [
{
key: '<string>',
name: '<string>',
expectation_id: '<string>',
script: '<string>',
output: '<unknown>',
logs: [null],
status: 'PASSED'
}
],
step_key: '<string>'
})
};
fetch('https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'input' => [
],
'input_default' => [
],
'input_context' => [
],
'expectations' => [
[
'key' => '<string>',
'name' => '<string>',
'expectation_id' => '<string>',
'script' => '<string>',
'output' => '<unknown>',
'logs' => [
null
],
'status' => 'PASSED'
]
],
'step_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PASSED",
"step_key": "<string>",
"expectations_passing_count": 123,
"expectations_failing_count": 123,
"workflow_id": "<string>",
"run": {
"id": "<string>",
"input": {},
"output": {},
"status": "RUNNING",
"origin": "WORKFLOW",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"app_id": "<string>",
"workflow_app_id": "<string>",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
]
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"result": "<unknown>",
"error": "<string>",
"collection_id": "<string>",
"record_id": "<string>",
"version": 123,
"usage": {
"total": 123,
"steps": {},
"calls": [
{
"id": "<string>",
"total": 123,
"calls": [
"<unknown>"
]
}
]
},
"retention": {
"max_age_in_seconds": 3600,
"preserve_on_failure": true
},
"retention_due_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [
null
],
"status": "PASSED"
}
]
}Path Parameters
The ID of the app
The ID of the workflow
The ID of the test
Query Parameters
all Body
Data to update an existing workflow test
Name of the workflow test to be created (max 256 characters)
1 - 256Updated input values for the workflow test
Show child attributes
Show child attributes
Updated default input values for the workflow test
Show child attributes
Show child attributes
Updated context input values for the workflow test
Show child attributes
Show child attributes
Updated list of expectations for the workflow test
30Show child attributes
Show child attributes
Updated starting step key for the workflow test
Response
Detailed information about a workflow test
Unique identifier for the workflow test
Name of the workflow test
Status of the workflow test
DRAFT, CANCELLED, RUNNING, FAILED, PASSED "PASSED"
Starting step key for the workflow test
Number of passing expectations
Number of failing expectations
Identifier of the associated workflow
Run details of the workflow test
Show child attributes
Show child attributes
Creation date of the workflow test
Last update date of the workflow test
Input values for the workflow test
Show child attributes
Show child attributes
Default input values for the workflow test
Show child attributes
Show child attributes
Default input values for the workflow test
Show child attributes
Show child attributes
List of expectations that will be executed for the workflow test
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [
null
],
"status": "PASSED"
}
],
"step_key": "<string>"
}
'import requests
url = "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}"
payload = {
"name": "<string>",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [None],
"status": "PASSED"
}
],
"step_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
input: {},
input_default: {},
input_context: {},
expectations: [
{
key: '<string>',
name: '<string>',
expectation_id: '<string>',
script: '<string>',
output: '<unknown>',
logs: [null],
status: 'PASSED'
}
],
step_key: '<string>'
})
};
fetch('https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'input' => [
],
'input_default' => [
],
'input_context' => [
],
'expectations' => [
[
'key' => '<string>',
'name' => '<string>',
'expectation_id' => '<string>',
'script' => '<string>',
'output' => '<unknown>',
'logs' => [
null
],
'status' => 'PASSED'
]
],
'step_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"input\": {},\n \"input_default\": {},\n \"input_context\": {},\n \"expectations\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"expectation_id\": \"<string>\",\n \"script\": \"<string>\",\n \"output\": \"<unknown>\",\n \"logs\": [\n null\n ],\n \"status\": \"PASSED\"\n }\n ],\n \"step_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PASSED",
"step_key": "<string>",
"expectations_passing_count": 123,
"expectations_failing_count": 123,
"workflow_id": "<string>",
"run": {
"id": "<string>",
"input": {},
"output": {},
"status": "RUNNING",
"origin": "WORKFLOW",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"app_id": "<string>",
"workflow_app_id": "<string>",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
]
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"result": "<unknown>",
"error": "<string>",
"collection_id": "<string>",
"record_id": "<string>",
"version": 123,
"usage": {
"total": 123,
"steps": {},
"calls": [
{
"id": "<string>",
"total": 123,
"calls": [
"<unknown>"
]
}
]
},
"retention": {
"max_age_in_seconds": 3600,
"preserve_on_failure": true
},
"retention_due_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<unknown>",
"logs": [
null
],
"status": "PASSED"
}
]
}