Validar uma configuração de executor
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"config": {
"method": "POST",
"url": "https://api.example.com/validate"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate"
payload = { "config": {
"method": "POST",
"url": "https://api.example.com/validate"
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {method: 'POST', url: 'https://api.example.com/validate'}})
};
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',
'url' => 'https://api.example.com/validate'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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 \"url\": \"https://api.example.com/validate\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"method\": \"POST\",\n \"url\": \"https://api.example.com/validate\"\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["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"method\": \"POST\",\n \"url\": \"https://api.example.com/validate\"\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"valid": true
}{
"error": "",
"valid": true
}{
"code": "FLK-0200",
"entityType": "executor",
"err": {},
"message": "Executor with ID 'nonexistent' not found in catalog",
"title": "Not Found"
}Validar uma configuração de executor
Utilize este endpoint para validar uma configuração de executor contra seu JSON Schema.
POST
/
v1
/
catalog
/
executors
/
{id}
/
validate
Validar uma configuração de executor
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"config": {
"method": "POST",
"url": "https://api.example.com/validate"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/catalog/executors/{id}/validate"
payload = { "config": {
"method": "POST",
"url": "https://api.example.com/validate"
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {method: 'POST', url: 'https://api.example.com/validate'}})
};
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',
'url' => 'https://api.example.com/validate'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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 \"url\": \"https://api.example.com/validate\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"method\": \"POST\",\n \"url\": \"https://api.example.com/validate\"\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["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"method\": \"POST\",\n \"url\": \"https://api.example.com/validate\"\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"valid": true
}{
"error": "",
"valid": true
}{
"code": "FLK-0200",
"entityType": "executor",
"err": {},
"message": "Executor with ID 'nonexistent' not found in catalog",
"title": "Not Found"
}Autorizações
Chave de API para autenticar as requisições à API do Flowker. Provisionada por meio da variável de ambiente API_KEY durante o deployment.
Parâmetros de caminho
Identificador único do executor do catálogo.
Corpo
application/json
Corpo da solicitação contendo a configuração a ser validada.
Objeto de configuração a ser validado.
Show child attributes
Show child attributes
Exemplo:
{
"method": "POST",
"url": "https://api.example.com/validate"
}
Esta página foi útil?
⌘I

