curl --request GET \
--url https://cdn.xm.fabric.inc/api/global-component/live \
--header 'x-site-context: <x-site-context>'
[
{
"_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
}
]
Returns a list of all the live global component data
curl --request GET \
--url https://cdn.xm.fabric.inc/api/global-component/live \
--header 'x-site-context: <x-site-context>'
[
{
"_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
}
]
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Successful operation
The list of components