Admits one definition as a future Task Context source, without granting access to its data.
POST
/api/workspace/tasks/configuration/task-definitions/{taskDefinitionId}/context-definitions
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/tasks/configuration/task-definitions/example/context-definitions"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ExpectedDefinitionRowVersion\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\", \"OperationId\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/tasks/configuration/task-definitions/example/context-definitions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ExpectedDefinitionRowVersion":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","OperationId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/tasks/configuration/task-definitions/example/context-definitions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "OperationId": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”taskDefinitionId
required
string
Query Parameters
Section titled “Query Parameters”access_token
string
Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”object
ModuleKey
string
ResourceKind
string
ContextResourceId
string
ExpectedDefinitionRowVersion
string format: uuid
OperationId
string
Examplegenerated
{ "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "OperationId": "example"}object
ModuleKey
string
ResourceKind
string
ContextResourceId
string
ExpectedDefinitionRowVersion
string format: uuid
OperationId
string
Examplegenerated
{ "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "OperationId": "example"}object
ModuleKey
string
ResourceKind
string
ContextResourceId
string
ExpectedDefinitionRowVersion
string format: uuid
OperationId
string
Examplegenerated
{ "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "OperationId": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
Data
object
TaskDefinition
object
TaskDefinitionId
string
Key
string
DisplayName
string
Description
string
State
integer format: int32
ExecutionMode
integer format: int32
SubjectMode
integer format: int32
DefaultPriority
Signed 64-bit integer (-9223372036854775808 through 9223372036854775807). Output is an exact decimal string; do not convert through floating point.
string
InputDataEntityDefinitionId
string
WorkingDataEntityDefinitionId
string
CreatedAtUtc
string format: date-time
ModifiedAtUtc
string format: date-time
CreatedByUserId
string
ModifiedByUserId
string
RowVersion
string format: uuid
Outcomes
Array<object>
object
OutcomeId
string
Code
string
DisplayName
string
Description
string
MetaType
integer format: int32
SortOrder
integer format: int32
IsActive
boolean
CreatedAtUtc
string format: date-time
ModifiedAtUtc
string format: date-time
RowVersion
string format: uuid
Actions
object
CanUpdate
boolean
CanDelete
boolean
CanManageCompletionEligibility
boolean
CanManageActorGrants
boolean
ActorGrants
Array<integer>
CompletionEligibilityRules
Array<object>
object
RuleId
string
OutcomeId
string
Code
string
Expression
string
NormalizedExpression
string
DefaultMessage
string
MessageTranslations
object
key
additional properties
string
Enabled
boolean
SortOrder
integer format: int32
EngineVersion
string
ProfileVersion
integer format: int32
SchemaFingerprint
string
ProfileFingerprint
string
ExpressionFingerprint
string
ArtifactFingerprint
string
Diagnostics
Array<object>
object
Code
string
Message
string
Severity
string
Start
integer format: int32
Length
integer format: int32
DependencyId
string
Dependencies
Array<object>
object
Kind
integer format: int32
DependencyId
string
Path
string
CollectionScope
string
CreatedAtUtc
string format: date-time
ModifiedAtUtc
string format: date-time
RowVersion
string format: uuid
Actions
object
CanUpdate
boolean
CanDelete
boolean
CanRead
boolean
InterruptionReasons
Array<object>
object
ReasonId
string
Code
string
DisplayName
string
Description
string
Kind
integer format: int32
IsActive
boolean
SortOrder
integer format: int32
CreatedAtUtc
string format: date-time
ModifiedAtUtc
string format: date-time
RowVersion
string format: uuid
Actions
object
CanUpdate
boolean
CanDelete
boolean
ExecutionPolicy
object
ExecutionMode
integer format: int32
QueueResponsibleRequired
boolean
PostponementEnabled
boolean
FixedPostponementDelayMinutes
integer format: int32
MaximumPostponementsPerTask
integer format: int32
PauseWarningAfterMinutes
integer format: int32
BlockedWarningAfterMinutes
integer format: int32
AvailableActors
Array<integer>
OutcomeActorGrantDefaults
Array<object>
object
MetaType
integer format: int32
ActorGrants
Array<integer>
Diagnostics
Array<object>
object
Code
string
Message
string
Severity
string
Field
string
ResponsibleRequiredOnCreate
boolean
TransitionRules
Array<object>
object
RuleId
string
FromState
integer format: int32
ToState
integer format: int32
Supported
boolean
Enabled
boolean
ActorGrants
Array<integer>
RowVersion
string format: uuid
Actions
object
CanUpdate
boolean
Actions
object
CanRead
boolean
CanUpdate
boolean
CanSetState
boolean
CanManageOutcomes
boolean
CanManageInterruptionReasons
boolean
CanManageExecutionPolicy
boolean
CanManageTransitions
boolean
CanDelete
boolean
CreationPolicy
object
DueDateMode
integer format: int32
ContextRequired
boolean
ResponsibleRequiredOnCreate
boolean
AllowedContextDefinitions
Array<object>
object
AdmissionId
string
ModuleKey
string
ResourceKind
string
ContextResourceId
string
Key
string
DisplayName
string
IsAvailable
boolean
UnavailableReasonCode
string
RolesAssignments
object
RoleMappings
Array<object>
object
MappingId
string
WorkspaceRoleId
string
InternalRoleKey
string
RowVersion
string format: uuid
ParticipantAdmissions
Array<object>
object
AdmissionId
string
Participant
integer format: int32
SourceKind
integer format: int32
SourceId
string
Sources
Array<object>
object
SourceKind
integer format: int32
Id
string
DisplayName
string
AssignmentPolicy
object
InitialOwner
required
integer format: int32
InitialResponsible
required
integer format: int32
ChangeOwner
required
integer format: int32
ChangeResponsible
required
integer format: int32
Permissions
required
object
Rules
Array<object>
object
Operation
integer format: int32
Grants
Array<object>
object
Actor
required
integer format: int32
State
required
integer format: int32
Collaboration
required
object
Enabled
required
boolean
Comments
object
ReadSources
required
integer format: int32
Owner
required
integer format: int32
PublishTo
required
integer format: int32
Files
object
ReadSources
required
integer format: int32
Owner
required
integer format: int32
PublishTo
required
integer format: int32
Rules
Array<object>
object
Operation
integer format: int32
Grants
Array<object>
object
Actor
required
integer format: int32
State
required
integer format: int32
Instructions
required
object
Enabled
required
boolean
Markdown
string
FileReferenceIds
Array<string>
NumberPrefix
string
SignalProfileId
string
Replayed
boolean
Errors
Array<object>
object
Code
required
string
Message
required
string
Target
string
Field
string
Metadata
object
key
additional properties
string
Type
integer format: int32
Severity
integer format: int32
Warnings
Array<object>
object
Code
required
string
Message
required
string
Target
string
Field
string
Metadata
object
key
additional properties
string
Type
integer format: int32
Severity
integer format: int32
Success
boolean
Example
{ "Data": { "TaskDefinition": { "State": 0, "ExecutionMode": 0, "SubjectMode": 0, "Outcomes": [ { "MetaType": 0, "ActorGrants": [ 0 ], "CompletionEligibilityRules": [ { "Dependencies": [ { "Kind": 0 } ] } ] } ], "InterruptionReasons": [ { "Kind": 0 } ], "ExecutionPolicy": { "ExecutionMode": 0, "AvailableActors": [ 0 ], "OutcomeActorGrantDefaults": [ { "MetaType": 0, "ActorGrants": [ 0 ] } ] }, "TransitionRules": [ { "FromState": 0, "ToState": 0, "ActorGrants": [ 0 ] } ], "CreationPolicy": { "DueDateMode": 0 }, "RolesAssignments": { "ParticipantAdmissions": [ { "Participant": 0, "SourceKind": 0 } ], "Sources": [ { "SourceKind": 0 } ], "AssignmentPolicy": { "InitialOwner": 0, "InitialResponsible": 0, "ChangeOwner": 0, "ChangeResponsible": 0 } }, "Permissions": { "Rules": [ { "Operation": 0, "Grants": [ { "Actor": 0, "State": 0 } ] } ] }, "Collaboration": { "Comments": { "ReadSources": 0, "Owner": 0, "PublishTo": 0 }, "Files": { "ReadSources": 0, "Owner": 0, "PublishTo": 0 }, "Rules": [ { "Operation": 0, "Grants": [ { "Actor": 0, "State": 0 } ] } ] } } }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}