/api/space/user-management/roles/{role-id}/capabilities

The following operations are supported on this resource:

  • GET - Get a collection of capabilities associated with a role
  • GET - Get all capabilities belonging to a role
  • POST - Add a capability to a role
  • PATCH - Update/Delete multiple capabilities for a role
GET /roles/{role-id}/capabilities Version 3

Get a collection of capabilities associated with a role.

Sample Usage

GET /roles/{role-id}/capabilities


  • Parameters:
    Name Type URI Type Description Required
    role-id Integer Path Role ID Y
  • Sample Output XML:
    <capabilities total="Integer" uri="/api/space/user-management/roles/{role-id}/capabilities">
         <capability href="/api/space/user-management/capabilities/{capId}" uri="/api/space/user-management/roles/{role-id}/capabilities/{capId}">
               <id>Integer</id>
               <name>String</name>
         </capability>
    </capabilities>

  • Sample Output JSON:
    {
       "capabilities" : {
         "@total" : "Integer" ,
         "@uri" : "/api/space/user-management/roles/{role-id}/capabilities" ,
         "capability" : {
           "@href" : "/api/space/user-management/capabilities/{capId}" ,
           "@uri" : "/api/space/user-management/roles/{role-id}/capabilities/{capId}" ,
           "id" : "Integer" ,
           "name" : "String"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: ReadRole

    GET /roles/{role-id}/capabilities
    (Deprecated)
    Version 1

    Get all capabilities belonging to a role.

    Sample Usage

    GET /roles/{role-id}/capabilities


    • Parameters:
      Name Type URI Type Description Required
      id int Path The ID of the role for which capabilities will be retrieved. Y
  • Sample Output XML:
    <capabilities
      size="1" uri="/api/space/user-management/roles/65593/capabilities">
      <capability key="65558"
        uri="/api/space/user-management/roles/65593/capabilities/65558"
        href="/api/space/user-management/capabilities/65558">
        <name>SuperCop</name>
      </capability>
    </capabilities>

  • Sample Output JSON:
    {
      "capabilities": {
           "@size":"1",
           "@uri": "/api/space/user-management/roles/65593/capabilities",
           "capability": {
               "@key":"65558",
               "@uri": "/api/space/user-management/roles/65593/capabilities/65558",
               "@href": "/api/space/user-management/capabilities/65558",
               "name":"SuperCop"
           }
      }
    }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    POST /roles/{role-id}/capabilities Version 3

    Add a capability to a role.

    Sample Usage

    POST /roles/{role-id}/capabilities


    • Parameters:
      Name Type URI Type Description Required
      role-id Integer Path Role ID Y
  • Sample Input XML:
    <capability href="/api/space/user-management/capabilities/{capId}">
         <name>String</name>
    </capability>

  • Sample Output XML:
    <capability href="/api/space/user-management/capabilities/{capId}" uri="/api/space/user-management/roles/{role-id}/capabilities/{capability-id}">
         <id>Integer</id>
         <name>String</name>
    </capability>

  • Sample Input JSON:
    {
       "capability" : {
         "@href" : "/api/space/user-management/capabilities/{capId}" ,
         "name" : "String"
       }
    }

  • Sample Output JSON:
    {
       "capability" : {
         "@href" : "/api/space/user-management/capabilities/{capId}" ,
         "@uri" :
         "/api/space/user-management/roles/{role-id}/capabilities/{capability-id}" ,
         "id" : "Integer" ,
         "name" : "String"
       }
    }

  • Access Control

    The following capabilities are required to access this API: ModifyRole

    PATCH /roles/{role-id}/capabilities Version 3

    Update/Delete multiple capabilities for a role.

    Sample Usage

    PATCH /roles/{role-id}/capabilities


    • Parameters:
      Name Type URI Type Description Required
      role-id Integer Path Role ID Y
  • Sample Patch XML:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <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="capabilities">
           <capability href="/api/space/user-management/capabilities/{capId}"/>
       </add>
       <!-- or -->
       <remove sel="capabilities/capability[@some attribute='some value']"/>
       <!-- or using element selection-->
       <remove sel="capabilities/capability[some element='some value']"/>
    </diff>

  • Access Control

    The following capabilities are required to access this API: ModifyRole