returns a validation error
PUT /api/v1/pages/:id/update_from_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
PUT /api/v1/pages/1173/update_from_draft
Body
{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e"}
cURL
curl "http://localhost:3000/api/v1/pages/1173/update_from_draft" -d '{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e"}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: 1oUoy9Rjtt3xQsNW_HaM-xjuyqrNy7S6bA" \
-H "X-Api-Email: user-101@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
422 Unprocessable Entity
Body
{
"errors": {
"base": [
"The specified page does not have a draft."
]
}
}