curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"method": "POST",
"path": "/score-transaction"
},
"mappedTargets": [
"accountId"
]
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate"
payload = {
"config": {
"method": "POST",
"path": "/score-transaction"
},
"mappedTargets": ["accountId"]
}
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({
config: {method: 'POST', path: '/score-transaction'},
mappedTargets: ['accountId']
})
};
fetch('https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate', 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/catalog/executors/{id}/validate",
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([
'config' => [
'method' => 'POST',
'path' => '/score-transaction'
],
'mappedTargets' => [
'accountId'
]
]),
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/catalog/executors/{id}/validate"
payload := strings.NewReader("{\n \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\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/catalog/executors/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate")
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 \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"valid": true
}{
"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"
}{
"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"
}Validar uma configuração de node
Utilize este endpoint para conferir a configuração de um node contra o JSON Schema do executor do catálogo que ele invoca. A conferência é estrutural — nunca chama o serviço externo.
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"method": "POST",
"path": "/score-transaction"
},
"mappedTargets": [
"accountId"
]
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate"
payload = {
"config": {
"method": "POST",
"path": "/score-transaction"
},
"mappedTargets": ["accountId"]
}
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({
config: {method: 'POST', path: '/score-transaction'},
mappedTargets: ['accountId']
})
};
fetch('https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate', 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/catalog/executors/{id}/validate",
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([
'config' => [
'method' => 'POST',
'path' => '/score-transaction'
],
'mappedTargets' => [
'accountId'
]
]),
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/catalog/executors/{id}/validate"
payload := strings.NewReader("{\n \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\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/catalog/executors/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate")
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 \"config\": {\n \"method\": \"POST\",\n \"path\": \"/score-transaction\"\n },\n \"mappedTargets\": [\n \"accountId\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"valid": true
}{
"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"
}{
"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>.
Parâmetros de caminho
Identificador único do executor do catálogo.
Corpo
Corpo da solicitação contendo a configuração a ser validada.
A configuração do node que é conferida contra o JSON Schema do executor do catálogo.
Show child attributes
Show child attributes
{
"method": "POST",
"path": "/score-transaction"
}
Caminhos de campo que o node fornece por um inputMapping em vez de um valor fixo em config. O Flowker os conta como satisfeitos, então um node que mapeia um campo obrigatório do trigger ou de um passo anterior passa na conferência. Omita o campo para conferir apenas o config.
["accountId"]
Esta página foi útil?

