Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt Include
ESLP:Anywhere and Complete Users Specific API (snippet)
ESLP:Anywhere and Complete Users Specific API (snippet)
nopaneltrue

The Add User to a Role API adds a user to a role.   

Note
You can use the Get Roles API to find the role ID (id) and the user ID / member ID (id).

...

Sample request

Code Block
languagetext
POST https://api.armor.com/roles/4/members/3

...

Input

Excerpt Include
ESLP:API table parts (snippet)
ESLP:API table parts (snippet)
nopaneltrue

API Call / URLMethod / Type
/roles/{id}/members/{userId}POST


Excerpt Include
ESLP:Parameters to include (snippet)
ESLP:Parameters to include (snippet)
nopaneltrue

ParameterDescriptionFormatRequired or optionalExample
idThe ID for the roleIntegerRequired4
userIDThe ID for the user / memberIntegerRequired3


...

Sample return

StatusResponse
200
Code Block
languagetext
{
 "roleId": 4,
 "id": 3,
 "firstName": "John",
 "lastName": "Smith",
 "email": "john.smith@example.com",
 "createdDate": "2015-01-07T00:46:24.157",
 "isEnabled": true
}
400
Code Block
languagetext
{
 "error": true,
 "message": "Invalid request: User cannot be found for the account"
}

Output

...


...