is updatable
PUT /api/v1/pages/:id
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
|
|
css_properties
|
css_properties
|
Request
Headers
Route
PUT /api/v1/pages/1120
Body
{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e","css_properties":{"main":{"background_size":{"value":"cover","value_type":"cover"}}}}
cURL
curl "http://localhost:3000/api/v1/pages/1120" -d '{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e","css_properties":{"main":{"background_size":{"value":"cover","value_type":"cover"}}}}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: rrGdXRzaxmtQpGyVoPL8SoQ_KXsxRWUysw" \
-H "X-Api-Email: user-79@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
202 Accepted
Body
{
"created_at": "2019-10-31T22:02:05Z",
"draft": null,
"friendly_url": "page_slug",
"title": "a page title",
"meta_description": null,
"feature": "school_pages",
"content": "<div>pagecontent</div>",
"show_header": true,
"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": 1120,
"skip_block_loop_wrapper": null,
"custom_head_code": null,
"css_properties": {
"main": {
"background_size": {
"value": "cover",
"value_type": "cover"
}
}
},
"draft_of_id": null,
"updated_at": "2019-10-31T22:02:05Z",
"compatibles": {
},
"meta": {
"class": "page",
"url": null,
"name": "1120",
"description": "a page title",
"image_url": null
},
"blocks": [
]
}