is forbidden
POST /api/v1/pages
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
POST /api/v1/pages
Body
{"id":1112,"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e","template":"fdfgfhds"}
cURL
curl "http://localhost:3000/api/v1/pages" -d '{"id":1112,"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e","template":"fdfgfhds"}' -X POST \
-H "Accept: application/json" \
-H "X-Api-Token: GDKBT8V8F5Cwyq-ArozTvrPZYysiX6uCTg" \
-H "X-Api-Email: user-75@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
422 Unprocessable Entity
Body
{
"errors": {
"template": [
"Template is not valid."
]
}
}