Role
Role
A Role is a collection of permissions that applies to all the users who are assigned to it. Using Roles, you can assign permissions to a group of users rather than assigning permissions individually.
Create
The Create request creates a new role in a stack.
| Name | Type | Description |
|---|---|---|
| model (required) | RoleModel | Role Model for creating Role. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Create(model);CreateAsync
The Create request creates a new role in a stack.
| Name | Type | Description |
|---|---|---|
| model (required) | RoleModel | Role Model for creating Role. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").CreateAsync(model);Delete
The Delete call deletes an existing role from your stack
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").Delete();DeleteAsync
The Delete call deletes an existing role from your stack
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").DeleteAsync();Fetch
The Fetch request returns comprehensive information on a specific role.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Fetch();FetchAsync
The Fetch request returns comprehensive information on a specific role.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").FetchAsync();Query
The Query on Role request returns comprehensive information about all roles created in a stack.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Role().Query();Update
The Update request creates a new role in a stack.
| Name | Type | Description |
|---|---|---|
| model (required) | RoleModel | Role Model for creating Role. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);UpdateAsync
The Update request creates a new role in a stack.
| Name | Type | Description |
|---|---|---|
| model (required) | RoleModel | Role Model for creating Role. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);Rules
Base class for all rules in stack.
| Name | Type | Description |
|---|---|---|
| ACL | String | ACL for the rule |
| Restrict | boolean | Set true to restrict rule. |
AssetRules
Rules for setting on Assets.
| Name | Type | Description |
|---|---|---|
| Assets | List<string> | List of asset for adding into rule. |
| Module | String | Modules for the rules to be applied. |
BranchAliasRules
Rules for setting on branch alias.
| Name | Type | Description |
|---|---|---|
| BranchAlias | List<string> | List of branch alias for adding into rule. |
| Module | string | Modules for the rules to be applied. |
BranchRules
Rules for setting on branch.
| Name | Type | Description |
|---|---|---|
| Branches | List<string> | List of branch for adding into rule. |
| Module | string | Modules for the rules to be applied. |
ContentTypeRules
Rules for setting on content type.
| Name | Type | Description |
|---|---|---|
| ContentTypes | List<string> | List of content types for adding into rule. |
| Module | string | Modules for the rules to be applied. |
EnvironmentRules
Rules for setting on environment.
| Name | Type | Description |
|---|---|---|
| Environments | List<string> | List of environments for adding into rule. |
| Module | string | Modules for the rules to be applied. |
FolderRules
Rules for setting on folders.
| Name | Type | Description |
|---|---|---|
| Folders | List<string> | List of folders for adding into rule. |
| Module | string | Modules for the rules to be applied. |
FieldRules
Rule for the field in content type.
| Name | Type | Description |
|---|---|---|
| Actions | List<Action> | List of action for the field rules. |
| conditions | List<Condition> | List of conditions for the field rules. |
| MatchType | string | Match type for the field. |
TaxonomyRules
Rule for the field in taxonomy.
| Name | Type | Description |
|---|---|---|
| Taxonomies | List<string> | List of Taxonomies for adding into rule |
| Terms | List<strings> | List of Terms for adding into rule. |
| ContentTypes | List<TaxonomyContentType> | List of TaxonomyContentType for adding into this rule |