Skip to main content
Version: 2.2.1

INSTANCE

This method allows creating and searching for workflow instances.

Creating an instance​

POST /apigateway/se/exp/chatbot/api/instance.php

Query parameters:

Query parametersTypeRequiredDescription
idProcessSTRINGYesID # of the process in the current revision (PMACTREV.IDPROCESS)
cdProductNUMERICYesProcess automation component code (39 for Workflow)
nmInstanceSTRINGYesTitle of the new instance

Example request:

curl -X POST 'https://my-domain.softexpert.com.br/apigateway/se/exp/chatbot/api/instance.php?idProcess=000.DPProcess&cdProduct=39&nmInstance=Your%20instance%20title' \
--header 'Authorization: <your_api_token>'

Example response:

200 OK

{
"success": true,
"response": {
"oid": "1276",
"identifier": "000645"
}
}

Searching for an instance​

GET /apigateway/se/exp/chatbot/api/instance.php

Query parameters:

ID #TypeRequiredDescription
cdProductNumericYesProcess automation component code (39 for Workflow)
cdUserNumericYesStarter user's primary key (ADUSER.CDUSER)
fgLanguageNumericNoLanguage code
fgStatusNumericNoProcess status
qtLimitNumericNoQuantity of results

Example request:

curl -X GET 'https://john.softexpert.com.br/apigateway/se/exp/chatbot/api/instance.php?cdProduct=39&cdUser=86&qtLimit=1' \
--header 'Authorization: <your_api_token>'

Example response:

200 OK

{
"success": true,
"response": {
"total": 1,
"results": [
{
"oid": "1276",
"identifier": "000645",
"title": "Your instance title",
"processStatus": "Progress",
"deadline": "On time",
"slaStatus": "Not applicable",
"instanceStatus": "",
"automationProductCode": 39,
"fgStatus": 1,
"fgSlaStatus": null,
"fgDeadline": 1
}
]
}
}