cURL
curl --request POST \
--url https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approveimport requests
url = "https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve', 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.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"run_id": "<string>",
"node_id": "<string>",
"node_type": "agent",
"node_name": "<string>",
"attempt": 123,
"status": "pending",
"retry_count": 123,
"max_retries": 123,
"created_at": "2023-11-07T05:31:56Z",
"input_json": "<string>",
"output_json": "<string>",
"error_message": "<string>",
"timeout_ms": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"duration_ms": 123
}{
"type": "about:blank",
"title": "Validation Failed",
"status": 123,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>",
"rejected_value": "<string>"
}
],
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Not Found",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_type": "<string>",
"resource_id": "<string>"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"error_code": "<string>"
}Workflows
Post apiv1workflowsruns nodes approve
Approve a pending workflow step
POST
/
api
/
v1
/
workflows
/
runs
/
{runId}
/
nodes
/
{nodeId}
/
approve
cURL
curl --request POST \
--url https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approveimport requests
url = "https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve', 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.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.qyl.dev/api/v1/workflows/runs/{runId}/nodes/{nodeId}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"run_id": "<string>",
"node_id": "<string>",
"node_type": "agent",
"node_name": "<string>",
"attempt": 123,
"status": "pending",
"retry_count": 123,
"max_retries": 123,
"created_at": "2023-11-07T05:31:56Z",
"input_json": "<string>",
"output_json": "<string>",
"error_message": "<string>",
"timeout_ms": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"duration_ms": 123
}{
"type": "about:blank",
"title": "Validation Failed",
"status": 123,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>",
"rejected_value": "<string>"
}
],
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Not Found",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_type": "<string>",
"resource_id": "<string>"
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"error_code": "<string>"
}Response
The request has succeeded.
Individual DAG node execution
Execution ID
Parent run
Node definition ID
Node type
Available options:
agent, tool, condition, fork, join, approval, sub_workflow, transform, wait Node name
Attempt number (1-based)
Node status
Available options:
pending, running, paused, completed, failed, cancelled, timed_out Retry count
Maximum retries allowed
Creation timestamp
Node input data
Node output data
Error message if failed
Timeout in milliseconds
Start timestamp
Completion timestamp
Duration in milliseconds
Was this page helpful?
