Skip to content

Latest commit

 

History

History
357 lines (199 loc) · 11.1 KB

ProcessInstanceApi.md

File metadata and controls

357 lines (199 loc) · 11.1 KB

\ProcessInstanceApi

All URIs are relative to https://CHANGEME.api.processmaker.io/api/v1

Method HTTP request Description
AddInstance Post /processes/{process_id}/instances
DeleteInstance Delete /processes/{process_id}/instances/{instance_id}
FindByFieldInsideDataModel Get /processes/{process_id}/datamodels/search/{search_param}
FindDataModel Get /processes/{process_id}/instances/{instance_id}/datamodel
FindInstanceById Get /processes/{process_id}/instances/{instance_id}
FindInstances Get /processes/{process_id}/instances
FindTaskInstancesByInstanceAndTaskId Get /instances/{instance_id}/tasks/{task_id}/task_instances
FindTaskInstancesByInstanceAndTaskIdDelegated Get /instances/{instance_id}/tasks/{task_id}/task_instances/delegated
FindTaskInstancesByInstanceAndTaskIdStarted Get /instances/{instance_id}/tasks/{task_id}/task_instances/started
FindTokens Get /processes/{process_id}/instances/{instance_id}/tokens
UpdateInstance Put /processes/{process_id}/instances/{instance_id}

AddInstance

InstanceItem AddInstance($processId, $instanceCreateItem)

This method creates a new instance.

Parameters

Name Type Description Notes
processId string Process ID related to the instance
instanceCreateItem InstanceCreateItem JSON API response with the instance object to add

Return type

InstanceItem

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteInstance

ResultSuccess DeleteInstance($processId, $instanceId)

This method deletes an instance using the instance ID and the process ID.

Parameters

Name Type Description Notes
processId string Process ID
instanceId string ID of the instance to delete

Return type

ResultSuccess

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindByFieldInsideDataModel

DataModelCollection FindByFieldInsideDataModel($processId, $searchParam, $page, $perPage)

This method returns the data model by field passed in get argument.

Parameters

Name Type Description Notes
processId string ID of the process to return
searchParam string Key and value of searched field in DataModel
page int32 Page number to fetch [optional] [default to 1]
perPage int32 Amount of items per page [optional] [default to 15]

Return type

DataModelCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindDataModel

DataModelItem1 FindDataModel($processId, $instanceId, $page, $perPage)

This method returns the instance data model and lets the user work with it directly.

Parameters

Name Type Description Notes
processId string ID of the process to return
instanceId string ID of the instance to return
page int32 Page number to fetch [optional] [default to 1]
perPage int32 Amount of items per page [optional] [default to 15]

Return type

DataModelItem1

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindInstanceById

InstanceItem FindInstanceById($processId, $instanceId)

This method retrieves an instance using its ID.

Parameters

Name Type Description Notes
processId string ID of the process to return
instanceId string ID of the instance to return

Return type

InstanceItem

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindInstances

InstanceCollection FindInstances($processId, $page, $perPage)

This method retrieves instances related to the process using the process ID

Parameters

Name Type Description Notes
processId string Process ID related to the instances
page int32 Page number to fetch [optional] [default to 1]
perPage int32 Amount of items per page [optional] [default to 15]

Return type

InstanceCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindTaskInstancesByInstanceAndTaskId

TaskInstanceCollection FindTaskInstancesByInstanceAndTaskId($instanceId, $taskId)

This method retrieves task instances using the instance ID and the task ID.

Parameters

Name Type Description Notes
instanceId string ID of the instance
taskId string ID of the task

Return type

TaskInstanceCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindTaskInstancesByInstanceAndTaskIdDelegated

TaskInstanceCollection FindTaskInstancesByInstanceAndTaskIdDelegated($instanceId, $taskId)

This method retrieves delegated task instances using the instance ID and the task ID.

Parameters

Name Type Description Notes
instanceId string ID of the instance
taskId string ID of the task

Return type

TaskInstanceCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindTaskInstancesByInstanceAndTaskIdStarted

TaskInstanceCollection FindTaskInstancesByInstanceAndTaskIdStarted($instanceId, $taskId)

This method retrieves started task instances using the instance ID and the task ID.

Parameters

Name Type Description Notes
instanceId string ID of the instance
taskId string ID of the task

Return type

TaskInstanceCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindTokens

TokenCollection FindTokens($processId, $instanceId, $page, $perPage)

This method retrieves tokens related to the process and instance using the process and instance IDs

Parameters

Name Type Description Notes
processId string Process ID
instanceId string Instance ID related to the process
page int32 Page number to fetch [optional] [default to 1]
perPage int32 Amount of items per page [optional] [default to 15]

Return type

TokenCollection

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateInstance

InstanceItem UpdateInstance($processId, $instanceId, $instanceUpdateItem)

This method updates an existing instance.

Parameters

Name Type Description Notes
processId string ID of the process to retrieve
instanceId string ID of the instance to retrieve
instanceUpdateItem InstanceUpdateItem Instance object to edit

Return type

InstanceItem

Authorization

PasswordGrant

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]