Search Results for

    Show / Hide Table of Contents

    Method UpdateRoles

    UpdateRoles(String, List<RoleContract>)

    Update a list of roles

    Declaration
    void UpdateRoles(string connectionId, List<RoleContract> roles)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    System.Collections.Generic.List<RoleContract> roles

    A list of roles to be updated

    Examples

    POST http://YourServerName/InfoShare/Json/Common/UpdateRoles

    Example that updates a list of three roles.

    {
       "connectionId": "21ba5e5c-47a4-4291-a785-f509392a20e9",
       "roles": [{
         "Id": "d57c540d-6af5-e911-a4a1-000c2951e18f",
         "Name": "DemoRole1",
         "UserIds": [ "4b13ff62-6af5-e911-a4a1-000c2951e18f", "1fe4ec62-6af5-e911-a4a1-000c2951e18f",
           "053cd862-6af5-e911-a4a1-000c2951e18f" ],
         "GroupIds": [],
         "AllowedActionIds": [ "01002013-38a7-11d8-a902-0050bf427e8f" ....] 
        }, {
         "Id": "eb9acf82-6af5-e911-a4a1-000c2951e18f",
         "Name": "DemoRole2",
         "UserIds": [ "a189cc5d-6af5-e911-a4a1-000c2951e18f", "c283cc5d-6af5-e911-a4a1-000c2951e18f",
           "905bb062-6af5-e911-a4a1-000c2951e18f", "9f85cc5d-6af5-e911-a4a1-000c2951e18" ],
         "GroupIds": [],
         "AllowedActionIds": [ "01002013-38a7-11d8-a902-0050bf427e8f" ....]
        }, {
         "Id": "10c1bfbf-6af5-e911-a4a1-000c2951e18f",
         "Name": "DemoRole3",
         "UserIds": [ "8c7acc5d-6af5-e911-a4a1-000c2951e18f", "3e7dcc5d-6af5-e911-a4a1-000c2951e18f",
           "bb7ecc5d-6af5-e911-a4a1-000c2951e18f", "5080cc5d-6af5-e911-a4a1-000c2951e18f" ....],
         "GroupIds": [],
         "AllowedActionIds": [ "01002013-38a7-11d8-a902-0050bf427e8f" ....]
        }
       ]
    }

    Response:

    { }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    Role not found {roleId} (10046)

    ServiceException

    Name is not unique: {name} (10067)

    ServiceException

    The administrative context {administrativeContext} is already checked out by user {displayLoginName} (10129)

    ServiceException

    Only DCIAdmin is allowed to set the access operation {accessOperation} (10133)

    ServiceException

    Verification code is needed: Verification code not yet verified (10152)

    ServiceException

    Error occurred while processing {role} object {roles[i].Id} (10203)

    ServiceException

    Operation {operationName} not allowed. Missing AccessOperationId {operationId}. (10114)

    ServiceException

    Not enough rights ({accessOperationName}, {accessOperationId}) (10071)

    ServiceException

    ExternalUser must not be assigned to a role {0} (10373)

    ServiceException

    Deleted user {userName} must be not assigned to role {roleName} (10382)

    Back to top Copyright © Kendox