Blocks API

should return errors

PUT /api/v1/pages/:page_id/blocks/:id

Parameters

Name Description
page_id page id
body body contents
id id
position position
data block-specific data

Request

Headers

Accept: application/json
X-Api-Token: kccxXWsicxyna8PskBQseR-YP8YivTFy8w
X-Api-Email: user-46@example.com

Route

PUT /api/v1/pages/2423/blocks/6484

Body

{"position":1,"data":{"body":1}}

cURL

curl "http://localhost:3000/api/v1/pages/2423/blocks/6484" -d '{"position":1,"data":{"body":1}}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: kccxXWsicxyna8PskBQseR-YP8YivTFy8w" \
	-H "X-Api-Email: user-46@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 74

Status

422 Unprocessable Entity

Body

{
  "errors": {
    "data": [
      "Data [\"body\", \"`body` must be of type String\"]"
    ]
  }
}