is creatable
POST /api/v1/pages/:page_id/blocks/
Parameters
| Name |
Description |
|
page_id
|
page id
|
|
body
|
body contents
|
|
id
|
id
|
|
position
|
position
|
|
page_id
|
page id
|
|
course_id
|
course id
|
|
partial
|
partial
|
Request
Headers
Route
POST /api/v1/pages/2447/blocks/
Body
{"id":6563,"position":1,"course_id":301,"partial":"full_width_image"}
cURL
curl "http://localhost:3000/api/v1/pages/2447/blocks/" -d '{"id":6563,"position":1,"course_id":301,"partial":"full_width_image"}' -X POST \
-H "Accept: application/json" \
-H "X-Api-Token: MfaPyxXgMzBZAjEVACEys29KanGCiqWwmA" \
-H "X-Api-Email: user-54@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
201 Created
Body
{
"created_at": "2019-10-31T22:07:50Z",
"are_dependencies_met": true,
"partial": "full_width_image",
"position": 1,
"data": {
"background_image_url": null,
"background_opacity": null,
"body": null
},
"page_id": 2447,
"course_id": 301,
"is_hidden": false,
"id": 6564,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "6564",
"description": "",
"image_url": null
}
}