Page tree




In This Document 


Was this document useful? 
Your Rating:
Results:
1 Star2 Star3 Star4 Star5 Star
2 rates


Have a suggestion for the Armor Knowledge Base? Send a message to kb@armor.com.



Overview

This API call applies to both Armor Complete and Armor Anywhere users.

The Update Role Name and Permissions API updates the name of the role and adds permissions to the role. 

You can use the Get Roles API to find the role ID.


Sample request

POST https://api.armor.com/roles/10
{
 "name": "Admin",
 "permissions": [
      1,2
 ]
}

Input

The following table describes the different parts of this API call: 

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

The following table describes the parameter (or parameters) for this API call:

ParameterDescriptionFormatRequired or optionalExample
idThe ID for the desired roleIntegerRequired10
nameThe name for the roleStringOptionalAdmin
permissionsThe ID for the permissions to add to the roleStringOptional1

Sample return

StatusResponse
200
{
 "id": 4,
 "name": "Admin",
 "created": "2015-12-13T02:00:46.51",
 "modified": null,
 "members": [
      {
      "id": 2,
      "firstName": "John",
      "lastName": "Smith",
      "email": "john.smith@example.com",
      "added": "2015-12-13T02:01:30.923",
      "enabled": true
      }
 ],
 "permissions": [
      1,
      2,
      3
 ],
 "default": true
}
400
{
 "error": true,
 "message": "Internal Server Error"
}