curl --request GET \
--url https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure', 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://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure",
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-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"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "SectionWidget",
"label": "<string>",
"id": "<string>",
"value": "<unknown>",
"children": "<array>",
"layout": 123,
"enabled": true
}{
"message": "<string>"
}{
"message": "<string>"
}Retrieve an RPC document's structure
Retrieve the document’s structure-preserving tree: a snapshot of the registry form, taken on the first successful structure capture and then pinned unchanged. A document can be ingested, and even parsed, before its structure is captured, so the snapshot may land on a later extraction and an earlier 404 is not necessarily permanent. Returns 404 while no structure is stored, for example sandbox documents and some older documents; check hasStructure on the document first. The response is a plain JSON tree, not JSON-LD.
curl --request GET \
--url https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure', 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://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure",
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-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"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/entities/{entityId}/datasources/mx/rpc/documents/{documentId}/structure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "SectionWidget",
"label": "<string>",
"id": "<string>",
"value": "<unknown>",
"children": "<array>",
"layout": 123,
"enabled": true
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Path Parameters
Response
The document's structure tree (the root node)
A node in a document's structure-preserving tree, mirroring the registry form. The root node carries layout; section nodes carry enabled. A node with children is a container; a node with value is a leaf field. The tree is taken on the first successful structure capture and served as-is, so its field set and nesting follow the registry form and are not guaranteed to be stable across layouts.
Was this page helpful?