Individual users API

will not set primary_owner if current_user is not primary owner

PUT /api/v1/users/:id/set_primary_owner

Parameters

Name Description
id id
id id

Request

Headers

Accept: application/json
X-Api-Token: sa-YGAxmFETh_fkLQRPTjTYK1xaKcqqNDA
X-Api-Email: user-322@example.com

Route

PUT /api/v1/users/1428/set_primary_owner

Body

{}

cURL

curl "http://localhost:3000/api/v1/users/1428/set_primary_owner" -d '{}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: sa-YGAxmFETh_fkLQRPTjTYK1xaKcqqNDA" \
	-H "X-Api-Email: user-322@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Status

204 No Content

Request

Headers

Accept: application/json
X-Api-Token: sa-YGAxmFETh_fkLQRPTjTYK1xaKcqqNDA
X-Api-Email: user-322@example.com

Route

PUT /api/v1/users/1428/set_primary_owner

Body

{}

cURL

curl "http://localhost:3000/api/v1/users/1428/set_primary_owner" -d '{}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: sa-YGAxmFETh_fkLQRPTjTYK1xaKcqqNDA" \
	-H "X-Api-Email: user-322@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

401 Unauthorized

Body

{
  "success": false,
  "error": "Unauthorized",
  "status": 401,
  "message": "You can't do that!"
}