com.trendmicro.ds.platform.rest.api

## Interface IAdministratorRoleAPI

-     @Path(value="/administrator-roles")
       @Produces(value="application/json")
       @Consumes(value="application/json")
      public interface IAdministratorRoleAPI

  Interface to the Administrator Role API.

  Deep Security uses role-based access control (RBAC) to restrict user permissions to parts of Deep Security. Once you have installed Deep Security Manager, you should create individual accounts for each user and assign each user a role that will restrict their activities to all but those necessary for the completion of their duties. Learn more.

  Rules for administrator roles:

  - Administrators are not permitted to escalate their own privileges by adding rights, hosts, host groups, policies, or access types.
  - Administrators are not permitted to create a new role that has more privileges than their current role has.
  - Administrators who downgrade their privileges by removing rights, hosts, host groups, policies, or access types will not be able to re-escalate to the original state.
  - Administrators with the delegate flag set to true are only allowed to see roles that have equal or lesser privileges to their current role.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModifyAdministratorRoleResponse` | `addRoleHostGroups(java.lang.String sessionID, java.lang.Integer roleID, AddAdministratorRoleHostGroupsRequest addAdministratorRoleHostGroupsRequest)` Update an administrator role with an additional set of host groups.
    `ModifyAdministratorRoleResponse` | `addRoleHosts(java.lang.String sessionID, java.lang.Integer roleID, AddAdministratorRoleHostsRequest addAdministratorRoleHostsRequest)` Update an administrator role with an additional set of hosts.
    `ModifyAdministratorRoleResponse` | `addRolePolicies(java.lang.String sessionID, java.lang.Integer roleID, AddAdministratorRolePoliciesRequest addAdministratorRolePoliciesRequest)` Update an administrator role with an additional set of policies.
    `ModifyAdministratorRoleResponse` | `addRoleRights(java.lang.String sessionID, java.lang.Integer roleID, AddAdministratorRoleRightsRequest addAdministratorRoleRightsRequest)` Update an administrator role with an additional set of rights.
    `CreateAdministratorRoleResponse` | `createRole(java.lang.String sessionID, CreateAdministratorRoleRequest createAdministratorRoleRequest)` Create a new administrator role.
    `void` | `deleteRole(java.lang.String sessionID, java.lang.Integer roleID)` Delete an administrator role.
    `ModifyAdministratorRoleResponse` | `deleteRoleHost(java.lang.String sessionID, java.lang.Integer roleID, java.lang.Integer hostID)` Remove a host from an administrator role.
    `ModifyAdministratorRoleResponse` | `deleteRoleHostGroup(java.lang.String sessionID, java.lang.Integer roleID, java.lang.Integer hostGroupID)` Remove a host group from an administrator role.
    `ModifyAdministratorRoleResponse` | `deleteRolePolicy(java.lang.String sessionID, java.lang.Integer roleID, java.lang.Integer policyID)` Remove a policy from an administrator role.
    `ModifyAdministratorRoleResponse` | `deleteRoleRight(java.lang.String sessionID, java.lang.Integer roleID, java.lang.String rightID)` Remove a right from an administrator role.
    `DescribeAdministratorRoleResponse` | `describeRole(java.lang.String sessionID, java.lang.Integer roleID)` Describe an administrator role.
    `ListAdministratorRolesResponse` | `listRoles(java.lang.String sessionID, java.lang.Integer administratorRoleID, java.lang.String administratorRoleIDOp, java.lang.Integer maxItems)` List administrator roles.
    `ModifyAdministratorRoleResponse` | `modifyRole(java.lang.String sessionID, java.lang.Integer roleID, ModifyAdministratorRoleRequest modifyAdministratorRoleRequest)` Modify an administrator role.
    `ModifyAdministratorRoleResponse` | `modifyRoleHostGroups(java.lang.String sessionID, java.lang.Integer roleID, ModifyAdministratorRoleHostGroupsRequest modifyAdministratorRoleHostGroupsRequest)` Update an administrator role with a new (complete) set of host groups.
    `ModifyAdministratorRoleResponse` | `modifyRoleHosts(java.lang.String sessionID, java.lang.Integer roleID, ModifyAdministratorRoleHostsRequest modifyAdministratorRoleHostsRequest)` Update an administrator role with a new (complete) set of hosts.
    `ModifyAdministratorRoleResponse` | `modifyRolePolicies(java.lang.String sessionID, java.lang.Integer roleID, ModifyAdministratorRolePoliciesRequest modifyAdministratorRolePoliciesRequest)` Update an administrator role with a new (complete) set of policies.
    `ModifyAdministratorRoleResponse` | `modifyRoleRights(java.lang.String sessionID, java.lang.Integer roleID, ModifyAdministratorRoleRightsRequest modifyAdministratorRoleRightsRequest)` Update an administrator role with a new (complete) set of rights.

- - ### Method Detail

    - #### listRoles

          @GET
          ListAdministratorRolesResponse listRoles(@CookieParam(value="sID")
                                                        java.lang.String sessionID,
                                                        @QueryParam(value="administratorRoleID")
                                                        java.lang.Integer administratorRoleID,
                                                        @QueryParam(value="administratorRoleIDOp")
                                                        java.lang.String administratorRoleIDOp,
                                                        @QueryParam(value="maxItems")
                                                        java.lang.Integer maxItems)
                                                 throws java.lang.Exception

      List administrator roles.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `administratorRoleID` - (optional) used to define the starting point for the query. Combine with `administratorRoleIDOp` to page through results.
        `administratorRoleIDOp` - (optional, required if `administratorRoleID` is specified) Currently supported operations are:
        - gt (greater than)
        - ge (greater than or equal to)
        - eq (equal to)
        - lt (less than)
        - le (less than or equal to)
        `maxItems` - (optional) the number of items to retrieve. The maximum value for this parameter is controlled by the "Maximum number of items to retrieve from database" setting on the administrator account, which defaults to 5000.
      Returns:
        a `ListAdministratorRolesResponse` with the administrator roles.
      Throws:
        `java.lang.Exception`

    - #### createRole

          @POST
          CreateAdministratorRoleResponse createRole(@CookieParam(value="sID")
                                                           java.lang.String sessionID,
                                                           CreateAdministratorRoleRequest createAdministratorRoleRequest)
                                                    throws java.lang.Exception

      Create a new administrator role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `createAdministratorRoleRequest` - a `CreateAdministratorRoleRequest` with the details of the administrator role.
      Returns:
        a `CreateAdministratorRoleResponse` with the details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### describeRole

          @GET
           @Path(value="{roleID}")
          DescribeAdministratorRoleResponse describeRole(@CookieParam(value="sID")
                                                                                       java.lang.String sessionID,
                                                                                       @PathParam(value="roleID")
                                                                                       java.lang.Integer roleID)
                                                                                throws java.lang.Exception

      Describe an administrator role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
      Returns:
        a `DescribeAdministratorRoleResponse` with the details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### modifyRole

          @POST
           @Path(value="{roleID}")
          ModifyAdministratorRoleResponse modifyRole(@CookieParam(value="sID")
                                                                                    java.lang.String sessionID,
                                                                                    @PathParam(value="roleID")
                                                                                    java.lang.Integer roleID,
                                                                                    ModifyAdministratorRoleRequest modifyAdministratorRoleRequest)
                                                                             throws java.lang.Exception

      Modify an administrator role.

      Any unset elements in the request object will be left unchanged by the modify request.

      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `modifyAdministratorRoleRequest` - a `ModifyAdministratorRoleRequest` with the details of the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### modifyRoleRights

          @PUT
           @Path(value="{roleID}/rights")
          ModifyAdministratorRoleResponse modifyRoleRights(@CookieParam(value="sID")
                                                                                                java.lang.String sessionID,
                                                                                                @PathParam(value="roleID")
                                                                                                java.lang.Integer roleID,
                                                                                                ModifyAdministratorRoleRightsRequest modifyAdministratorRoleRightsRequest)
                                                                                         throws java.lang.Exception

      Update an administrator role with a new (complete) set of rights.

      Any pre-existing rights for the role will be replaced by the rights specified in the request.

      You can use the `#listRoles(String)` and `describeRole(String, Integer)` APIs to find the "Full Access" role and retrieve a full list of supported right IDs.

      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `modifyAdministratorRoleRightsRequest` - an `ModifyAdministratorRoleRightsRequest` with the new rights for the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### addRoleRights

          @POST
           @Path(value="{roleID}/rights")
          ModifyAdministratorRoleResponse addRoleRights(@CookieParam(value="sID")
                                                                                              java.lang.String sessionID,
                                                                                              @PathParam(value="roleID")
                                                                                              java.lang.Integer roleID,
                                                                                              AddAdministratorRoleRightsRequest addAdministratorRoleRightsRequest)
                                                                                       throws java.lang.Exception

      Update an administrator role with an additional set of rights.

      Any pre-existing rights for the role will be retained and augmented by the rights specified by the request.

      You can use the `#listRoles(String)` and `describeRole(String, Integer)` APIs to find the "Full Access" role and retrieve a full list of supported right IDs.

      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `addAdministratorRoleRightsRequest` - an `AddAdministratorRoleRightsRequest` with the new rights to add to the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### deleteRoleRight

          @DELETE
           @Path(value="{roleID}/rights/{rightID}")
          ModifyAdministratorRoleResponse deleteRoleRight(@CookieParam(value="sID")
                                                                                                            java.lang.String sessionID,
                                                                                                            @PathParam(value="roleID")
                                                                                                            java.lang.Integer roleID,
                                                                                                            @PathParam(value="rightID")
                                                                                                            java.lang.String rightID)
                                                                                                     throws java.lang.Exception

      Remove a right from an administrator role.

      You can use the `describeRole(String, Integer)` API to retrieve the existing set of rights assigned to the role.

      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `rightID` - the right ID.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### modifyRoleHosts

          @PUT
           @Path(value="{roleID}/hosts")
          ModifyAdministratorRoleResponse modifyRoleHosts(@CookieParam(value="sID")
                                                                                              java.lang.String sessionID,
                                                                                              @PathParam(value="roleID")
                                                                                              java.lang.Integer roleID,
                                                                                              ModifyAdministratorRoleHostsRequest modifyAdministratorRoleHostsRequest)
                                                                                       throws java.lang.Exception

      Update an administrator role with a new (complete) set of hosts.

      Administrator roles can have access to all hosts or can be restricted to a set of listed hosts. Access to a host may also be granted if the host is in a host group that the administrator has access to.

      Any pre-existing hosts for the role will be replaced by the hosts specified in the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `modifyAdministratorRoleHostsRequest` - an `ModifyAdministratorRoleHostsRequest` with the new hosts for the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### addRoleHosts

          @POST
           @Path(value="{roleID}/hosts")
          ModifyAdministratorRoleResponse addRoleHosts(@CookieParam(value="sID")
                                                                                            java.lang.String sessionID,
                                                                                            @PathParam(value="roleID")
                                                                                            java.lang.Integer roleID,
                                                                                            AddAdministratorRoleHostsRequest addAdministratorRoleHostsRequest)
                                                                                     throws java.lang.Exception

      Update an administrator role with an additional set of hosts.

      Administrator roles can have access to all hosts or can be restricted to a set of listed hosts. Access to a host may also be granted if the host is in a host group that the administrator has access to.

      Any pre-existing hosts for the role will be retained and augmented by the hosts specified by the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `addAdministratorRoleHostsRequest` - an `AddAdministratorRoleHostsRequest` with the new hosts to add to the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### deleteRoleHost

          @DELETE
           @Path(value="{roleID}/hosts/{hostID}")
          ModifyAdministratorRoleResponse deleteRoleHost(@CookieParam(value="sID")
                                                                                                         java.lang.String sessionID,
                                                                                                         @PathParam(value="roleID")
                                                                                                         java.lang.Integer roleID,
                                                                                                         @PathParam(value="hostID")
                                                                                                         java.lang.Integer hostID)
                                                                                                  throws java.lang.Exception

      Remove a host from an administrator role.

      Administrator roles can have access to all hosts or can be restricted to a set of listed hosts. Access to a host may also be granted if the host is in a host group that the administrator has access to.

      You can use the `describeRole(String, Integer)` API to retrieve the existing set of hosts assigned to the role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `hostID` - the host ID.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### modifyRoleHostGroups

          @PUT
           @Path(value="{roleID}/host-groups")
          ModifyAdministratorRoleResponse modifyRoleHostGroups(@CookieParam(value="sID")
                                                                                                         java.lang.String sessionID,
                                                                                                         @PathParam(value="roleID")
                                                                                                         java.lang.Integer roleID,
                                                                                                         ModifyAdministratorRoleHostGroupsRequest modifyAdministratorRoleHostGroupsRequest)
                                                                                                  throws java.lang.Exception

      Update an administrator role with a new (complete) set of host groups.

      Administrator roles can have access to all host groups or can be restricted to a set of listed host groups (and any child host groups of the listed host groups). Administrators will have access to any host in the set of allowed host groups (and any child host group of the listed host groups).

      Any pre-existing host groups for the role will be replaced by the host groups specified in the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `modifyAdministratorRoleHostGroupsRequest` - an `ModifyAdministratorRoleHostGroupsRequest` with the new host groups for the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### addRoleHostGroups

          @POST
           @Path(value="{roleID}/host-groups")
          ModifyAdministratorRoleResponse addRoleHostGroups(@CookieParam(value="sID")
                                                                                                       java.lang.String sessionID,
                                                                                                       @PathParam(value="roleID")
                                                                                                       java.lang.Integer roleID,
                                                                                                       AddAdministratorRoleHostGroupsRequest addAdministratorRoleHostGroupsRequest)
                                                                                                throws java.lang.Exception

      Update an administrator role with an additional set of host groups.

      Administrator roles can have access to all host groups or can be restricted to a set of listed host groups (and any child host groups of the listed host groups). Administrators will have access to any host in the set of allowed host groups (and any child host group of the listed host groups).

      Any pre-existing host groups for the role will be retained and augmented by the host groups specified by the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `addAdministratorRoleHostGroupsRequest` - an `AddAdministratorRoleHostGroupsRequest` with the new host groups to add to the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### deleteRoleHostGroup

          @DELETE
           @Path(value="{roleID}/host-groups/{hostGroupID}")
          ModifyAdministratorRoleResponse deleteRoleHostGroup(@CookieParam(value="sID")
                                                                                                                         java.lang.String sessionID,
                                                                                                                         @PathParam(value="roleID")
                                                                                                                         java.lang.Integer roleID,
                                                                                                                         @PathParam(value="hostGroupID")
                                                                                                                         java.lang.Integer hostGroupID)
                                                                                                                  throws java.lang.Exception

      Remove a host group from an administrator role.

      Administrator roles can have access to all host groups or can be restricted to a set of listed host groups (and any child host groups of the listed host groups). Administrators will have access to any host in the set of allowed host groups (and any child host group of the listed host groups).

      You can use the `describeRole(String, Integer)` API to retrieve the existing set of host groups assigned to the role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `hostGroupID` - the host group ID.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### modifyRolePolicies

          @PUT
           @Path(value="{roleID}/policies")
          ModifyAdministratorRoleResponse modifyRolePolicies(@CookieParam(value="sID")
                                                                                                    java.lang.String sessionID,
                                                                                                    @PathParam(value="roleID")
                                                                                                    java.lang.Integer roleID,
                                                                                                    ModifyAdministratorRolePoliciesRequest modifyAdministratorRolePoliciesRequest)
                                                                                             throws java.lang.Exception

      Update an administrator role with a new (complete) set of policies.

      Administrator roles can have access to all policies or can be restricted to a set of listed policies.

      Any pre-existing policies for the role will be replaced by the policies specified in the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `modifyAdministratorRolePoliciesRequest` - an `ModifyAdministratorRolePoliciesRequest` with the new policies for the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### addRolePolicies

          @POST
           @Path(value="{roleID}/policies")
          ModifyAdministratorRoleResponse addRolePolicies(@CookieParam(value="sID")
                                                                                                  java.lang.String sessionID,
                                                                                                  @PathParam(value="roleID")
                                                                                                  java.lang.Integer roleID,
                                                                                                  AddAdministratorRolePoliciesRequest addAdministratorRolePoliciesRequest)
                                                                                           throws java.lang.Exception

      Update an administrator role with an additional set of policies.

      Administrator roles can have access to all policies or can be restricted to a set of listed policies.

      Any pre-existing policies for the role will be retained and augmented by the policies specified by the request.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `addAdministratorRolePoliciesRequest` - an `AddAdministratorRolePoliciesRequest` with the new policies to add to the administrator role.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### deleteRolePolicy

          @DELETE
           @Path(value="{roleID}/policies/{policyID}")
          ModifyAdministratorRoleResponse deleteRolePolicy(@CookieParam(value="sID")
                                                                                                                java.lang.String sessionID,
                                                                                                                @PathParam(value="roleID")
                                                                                                                java.lang.Integer roleID,
                                                                                                                @PathParam(value="policyID")
                                                                                                                java.lang.Integer policyID)
                                                                                                         throws java.lang.Exception

      Remove a policy from an administrator role.

      Administrator roles can have access to all policies or can be restricted to a set of listed policies.

      You can use the `describeRole(String, Integer)` API to retrieve the existing set of policies assigned to the role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
        `policyID` - the policy ID.
      Returns:
        a `ModifyAdministratorRoleResponse` with the modified details of the administrator role.
      Throws:
        `java.lang.Exception`

    - #### deleteRole

          @DELETE
           @Path(value="{roleID}")
          void deleteRole(@CookieParam(value="sID")
                                                           java.lang.String sessionID,
                                                           @PathParam(value="roleID")
                                                           java.lang.Integer roleID)
                                                    throws java.lang.Exception

      Delete an administrator role.
      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `roleID` - the role ID.
      Throws:
        `java.lang.Exception`

Copyright © 2017 Trend Micro Inc. All Rights Reserved.