/api/space/user-management/roles

The following operations are supported on this resource:

  • GET - Get all RBAC roles
  • POST - Add an RBAC role with capabilities associated with it
  • POST - This API is used to import the roles
  • POST - This API is used to import the roles
  • PATCH - Multiple adds/deletes to the roles collection
GET /roles Version 3

Get all RBAC roles.

Sample Usage

GET /roles


  • Sample Output XML:
    <roles total="Integer" uri="/api/space/user-management/roles">
         <role href="/api/space/user-management/roles/{roleId}" uri="/api/space/user-management/roles/{roleId}">
               <id>Integer</id>
               <description>String</description>
               <name>String</name>
               <title>String</title>
               <predefined>Boolean</predefined>
               <less-tasks>String</less-tasks>
         </role>
    </roles>

  • Sample Output JSON:
    {
       "roles" : {
         "@total" : "Integer" ,
         "@uri" : "/api/space/user-management/roles" ,
         "role" : {
           "@href" : "/api/space/user-management/roles/{roleId}" ,
           "@uri" : "/api/space/user-management/roles/{roleId}" ,
           "id" : "Integer" ,
           "description" : "String" ,
           "name" : "String" ,
           "title" : "String" ,
           "predefined" : "Boolean" ,
           "less-tasks" : "String"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: ReadRole, CreateUser, ModifyUser, CreateProfile, ModifyProfile

    POST /roles Version 3

    Add an RBAC role with capabilities associated with it.

    Sample Usage

    POST /roles


  • Sample Input XML:
    <role>
         <title>String</title>
         <description>String</description>
         <less-tasks>String</less-tasks>
         <capabilities>
               <capability href="/api/space/user-management/capabilities/{capId}"/>
         </capabilities>
    </role>

  • Sample Output XML:
    <role href="/api/space/user-management/roles/{roleId}" uri="/api/space/user-management/roles/{id}">
         <id>Integer</id>
         <name>String</name>
         <title>String</title>
         <description>String</description>
         <predefined>Boolean</predefined>
         <sharable>Boolean</sharable>
         <less-tasks>String</less-tasks>
         <capabilities uri="/api/space/user-management/roles/{id}/capabilities">
               <capability
                   href="/api/space/user-management/capabilities/{capId}" uri="/api/space/user-management/roles/{id}/capabilities/{capId}">
                   <id>Integer</id>
                   <name>String</name>
                   <title>String</title>
               </capability>
         </capabilities>
    </role>

  • Sample Input JSON:
    {
       "role" : {
         "title" : "String" ,
         "description" : "String" ,
         "less-tasks" : "String" ,
         "capabilities" : {
           "capability" : {
             "@href" : "/api/space/user-management/capabilities/{capId}"
           }
         }
       }
    }

  • Sample Output JSON:
    {
       "role" : {
         "@href" : "/api/space/user-management/roles/{roleId}" ,
         "@uri" : "/api/space/user-management/roles/{id}" ,
         "id" : "Integer" ,
         "name" : "String" ,
         "title" : "String" ,
         "description" : "String" ,
         "predefined" : "Boolean" ,
         "sharable" : "Boolean" ,
         "less-tasks" : "String" ,
         "capabilities" : {
           "@uri" : "/api/space/user-management/roles/{id}/capabilities" ,
           "capability" : {
             "@href" : "/api/space/user-management/capabilities/{capId}" ,
             "@uri" : "/api/space/user-management/roles/{id}/capabilities/{capId}" ,
             "id" : "Integer" ,
             "name" : "String" ,
             "title" : "String"
           }
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: CreateRole, CloneRole

    POST /roles Version 3

    This API is used to import the roles.

    Sample Usage

    This API makes an asynchronous method call, so you can, optionally, specify queue and schedule parameters:

    POST /roles?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      Name Type URI Type Description Required
      queue Queue URL Query A fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage) N
      schedule cron-like-expression Query Schedule this API in the future, by specifying a cron-like-expression (See Job Scheduling) N
  • Sample Input XML:
    <export-roles-request>
         <roles>
               <role href="/api/space/user-management/roles/{roleId}"/>
         </roles>
    </export-roles-request>

  • Sample Input JSON:
    {
       "export-roles-request" : {
         "roles" : {
           "role" : {
             "@href" : "/api/space/user-management/roles/{roleId}"
           }
         }
       }
    }

  • POST /roles Version 3

    This API is used to import the roles.

    Sample Usage

    This API makes an asynchronous method call, so you can, optionally, specify queue and schedule parameters:

    POST /roles?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      Name Type URI Type Description Required
      queue Queue URL Query A fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage) N
      schedule cron-like-expression Query Schedule this API in the future, by specifying a cron-like-expression (See Job Scheduling) N
  • Sample Input XML:
    <import-roles-request>
         <roles>
               <role>
                   <title>String</title>
                   <description>String</description>
                   <capabilities total="Integer">
                         <capability>
                             <id>Integer</id>
                             <name>String</name>
                         </capability>
                   </capabilities>
                   <lessTasks>String</lessTasks>
               </role>
         </roles>
    </import-roles-request>

  • Sample Input JSON:
    {
       "import-roles-request" : {
         "roles" : {
           "role" : {
             "title" : "String" ,
             "description" : "String" ,
             "capabilities" : {
               "@total" : "Integer" ,
               "capability" : {
                 "id" : "Integer" ,
                 "name" : "String"
               }
             } ,
             "lessTasks" : "String"
           }
         }
       }
    }

  • PATCH /roles Version 3

    Multiple adds/deletes to the roles collection.

    Sample Usage

    PATCH /roles


  • Sample Patch XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <diff>
           <!--What you see below are just samples of patch operations that may be performed on this DTO.-->
           <!--For more information about patch document format please look at http://http://www.rfc-editor.org/rfc/rfc5261.txt-->
           <add sel="roles"/>
           <!-- or -->
           <remove sel="roles/role[@some attribute='some value']"/>
           <!-- or using element selection-->
           <remove sel="roles/role[some element='some value']"/>
    </diff>

  • Access Control

    The following capabilities are required to access this API: CreateRole, DeleteRole