curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/workflows/preview-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node": {
"body": {
"amount": "${body.amount}"
},
"executorId": "http.post-v1-pay",
"method": "POST",
"path": "/v1/pay",
"providerConfigId": "018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5"
},
"providerConfig": {
"config": {
"base_url": "https://api.example.com"
},
"providerId": "http"
},
"sampleInput": {
"amount": 150,
"currency": "BRL"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/workflows/preview-request"
payload = {
"node": {
"body": { "amount": "${body.amount}" },
"executorId": "http.post-v1-pay",
"method": "POST",
"path": "/v1/pay",
"providerConfigId": "018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5"
},
"providerConfig": {
"config": { "base_url": "https://api.example.com" },
"providerId": "http"
},
"sampleInput": {
"amount": 150,
"currency": "BRL"
}
}
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({
node: {
body: JSON.stringify({amount: '${body.amount}'}),
executorId: 'http.post-v1-pay',
method: 'POST',
path: '/v1/pay',
providerConfigId: '018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5'
},
providerConfig: {config: {base_url: 'https://api.example.com'}, providerId: 'http'},
sampleInput: {amount: 150, currency: 'BRL'}
})
};
fetch('https://flowker.sandbox.lerian.net/v1/workflows/preview-request', 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://flowker.sandbox.lerian.net/v1/workflows/preview-request",
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([
'node' => [
'body' => [
'amount' => '${body.amount}'
],
'executorId' => 'http.post-v1-pay',
'method' => 'POST',
'path' => '/v1/pay',
'providerConfigId' => '018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5'
],
'providerConfig' => [
'config' => [
'base_url' => 'https://api.example.com'
],
'providerId' => 'http'
],
'sampleInput' => [
'amount' => 150,
'currency' => 'BRL'
]
]),
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://flowker.sandbox.lerian.net/v1/workflows/preview-request"
payload := strings.NewReader("{\n \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\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://flowker.sandbox.lerian.net/v1/workflows/preview-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/workflows/preview-request")
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 \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\n}"
response = http.request(request)
puts response.read_body{
"body": "{\"amount\":150.00,\"currency\":\"BRL\"}",
"curl": "<string>",
"headers": {},
"method": "POST",
"unresolved": [
"<string>"
],
"url": "https://api.example.com/v1/pay"
}{
"code": "FLK-0001",
"detail": "name is a required field",
"errors": [
{
"location": "body.nodes",
"message": "expected array length >= 1",
"value": "<unknown>"
}
],
"instance": "/v1/workflows",
"status": 400,
"title": "Bad Request",
"type": "https://errors.lerian.studio/v1/FLK-0001"
}Pré-visualizar a requisição de um executor
Utilize este endpoint para montar a requisição HTTP de saída que um node executor enviaria, sem enviá-la. A pré-visualização aplica a mesma interpolação, o mesmo mapeamento de entradas e a mesma montagem de autenticação usados em tempo de execução. Ela nunca abre uma conexão de rede nem lê o vault. O material secreto, incluindo campos de configuração somente de escrita e material de autenticação, é mascarado com ***.
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/workflows/preview-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node": {
"body": {
"amount": "${body.amount}"
},
"executorId": "http.post-v1-pay",
"method": "POST",
"path": "/v1/pay",
"providerConfigId": "018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5"
},
"providerConfig": {
"config": {
"base_url": "https://api.example.com"
},
"providerId": "http"
},
"sampleInput": {
"amount": 150,
"currency": "BRL"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/workflows/preview-request"
payload = {
"node": {
"body": { "amount": "${body.amount}" },
"executorId": "http.post-v1-pay",
"method": "POST",
"path": "/v1/pay",
"providerConfigId": "018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5"
},
"providerConfig": {
"config": { "base_url": "https://api.example.com" },
"providerId": "http"
},
"sampleInput": {
"amount": 150,
"currency": "BRL"
}
}
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({
node: {
body: JSON.stringify({amount: '${body.amount}'}),
executorId: 'http.post-v1-pay',
method: 'POST',
path: '/v1/pay',
providerConfigId: '018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5'
},
providerConfig: {config: {base_url: 'https://api.example.com'}, providerId: 'http'},
sampleInput: {amount: 150, currency: 'BRL'}
})
};
fetch('https://flowker.sandbox.lerian.net/v1/workflows/preview-request', 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://flowker.sandbox.lerian.net/v1/workflows/preview-request",
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([
'node' => [
'body' => [
'amount' => '${body.amount}'
],
'executorId' => 'http.post-v1-pay',
'method' => 'POST',
'path' => '/v1/pay',
'providerConfigId' => '018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5'
],
'providerConfig' => [
'config' => [
'base_url' => 'https://api.example.com'
],
'providerId' => 'http'
],
'sampleInput' => [
'amount' => 150,
'currency' => 'BRL'
]
]),
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://flowker.sandbox.lerian.net/v1/workflows/preview-request"
payload := strings.NewReader("{\n \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\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://flowker.sandbox.lerian.net/v1/workflows/preview-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/workflows/preview-request")
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 \"node\": {\n \"body\": {\n \"amount\": \"${body.amount}\"\n },\n \"executorId\": \"http.post-v1-pay\",\n \"method\": \"POST\",\n \"path\": \"/v1/pay\",\n \"providerConfigId\": \"018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5\"\n },\n \"providerConfig\": {\n \"config\": {\n \"base_url\": \"https://api.example.com\"\n },\n \"providerId\": \"http\"\n },\n \"sampleInput\": {\n \"amount\": 150,\n \"currency\": \"BRL\"\n }\n}"
response = http.request(request)
puts response.read_body{
"body": "{\"amount\":150.00,\"currency\":\"BRL\"}",
"curl": "<string>",
"headers": {},
"method": "POST",
"unresolved": [
"<string>"
],
"url": "https://api.example.com/v1/pay"
}{
"code": "FLK-0001",
"detail": "name is a required field",
"errors": [
{
"location": "body.nodes",
"message": "expected array length >= 1",
"value": "<unknown>"
}
],
"instance": "/v1/workflows",
"status": 400,
"title": "Bad Request",
"type": "https://errors.lerian.studio/v1/FLK-0001"
}Autorizações
Token bearer JWT emitido pelo provider de identidade. Envie-o no cabeçalho Authorization como Bearer <token>.
Corpo
Configuração do node executor (executorId, providerConfigId, method, path, headers, body, config, inputMapping/transforms) — a mesma estrutura persistida no campo data de um node do workflow.
Show child attributes
Show child attributes
{
"body": { "amount": "${body.amount}" },
"executorId": "http.post-v1-pay",
"method": "POST",
"path": "/v1/pay",
"providerConfigId": "018f3e2a-1c4d-7b9e-a1b2-c3d4e5f6c4d5"
}
Configuração de provider para a qual o node aponta, enviada inline para que a prévia seja uma função pura de suas entradas (sem leituras no banco de dados nem no vault).
Show child attributes
Show child attributes
{
"config": { "base_url": "https://api.example.com" },
"providerId": "http"
}
JSON arbitrário usado como contexto do workflow para resolver os mapeamentos e as referências ${node.}/${body.}; as referências não resolvidas permanecem literais. Opcional (uma prévia sem contexto de exemplo é válida).
Show child attributes
Show child attributes
{ "amount": 150, "currency": "BRL" }
Resposta
Indica que a requisição foi bem-sucedida e a resposta contém os dados solicitados.
Esta página foi útil?

