Enables scripted content fragments to use Roless
Methods
Create
Create Overload 1
Creates a role
Velocity
#set($roleResponse = $core_v2_role.Create($name, $description))
JavaScript
var roleResponse = core_v2_role.Create(name, description);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Name | Required | ||
description | String | Description | Required |
Create Overload 2
Creates a role
Velocity
#set($roleResponse = $core_v2_role.Create($name, $description, "%{ GroupId = $groupIdArg, Include = $includeArg, RoleId = $roleIdArg, RoleName = $roleNameArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var roleResponse = core_v2_role.Create(name, description, { GroupId: groupIdArg, Include: includeArg, RoleId: roleIdArg, RoleName: roleNameArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Name | Required | ||
description | String | Description | Required | ||
options | Options | Set of optional parameters including: | Required | ||
GroupId | Int32 | Group Id | Optional | ||
Include | String | Include | Optional | user | |
RoleId | Int32 | Either RoleId or RoleName is required when using include=user | Optional | ||
RoleName | String | Either RoleId or RoleName is required when using include=user | Optional | ||
UserId | Int32 | Either UserId or Username is required when using include=user | Optional | ||
Username | String | Either UserId or Username is required when using include=user | Optional |
Returns
CreateFromLdap
CreateFromLdap Overload 1
Creates a role based on an LDAP group
Velocity
#set($roleResponse = $core_v2_role.CreateFromLdap($ldapGroupName))
JavaScript
var roleResponse = core_v2_role.CreateFromLdap(ldapGroupName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ldapGroupName | String | Ldap Group Name | Required |
CreateFromLdap Overload 2
Creates a role based on an LDAP group
Velocity
#set($roleResponse = $core_v2_role.CreateFromLdap($ldapGroupName, $distinguishedName))
JavaScript
var roleResponse = core_v2_role.CreateFromLdap(ldapGroupName, distinguishedName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ldapGroupName | String | Ldap Group Name | Required | ||
distinguishedName | String | Distinguished Name | Required |
Returns
Delete
Delete Overload 1
Deletes a role
Velocity
#set($additionalInfoResponse = $core_v2_role.Delete($roleId))
JavaScript
var additionalInfoResponse = core_v2_role.Delete(roleId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required |
Delete Overload 2
Deletes a role
Velocity
#set($additionalInfoResponse = $core_v2_role.Delete($roleId, "%{ Include = $includeArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var additionalInfoResponse = core_v2_role.Delete(roleId, { Include: includeArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
Include | String | Include | Optional | user | |
UserId | Int32 | User Id | Optional | ||
Username | String | Username | Optional |
Returns
Find
Searches for a role
Velocity
#set($apiListResponse = $core_v2_role.Find($matchText))
JavaScript
var apiListResponse = core_v2_role.Find(matchText);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
matchText | String | Match Text | Required |
Returns
Get
Get Overload 1
Gets a role
Velocity
#set($roleResponse = $core_v2_role.Get($roleId))
JavaScript
var roleResponse = core_v2_role.Get(roleId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required |
Get Overload 2
Gets a role
Velocity
#set($roleResponse = $core_v2_role.Get($application, $id, $roleId))
JavaScript
var roleResponse = core_v2_role.Get(application, id, roleId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
application | String | Application | Required | ||
id | Nullable of Int32 | Id | Required | ||
roleId | Int32 | Role Id | Required |
Get Overload 3
Gets a role
Velocity
#set($roleResponse = $core_v2_role.Get($application, $id, $roleId, "%{ Include = $includeArg, IncludePermissions = $includePermissionsArg }"))
JavaScript
var roleResponse = core_v2_role.Get(application, id, roleId, { Include: includeArg, IncludePermissions: includePermissionsArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
application | String | Application | Required | ||
id | Nullable of Int32 | Id | Required | ||
roleId | Int32 | Role Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
Include | String | Include | Optional | denied, granted | |
IncludePermissions | Boolean | Include Permissions | Optional |
Returns
List
List Overload 1
Lists roles
Velocity
#set($pagedListResponse = $core_v2_role.List())
JavaScript
var pagedListResponse = core_v2_role.List();
List Overload 2
Lists roles for an application
Velocity
#set($pagedListResponse = $core_v2_role.List($application))
JavaScript
var pagedListResponse = core_v2_role.List(application);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
application | String | Application | Required |
List Overload 3
Lists roles
Velocity
#set($pagedListResponse = $core_v2_role.List("%{ Application = $applicationArg, Id = $idArg, Include = $includeArg, IncludePermissions = $includePermissionsArg, IncludeWithAvatarOnly = $includeWithAvatarOnlyArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PermissionId = $permissionIdArg, UserId = $userIdArg, Username = $usernameArg }"))
JavaScript
var pagedListResponse = core_v2_role.List({ Application: applicationArg, Id: idArg, Include: includeArg, IncludePermissions: includePermissionsArg, IncludeWithAvatarOnly: includeWithAvatarOnlyArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, PermissionId: permissionIdArg, UserId: userIdArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
Application | String | Application | Optional | ||
Id | Int32 | Id | Optional | ||
Include | String | Include | Optional | denied, granted, user | |
IncludePermissions | Boolean | Include Permissions | Optional | ||
IncludeWithAvatarOnly | Boolean | Will only return roles that have avatars. For use with include=user only. | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
PermissionId | String | Permission Id | Optional | ||
UserId | Int32 | Either UserId or Username are required when using include=user | Optional | ||
Username | String | Either UserId or Username are required when using include=user | Optional |
Returns
Update
Update Overload 1
Updates a role
Velocity
#set($roleResponse = $core_v2_role.Update($roleId, $name, $description))
JavaScript
var roleResponse = core_v2_role.Update(roleId, name, description);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required | ||
name | String | Name | Required | ||
description | String | Description | Required |
Update Overload 2
Updates a role
Velocity
#set($roleResponse = $core_v2_role.Update($roleId, $name, $description, "%{ GroupId = $groupIdArg }"))
JavaScript
var roleResponse = core_v2_role.Update(roleId, name, description, { GroupId: groupIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required | ||
name | String | Name | Required | ||
description | String | Description | Required | ||
options | Options | Set of optional parameters including: | Required | ||
GroupId | Int32 | Group Id | Optional |