creates and returns a draft
GET /api/v1/pages/:id/draft
Parameters
| Name |
Description |
|
id
|
id
|
|
friendly_url
|
text, url for page
|
|
show_footer
|
show page footer, boolean
|
|
show_header
|
show header, boolean
|
|
is_published
|
show to public?
|
|
title
|
page title
|
|
content
|
page content(HTML)
|
|
template
|
template
|
|
course_id
|
course_id
|
Request
Headers
Route
GET /api/v1/pages/1059/draft?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E
Query Parameters
friendly_url: page_slug
show_footer: false
show_header: true
title: a page title
content: <div>pagecontent</div>
cURL
curl "http://localhost:3000/api/v1/pages/1059/draft?friendly_url=page_slug&show_footer=false&show_header=true&title=a+page+title&content=%3Cdiv%3Epagecontent%3C%2Fdiv%3E" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: LDd7ZHv-DkzKLzPadzXXU1PyZzqw83RPnw" \
-H "X-Api-Email: user-57@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"created_at": "2019-10-31T22:01:56Z",
"draft": null,
"friendly_url": "ebd11712a51e82f9ba43af1b8e9d60d4",
"title": "Page Title",
"meta_description": null,
"feature": "school_pages",
"content": "Page Content",
"show_header": false,
"show_footer": false,
"show_nav_background_color": null,
"is_published": true,
"blank_page_template": false,
"published_at": null,
"template": "rich_text",
"course_id": null,
"id": 1060,
"skip_block_loop_wrapper": null,
"custom_head_code": null,
"css_properties": {
},
"draft_of_id": 1059,
"updated_at": "2019-10-31T22:01:56Z",
"compatibles": {
},
"meta": {
"class": "page",
"url": null,
"name": "1060",
"description": "Page Title",
"image_url": null
},
"blocks": [
]
}