BulkWorkflowRole
BulkWorkflowRole
BulkWorkflowRole identifies one role to assign in a bulk workflow update. Add it to BulkWorkflowStage.AssignedByRoles before you call the Update method.
When to Use This Class: Use this class once for each role that a bulk workflow update assigns to the entries.
Conceptual Role: Acts as one object of the workflow.assigned_by_roles array in the request body.
Returns: BulkWorkflowRole. One assigned role of a bulk workflow update.
Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| Uid | string? | No | null | UID of the role. Serialized as uid. |
| Name | string? | No | null | Name of the role. Serialized as name. |
Class-Level Notes
Serialization.
- The SDK serializes the model with System.Text.Json and leaves out every property that is null. The SDK does not check the values.
Method Index
BulkWorkflowRole has no methods. Set its properties and pass it as shown in the Class-Level Snippet below.
Class-Level Snippet
The snippet below assigns one role and one user in a bulk workflow update.
using System;
using System.Collections.Generic;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
BulkWorkflowUpdateBody body = new BulkWorkflowUpdateBody()
{
Entries = new List<BulkWorkflowEntry>
{
new BulkWorkflowEntry() { Uid = "<ENTRY_UID>", ContentType = "<CONTENT_TYPE_UID>", Locale = "<LOCALE_CODE>" }
},
Workflow = new BulkWorkflowStage()
{
Uid = "<WORKFLOW_STAGE_UID>",
Comment = "Ready for legal review",
DueDate = "Thu Dec 10 2026",
Notify = true,
AssignedTo = new List<BulkWorkflowUser>
{
new BulkWorkflowUser() { Uid = "<USER_UID>", Name = "Alex Morgan", Email = "<EMAIL>" }
},
AssignedByRoles = new List<BulkWorkflowRole>
{
new BulkWorkflowRole() { Uid = "<ROLE_UID>", Name = "Legal Reviewer" }
}
}
};
try
{
ContentstackResponse response = client.Stack("<API_KEY>").BulkOperation().Update(body);
Console.WriteLine(response.OpenJsonObjectResponse().ToJsonString());
}
catch (ContentstackErrorException e)
{
// Thrown when the API rejects the request
Console.WriteLine($"Request failed: {(int)e.StatusCode} {e.ErrorCode} {e.ErrorMessage}");
}