Post API v1 user by ID roles

Changed on
post/api/v1/user/{id}/roles

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Path parameters

idstring required

ID of the user

Example:1

Request body

$schemastring uri

A URL to the JSON Schema for this object.

role_idstring required

ID of the role to assign

Example request

{
  "$schema": "https://example.com/schemas/AssignRoleRequest.json",
  "role_id": "1"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

user_idstring required

ID of the user

Example response

{
  "$schema": "https://example.com/schemas/AssignRoleResponse.json",
  "role": {
    "id": "1",
    "name": "user"
  },
  "user_id": "1"
}

Changes