RoleService

Manages the roles in XL Deploy's security system.

GET /security/role/ Lists the names of all available roles in the security system.
GET /security/role/exists/{name} Checks if role with given name exists
POST /security/role/principals Update principals for existing role
GET /security/role/principals Lists all role principals available in the security system.
GET /security/role/roles Lists the roles of the currently logged in user.
GET /security/role/roles/{username} Lists the roles of a user.
GET /security/role/v2 Lists the names of all available roles in the security system.
GET /security/role/v2/principals Lists paged role principals available in the security system for given role name pattern
GET /security/role/v2/roles Lists the roles of the currently logged in user.
GET /security/role/v2/roles/{username} Lists the roles of a user.
GET /security/role/v2/{id:.+} List the roles for given configuration item ID
PUT /security/role/{role} Creates a new role.
POST /security/role/{role} Renames a role.
DELETE /security/role/{role} Removes a role from the XL Deploy security system.
POST /security/role/{role}/principals Assigns a role to a user or group.
PUT /security/role/{role}/{principal} Assigns a role to a user or group.
DELETE /security/role/{role}/{principal} Removes a role from a user or group.

GET /security/role/

Lists the names of all available roles in the security system.
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/exists/{name}

Checks if role with given name exists
Parameters
Path name String checked role name
Response body
boolean - true or false
Content type: application/xml

POST /security/role/principals

Update principals for existing role
Parameters
Request body application/xml RolePrincipals rolePrincipals.role for which the rolePrincipals.principals is applied to
Response body
Empty

GET /security/role/principals

Lists all role principals available in the security system.
Response body
List of RolePrincipals
Content type: application/xml

GET /security/role/roles

Lists the roles of the currently logged in user.
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/roles/{username}

Lists the roles of a user.
Permissions
security#edit
Parameters
Path username String the username of the principal
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/v2

Lists the names of all available roles in the security system.
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/v2/principals

Lists paged role principals available in the security system for given role name pattern
Parameters
Query rolePattern String the role name pattern used for search
Request body application/xml Paging search paging
Query order Ordering search order
Response body
List of RolePrincipals
Content type: application/xml

GET /security/role/v2/roles

Lists the roles of the currently logged in user.
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/v2/roles/{username}

Lists the roles of a user.
Permissions
security#edit
Parameters
Path username String the username of the principal
Response body
List of String - a list of role names.
Content type: application/xml

GET /security/role/v2/{id:.+}

List the roles for given configuration item ID
Parameters
Path id String configuration item ID
Query rolePattern String the role name pattern used for search
Request body application/xml Paging search paging
Query order Ordering search order
Response body
List of Role - a list of roles.
Content type: application/xml

PUT /security/role/{role}

Creates a new role. Does nothing if the role already exists.
Permissions
security#edit
Parameters
Path role String the name of the new role.
Response body
Empty

POST /security/role/{role}

Renames a role. Does nothing if the role does not exist.
Permissions
security#edit
Parameters
Path role String the current name
Request body application/xml String the new name
Response body
Empty

DELETE /security/role/{role}

Removes a role from the XL Deploy security system. All assignments to principals are deleted as well.
Permissions
security#edit
Parameters
Path role String the name of the role to delete.
Response body
Empty

POST /security/role/{role}/principals

Assigns a role to a user or group. The role will be created if it doesn't exist yet.
Permissions
security#edit
Parameters
Path role String the name of the role to assign
Request body application/xml List of String the user or group to assign the role to.
Response body
Empty

PUT /security/role/{role}/{principal}

Assigns a role to a user or group. The role will be created if it doesn't exist yet.
Permissions
security#edit
Parameters
Path role String the name of the role to assign
Path principal String the user or group to assign the role to.
Response body
Empty

DELETE /security/role/{role}/{principal}

Removes a role from a user or group.
Permissions
security#edit
Parameters
Path role String the name of the role to remove
Path principal String the user or group to remove the role from.
Response body
Empty