Page tree

Overview

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

The Create Role API creates a role with corresponding permissions.    


You can use the Get Permissions API to find the permission ID (id).



Sample request

POST https://api.armor.com/roles
{
 "name": "Role 1",
 "Permissions": [1,2,3]
}

Input

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

API Call / URLMethod / Type
/rolesPOST

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

ParameterDescriptionFormatRequired or optionalExample
nameA name for the newly created roleStringRequiredRole 1
PermissionsThe permission IDs you want to add to the newly created roleIntegersRequired1

Sample return

StatusResponse
200
{
 "id": 8,
 "name": "Role 1",
 "created": "2015-01-07T00:25:05.103",
 "modified": null,
 "members": [],
 "permissions": [
      1,
      2,
      3
 ],
 "default": false
}
400
{
 "error": true,
 "message": "Invalid Request"
}



In this topic



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