Search Results for

    Show / Hide Table of Contents

    Method CreateRole

    CreateRole(String, RoleContract)

    Create a role

    Declaration
    string CreateRole(string connectionId, RoleContract role)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    RoleContract role

    Role to create

    Returns
    Type Description
    System.String

    The created role id

    Examples

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

    Example for create a role.

    {
       "connectionId": "b6742bb8-ef97-44ae-819b-a2fa2200908a",
       "role": {
         "Name": "DemoRole",
         "UserIds": ["0100a003-38a7-11d8-a902-0050bf427e8f","172935af-62e0-e911-a94a-00155d290a08"],
         "GroupIds": [],
         "AllowedActionIds": ["01002040-38a7-11d8-a902-0050bf427e8f","01002042-38a7-11d8-a902-0050bf427e8f",
         "01002006-38a7-11d8-a902-0050bf427e8f","0100206c-38a7-11d8-a902-0050bf427e8f" ....] }
    }

    Response:

    {
       "CreateRoleResult": "06ea644d-67e0-e911-a94a-00155d290a08"
    }
    Exceptions
    Type Condition
    ServiceException

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

    ServiceException

    Name is not unique: {name} (10067)

    ServiceException

    Object with id {id} already exists (10078)

    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

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

    Back to top Copyright © Kendox