Skip to content

Instantly share code, notes, and snippets.

@perryqh
Last active February 27, 2017 19:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perryqh/4bed5a667264f9ae0d6c04b71cfb6333 to your computer and use it in GitHub Desktop.
Save perryqh/4bed5a667264f9ae0d6c04b71cfb6333 to your computer and use it in GitHub Desktop.
Cross CMS Page Copy
// GET /api/v1/cmss (better name needed)
{ "cmss": [
{"client_name": "Cody's Adventure Time",
"site_url": "https://g5-cms-iwmpeigo-cody-test-cms.herokuapp.com"
},
{"client_name": "Another Client",
"site_url": "https://g5-cms-iwmpeigo-another-client.herokuapp.com"
},
]}
// GET /api/content_summary
// this would have multiple locations and pages. Soon it will also have multiple websites per location
{
"content_summary": {
"client_name": "Cody's Adventure Time",
"client_urn": "g5-c-iwmpeigo-cody-test-cms",
"locations": [
{
"location_name": "Magic Man",
"location_urn": "g5-cl-1gqogyb1r9-magic-man-2",
"websites": [
{
"urn": "g5-clw-1wctkmws-magic-man-2",
"content_url": "https://the-cms.com/clients/g5-c-iwmpeigo-cody-test-cms/locations/g5-cl-1gqogyb1r9-magic-man-2/websites/g5-clw-1wctkmws-magic-man-2.json",
"pages": [
{
"name": "Blog",
"slug": "my-blog",
"content_url": "https://the-cms.com/clients/g5-c-iwmpeigo-cody-test-cms/locations/g5-cl-1gqogyb1r9-magic-man-2/websites/g5-clw-1wctkmws-magic-man-2/pages/my-blog.json"
}
]
}
]
}
]
}
}
// POST /api/websites/:website_id/import_pages?source_page_content_url=https://the-cms.com/clients/g5-c-iwmpeigo-cody-test-cms/locations/g5-cl-1gqogyb1r9-magic-man-2/websites/g5-clw-1wctkmws-magic-man-2/pages/my-blog.json
// if page.json's page name already exists under 'website_id' pages, do nothing.
201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment