Skip to main content

1E 8.1 (on-premises)

PrincipalRoles

Entity - Role Based Access Control - Interrogates the PrincipalRole table in the database

Verb

Request

Notes

Permissions Required

POST

/Consumer/PrincipalRoles

Creates a new link for Roles to Principals

Example Request

{
        "PrincipalId": 1,
        "RoleId": 2
}

Obsolete as of API version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

  • Write

Returns Unauthorized (401) if user does not have the required permissions.

POST

/Consumer/PrincipalRoles/ SavePrincipal

Creates links between a principal and multiple roles.

Example Request

{
        "PrincipalId": 1,
        "RoleIdList": [ 5, 8, 10]
}

Obsolete as of API version 4.0

Version 8.0: Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

  • Write

Returns Unauthorized (401) if user does not have the required permissions.

DELETE

/Consumer/PrincipalRoles /Role/{RoleId}/ Principal/{PrincipalId }

Deletes a link from the PrincipalRoles table when there is a match on Role ID and Principal ID.

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

  • Delete

Returns Unauthorized (401) if user does not have the required permissions.

POST

/Consumer/PrincipalRoles/ Principal/{principalId}

Creates links between a principal and multiple roles.

principalId (URI) - the Id of the principal that should be assigned the roles.

roleIds (BODY) - an array of Ids for roles that should be assigned to the principal

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type

PUT

/Consumer/PrincipalRoles/ Principal/{principalId}

Replaces existing links between a principal and all of that principal's roles with links to roles passed in the body of the request.

principalId (URI) - the Id of the principal

roleIds (BODY) - an array of Ids for roles that should be assigned to the principal

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type

DELETE

/Consumer/PrincipalRoles/ Principal/{principalId}

Removes links between a principal and multiple roles.

principalId (URI) - the Id of the principal that should be unassigned from the roles.

roleIds (BODY) - an array of Ids for roles that should be unassigned from the principal

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type

POST

/Consumer/PrincipalRoles/ Role/{roleId}

Creates links between a role and multiple principals.

roleId (URI) - the Id of the role that the principals should be assigned to principal

principalIds (BODY) - an array of Ids for principals that should be assigned to the role

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type

PUT

/Consumer/PrincipalRoles/ Role/{roleId}

Replaces existing links between a role and all of that role's principals with links to roles passed in the body of the request.

roleId (URI) - the Id of the role

principalIds (BODY) - an array of Ids for principals that should be assigned to the role

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type

DELETE

/Consumer/PrincipalRoles/ Role/{roleId}

Removes links between a role and multiple principals.

roleId (URI) - the Id of the role that should be unassigned from the principals.

principalIds (BODY) - an array of Ids for principals that should be unassigned from the role

Minimum API version 4.0

Obsolete as of API Version 8.0. Retained for backwards compatibility. Will work as suggested /PrincipalRoleManagementGroup equivalent and will assume Management Group was set to "All Devices".

Requires 'Write' on 'Security' securable type