Listar definições de blocos
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-config \
--header 'X-Organization-id: <x-organization-id>'import requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
headers = {"X-Organization-id": "<x-organization-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Organization-id': '<x-organization-id>'}};
fetch('https://reporter.sandbox.lerian.net/v1/templates/blocks-config', 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://reporter.sandbox.lerian.net/v1/templates/blocks-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Organization-id: <x-organization-id>"
],
]);
$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://reporter.sandbox.lerian.net/v1/templates/blocks-config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
.header("X-Organization-id", "<x-organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-id"] = '<x-organization-id>'
response = http.request(request)
puts response.read_body{
"blocks": [
{
"type": "loop",
"label": "Loop",
"category": "control",
"acceptsChildren": true,
"properties": [
{
"name": "collection",
"type": "string",
"required": true
}
]
},
{
"type": "field",
"label": "Field",
"category": "data",
"acceptsChildren": false,
"properties": [
{
"name": "path",
"type": "string",
"required": true
}
]
}
]
}Listar definições de blocos
Use este endpoint para recuperar o catálogo de tipos de bloco disponíveis no construtor de templates, incluindo as propriedades configuráveis e a categoria de cada bloco. Use-o para descobrir quais blocos você pode combinar ao compor um template.
GET
/
v1
/
templates
/
blocks-config
Listar definições de blocos
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-config \
--header 'X-Organization-id: <x-organization-id>'import requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
headers = {"X-Organization-id": "<x-organization-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Organization-id': '<x-organization-id>'}};
fetch('https://reporter.sandbox.lerian.net/v1/templates/blocks-config', 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://reporter.sandbox.lerian.net/v1/templates/blocks-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Organization-id: <x-organization-id>"
],
]);
$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://reporter.sandbox.lerian.net/v1/templates/blocks-config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
.header("X-Organization-id", "<x-organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-id"] = '<x-organization-id>'
response = http.request(request)
puts response.read_body{
"blocks": [
{
"type": "loop",
"label": "Loop",
"category": "control",
"acceptsChildren": true,
"properties": [
{
"name": "collection",
"type": "string",
"required": true
}
]
},
{
"type": "field",
"label": "Field",
"category": "data",
"acceptsChildren": false,
"properties": [
{
"name": "path",
"type": "string",
"required": true
}
]
}
]
}Cabeçalhos
O token de autorização no formato 'Bearer '.
Importante: Este header é obrigatório se o seu ambiente tiver o Access Manager habilitado. Para mais informações, consulte a documentação do Access Manager.
O identificador único da Organização associada à requisição.
Resposta
200 - application/json
O catálogo de definições de blocos disponíveis no construtor de templates.
Definições de blocos disponíveis.
Show child attributes
Show child attributes
Esta página foi útil?
⌘I

