When to use Actions:

The API method Action can be used to perform different actions on task. 

Examples on such actions can be following. 


Complete a task.

Assign a performer.


GET /Tasks/{Id}/Actions

Get performable actions and assignable participants for a specific task


VERB
Header
Resource/Id/Selector
Description
Parameters
Return data
GET
Ticket
/Tasks/{Id}/Actions
Lists available actions on a task
Id (string)
Totalcount (int)
Data (array):
Id (string)
Name (string)
Description (string)
CanComment (bool)
MustComment (bool)
MustAssignPerformers (bool)
GET
Ticket
/Tasks/{Id}/Actions/{Id}/AssignableParticipants
Lists the participants that must be assigned with performers when performing the action
Id (string)
(VersionId (string))
Data (array):
Id (string)
Name (string)
GET
Ticket
/Tasks/{Id}/Actions/{Id}/AssignableParticipants/{Id}
Lists the performers that can be assigned to the participant role
Id (string)
Name (string)
Total Count (int):

Data (Array):
Name (string)
Identifier (string)


Perform an action: POST /Tasks/{Id}/Actions/{ActionId}

Perform a specific action for a specific task.

VERB
Header
Resource/Id/Selector
Description
Parameters
Return data
POST
Ticket
/Tasks/{Id}/Actions/{ActionId}


Performs an action on a task. The Success return value will return True if the task was performed successfully. If a subsequent task OR instance was created as a result of the task their respective Ids are returned.


Assign participants with action


Participant assignment is set as a querystring in the /Actions POST.


/Tasks/{Id}/Actions/{ActionId}
?participants=[{participant:'Id',securityIds:'Identifier'}]




Each participant that is to be assigned must be a separate JSON object in an array.


participant:'Id' is the Id of the participant to set which you get from /Tasks/{Id}/Actions/{Id}/AssignableParticipant


securityIds:'Identifier' is the Id of the chosen performer to be set as a participant which you get from Tasks/{Id}/Actions/{Id}/AssignableParticipants/{Id}
Id (string)

ActionId (string)
(Comment (string))
(Participant Assignments (array))
Object:
Success (bool)
(InstanceId (string))
(TaskId (string))