Get Live Global Components For A Channel
curl --request GET \
--url https://cdn.xm.fabric.inc/api/v2/global-component/liveimport requests
url = "https://cdn.xm.fabric.inc/api/v2/global-component/live"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cdn.xm.fabric.inc/api/v2/global-component/live', 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://cdn.xm.fabric.inc/api/v2/global-component/live",
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://cdn.xm.fabric.inc/api/v2/global-component/live"
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://cdn.xm.fabric.inc/api/v2/global-component/live")
.asString();require 'uri'
require 'net/http'
url = URI("https://cdn.xm.fabric.inc/api/v2/global-component/live")
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[
{
"_id": "60896f629aa7f1000744030b",
"id": "RailNavigation",
"params": {
"homeLinkText": "Home",
"sections": [
{
"sectionTitle": "Get Started",
"sectionLink": "/start",
"subsections": [
{
"subSectionTitle": "What is fabric?",
"subSectionLink": "/what-is-fabric",
"components": []
}
],
"components": []
}
],
"title": "Title"
},
"order": 1
},
{
"_id": "608ad8760536ac00074bec45",
"id": "CustomHeader",
"params": {
"developerSectionText": "developerSectionText",
"developerSectionLinks": [
{
"title": "Knowledge Base",
"description": "Get started",
"link": "https://fabric.inc/knowledgebase",
"components": []
},
{
"title": "API documentation",
"description": "Customize without limits",
"link": "https://api.fabric.inc/",
"components": []
}
]
},
"order": 1
}
]Global Components
Get Live Global Components For A Channel
Gets a list of all the live global component data for a specified channel
GET
/
v2
/
global-component
/
live
Get Live Global Components For A Channel
curl --request GET \
--url https://cdn.xm.fabric.inc/api/v2/global-component/liveimport requests
url = "https://cdn.xm.fabric.inc/api/v2/global-component/live"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cdn.xm.fabric.inc/api/v2/global-component/live', 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://cdn.xm.fabric.inc/api/v2/global-component/live",
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://cdn.xm.fabric.inc/api/v2/global-component/live"
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://cdn.xm.fabric.inc/api/v2/global-component/live")
.asString();require 'uri'
require 'net/http'
url = URI("https://cdn.xm.fabric.inc/api/v2/global-component/live")
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[
{
"_id": "60896f629aa7f1000744030b",
"id": "RailNavigation",
"params": {
"homeLinkText": "Home",
"sections": [
{
"sectionTitle": "Get Started",
"sectionLink": "/start",
"subsections": [
{
"subSectionTitle": "What is fabric?",
"subSectionLink": "/what-is-fabric",
"components": []
}
],
"components": []
}
],
"title": "Title"
},
"order": 1
},
{
"_id": "608ad8760536ac00074bec45",
"id": "CustomHeader",
"params": {
"developerSectionText": "developerSectionText",
"developerSectionLinks": [
{
"title": "Knowledge Base",
"description": "Get started",
"link": "https://fabric.inc/knowledgebase",
"components": []
},
{
"title": "API documentation",
"description": "Customize without limits",
"link": "https://api.fabric.inc/",
"components": []
}
]
},
"order": 1
}
]Was this page helpful?
⌘I
