Listar definiciones de bloques
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-configimport requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
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",
]);
$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)
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")
.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)
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 definiciones de bloques
Utiliza este endpoint para obtener el catálogo de tipos de bloque disponibles en el constructor de plantillas, incluyendo las propiedades configurables y la categoría de cada bloque. Úsalo para descubrir qué bloques puedes combinar al componer una plantilla.
GET
/
v1
/
templates
/
blocks-config
Listar definiciones de bloques
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-configimport requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
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",
]);
$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)
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")
.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)
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
}
]
}
]
}¿Esta página le ayudó?
⌘I

