Skip to main content
POST
/
api
/
v1
/
flow
/
{uuid}
/
steps
/
{step}
/
test
Test a step — kind-aware behavior (trigger samples vs action exec)
curl --request POST \
  --url https://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "persist": true,
  "data": {},
  "sample_uuid": "<string>",
  "limit": 10,
  "input_data": {},
  "config_override": {},
  "dry_run": false,
  "live": false
}
'
import requests

url = "https://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test"

payload = {
"persist": True,
"data": {},
"sample_uuid": "<string>",
"limit": 10,
"input_data": {},
"config_override": {},
"dry_run": False,
"live": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
persist: true,
data: {},
sample_uuid: '<string>',
limit: 10,
input_data: {},
config_override: {},
dry_run: false,
live: false
})
};

fetch('https://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test', 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://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'persist' => true,
'data' => [

],
'sample_uuid' => '<string>',
'limit' => 10,
'input_data' => [

],
'config_override' => [

],
'dry_run' => false,
'live' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test"

payload := strings.NewReader("{\n \"persist\": true,\n \"data\": {},\n \"sample_uuid\": \"<string>\",\n \"limit\": 10,\n \"input_data\": {},\n \"config_override\": {},\n \"dry_run\": false,\n \"live\": false\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.post("https://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"persist\": true,\n \"data\": {},\n \"sample_uuid\": \"<string>\",\n \"limit\": 10,\n \"input_data\": {},\n \"config_override\": {},\n \"dry_run\": false,\n \"live\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{subdomain}.mihu.ai/api/v1/flow/{uuid}/steps/{step}/test")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"persist\": true,\n \"data\": {},\n \"sample_uuid\": \"<string>\",\n \"limit\": 10,\n \"input_data\": {},\n \"config_override\": {},\n \"dry_run\": false,\n \"live\": false\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "dry_run": true,
    "data": {},
    "duration_ms": 123,
    "resolved": {},
    "selected": {},
    "samples": [
      {
        "sample_uuid": "<string>",
        "label": "<string>",
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
{
"success": false,
"message": "Agent not found",
"data": []
}
{
"success": false,
"message": "Agent not found",
"data": []
}
{
"success": false,
"message": "Agent not found",
"data": []
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Path Parameters

uuid
string<uuid>
required
step
string<uuid>
required

Body

application/json
persist
boolean
default:true

Save the result to step.last_test and activate the step. Set false to test without committing.

data
object | null

(triggers) Manual sample payload. When set, skips auto-fetch and persists this object as test_data.

sample_uuid
string | null

(triggers) Pick a specific record from the auto-fetched list.

limit
integer
default:10

(triggers) Max samples to return.

Required range: x <= 50
input_data
object | null

(actions) Override the upstream {{stepN.…}} resolution. Useful to test with hypothetical input.

config_override
object | null

(actions) Test with a config different from step.config (does not persist).

dry_run
boolean
default:false

(actions) Force dry-run even for normally-live actions.

live
boolean
default:false

(actions) Force real execution. Bypasses the safe-list — destructive sends/writes will actually go through to the third party.

Response

Test ran

success
boolean
Example:

true

data
object