School root route requests API

fails with invalid parameters

PUT /api/v1/school

Parameters

Name Description
name School Name
custom_links_attributes custom links
name name

Request

Headers

Accept: application/json
X-Api-Token: saMct4MTBpU81QWFbg_oXvZTmeXG7oHPHQ
X-Api-Email: user-256@example.com

Route

PUT /api/v1/school

Body

{"name":null}

cURL

curl "http://localhost:3000/api/v1/school" -d '{"name":null}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: saMct4MTBpU81QWFbg_oXvZTmeXG7oHPHQ" \
	-H "X-Api-Email: user-256@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

422 Unprocessable Entity

Body

{
  "errors": {
    "name": [
      "Name can't be blank"
    ]
  }
}