Admins API
Manage account role assignments
An Admin object looks like:
{
// The unique identifier for the account role/user assignment
"id": 1023,
// The account role assigned. This can be 'AccountAdmin' or a
// user-defined role created by the Roles API.
"role": "AccountAdmin",
// The user the role is assigned to. See the Users API for details.
"user": {
"id": 8191,
"name": "A. A. Dinwiddie",
"login_id": "bursar@uu.example.edu"
}
}
Make an account admin AdminsController#create
POST /api/v1/accounts/:account_id/admins
Flag an existing user as an admin within the account.
Request Parameters:
-
user_id
The id of the user to promote.
-
role
- Optional
-
The user's admin relationship with the account will be created with the given role. Defaults to 'AccountAdmin'.
-
send_confirmation
- Optional
- 0|1
-
Send a notification email to the new admin if set to '1'; send no email if set to '0'. Default is '1'.
Remove account admin AdminsController#destroy
DELETE /api/v1/accounts/:account_id/admins/:user_id
Remove the rights associated with an account admin role from a user.
Request Parameters:
-
role
- Optional
-
Account role to remove from the user. Defaults to 'AccountAdmin'. Any other account role must be specified explicitly.
List account admins AdminsController#index
GET /api/v1/accounts/:account_id/admins
List the admins in the account
Returns a list of Admins