Skip to content

Instantly share code, notes, and snippets.

@jamesvidler
Last active January 22, 2021 18:44
Show Gist options
  • Save jamesvidler/e682d26403c9a33dbcaf7b10edf0ed4c to your computer and use it in GitHub Desktop.
Save jamesvidler/e682d26403c9a33dbcaf7b10edf0ed4c to your computer and use it in GitHub Desktop.
Get a sitemap in a flat format, ideal for page routing from Agility CMS.
curl https://046a1a87-api.agilitycms.cloud/fetch/en-us/sitemap/flat/website
--header "APIKey: defaultlive.2b7f3a91559d794bedb688358be5e13af2b1e3ae8cd39e8ed2433bbef5d8d6ac"
{
"/home": {
"title": "Home",
"name": "home",
"pageID": 2,
"menuText": "New Home Text",
"visible": {
"menu": false,
"sitemap": false
},
"path": "/home",
"redirect": null,
"isFolder": false
},
"/posts": {
"title": "Posts",
"name": "posts",
"pageID": 3,
"menuText": "Posts",
"visible": {
"menu": false,
"sitemap": false
},
"path": "/posts",
"redirect": null,
"isFolder": false
},
"/posts/sample-post": {
"title": "Sample post",
"name": "sample-post",
"pageID": 6,
"menuText": "Sample post",
"visible": {
"menu": false,
"sitemap": false
},
"path": "/posts/sample-post",
"redirect": null,
"isFolder": false,
"contentID": 27
},
"/posts/how-this-site-works": {
"title": "How this site works!",
"name": "how-this-site-works",
"pageID": 6,
"menuText": "How this site works!",
"visible": {
"menu": false,
"sitemap": false
},
"path": "/posts/how-this-site-works",
"redirect": null,
"isFolder": false,
"contentID": 15
},
"/posts/how-to-handle-seo-with-a-js-app": {
"title": "How to handle SEO with a JS app",
"name": "how-to-handle-seo-with-a-js-app",
"pageID": 6,
"menuText": "How to handle SEO with a JS app",
"visible": {
"menu": false,
"sitemap": false
},
"path": "/posts/how-to-handle-seo-with-a-js-app",
"redirect": null,
"isFolder": false,
"contentID": 16
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment