will not set primary_owner if selected user is not an owner
PUT /api/v1/users/:id/set_primary_owner
Parameters
| Name |
Description |
|
id
|
id
|
|
id
|
id
|
Request
Headers
Route
PUT /api/v1/users/1426/set_primary_owner
Body
{}
cURL
curl "http://localhost:3000/api/v1/users/1426/set_primary_owner" -d '{}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: Ecvs7t5KCNs7sx99yZ9Jc6eFxwUfP3Ypxw" \
-H "X-Api-Email: user-320@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
422 Unprocessable Entity
Body
{
"errors": "The user must be an owner in order to assign this role."
}
Request
Headers
Route
PUT /api/v1/users/1426/set_primary_owner
Body
{}
cURL
curl "http://localhost:3000/api/v1/users/1426/set_primary_owner" -d '{}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: Ecvs7t5KCNs7sx99yZ9Jc6eFxwUfP3Ypxw" \
-H "X-Api-Email: user-320@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
422 Unprocessable Entity
Body
{
"errors": "The user must be an owner in order to assign this role."
}