Unofficial documentation how to do interesting things and work around problems in ProcessMaker
Forum rules: Unofficial documentation for features which have not been tested by Quality Assurance or may change in future versions of ProcessMaker
User avatar
By amosbatto
#813844
The following REST endpoints are used by the ProcessMaker App installed on mobile devices. Although originally designed for the mobile app, these endpoints can be used in any context and they often return more information than the normal REST endpoints. They are defined in workflow/engine/src/ProcessMaker/Services/Api/Light.php and call code in workflow/engine/src/ProcessMaker/BusinessModel/Light.php.

All these endpoints and their methods are explained below.

Cases
The following REST endpoints are used to manage cases in ProcessMaker.
1. To do
2. Draft
3. Participated
4. Paused
5. Unassigned
6. Counters
7. History of a Case
8.Get Case Information
9. Get Case Variables
10. List of Processes to Start Case
11. Start a New Case
12. Claim case
13. Pause Case
14. Unpause Case
15. Cancel Case
16. Delete Case

Filters for listing cases
The endpoints which return a list of cases, will sort by default the cases in descending order according to their case number, which means that cases created more recently will be listed first. Additional GET parameters can be included in the URL to change how many cases are returned, what database field is used to sort the cases and the sort order, plus include filters to only return cases from a specified process or process category or search for cases which contain a specified string.

URL Parameters:
ParameterDescriptionDefault valueExample
start={number}The number of cases where the list begins. If set to 0, then begins with the first case. 1 begins with the second case, 2 begins with the third case, etc.0/api/1.0/workflow/light/todo?start=2&limit=3
limit={number}The maximum number of cases in the list.25/api/1.0/workflow/light/todo?start=9&limit=10
sort={field}The field in the wf_{WORKSPACE}.APP_CACHE_VIEW table by which the list of cases is sorted. The default is "APP_CACHE_VIEW.APP_NUMBER", which lists cases in the order they were created.APP_CACHE_VIEW.APP_NUMBER/api/1.0/workflow/light/todo?sort=APP_CACHE_VIEW.APP_UPDATE_DATE
dir={order}The order by which cases are listed which can be "ASC" (ascending) or "DESC" (descending).DESC/api/1.0/workflow/light/todo?dir=ASC
cat_uid={uid}The unique ID of a category. Only return cases whose process is in the specified category. To find the UIDs for categories in the wf_{WORKSPACE} database, use the following query:SELECT CATEGORY_UID, CATEGORY_NAME FROM PROCESS_CATEGORY;/api/1.0/workflow/light/todo?cat_uid=11609821854ca4355344560009542371
pro_uid={uid}The unique ID of a process. Only return cases for the specified process. To find the UIDs for processes in the wf_{WORKSPACE} database, use the following query: SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';/api/1.0/workflow/light/todo?pro_uid=28468941754ca473f9db401077958260
search={string}Case insensitive search for cases in the case's title and current task title. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3./api/1.0/workflow/light/todo?search=Evaluate%20Costs
Case Object
The GET endpoints which return cases (such as /light/todo, /light/draft, etc.) enclose the information about each case in the following case object:
Element Description Example
{ Begin case object.
"caseId": Unique ID of case. "422421989577a713e044781056477977"
"delIndex": Delegation index of case, which counts tasks executed in the case, starting from 1. "1"
"user": { Begin user object.
"userId": Unique ID of user currently assigned to work on case. "00000000000000000000000000000001"
}, End user object.
"task": { Begin task object.
"taskId": Unique ID of current task in case. "7983935495320c1a75e1df6068322280"
"name": The title of the current task in the case. "Task 1"
}, End task object.
"process": { Begin process object.
"processId": Unique ID of the case's process. "2317283235320c1a36972b2028131767"
"name": The title for the case's process. "My process title"
}, End Process object.
"caseNumber": The Case Number, which counts cases in the workspace, starting from 1. "66"
"caseTitle": The case title, which by default is its case number, but can be customized by task properties. "#66"
"date": Datetime in "YYYY-MM-DD HH:MM:SS" format when current task was initiated. If a self service task which hasn't yet been claimed by a user, then set to null. "2016-08-09T20:06:42+00:00"
"delegateDate": Datetime in "YYYY-MM-DD HH:MM:SS" format when case was routed to the current task. "2016-07-04T14:22:58+00:00"
"delRiskDate": Datetime in "YYYY-MM-DD HH:MM:SS" format when the current task was completed. Set to null if not yet completed. null
"prevUser": { Begin Previous User object.
"userId": Unique ID of the previous user assigned to case. Set to empty string if the first task in the case and the current user is the first user assigned to the case. "00000000000000000000000000000001"
"fullName": Username of the previous user assigned to work on case. "Administrator"
"firstName": First name of the previous user assigned to work on case. "Administrator"
"lastName": Last name of the previous user assigned to work on case. "admin"
}, End Process object.
"dueDate": Datetime in "YYYY-MM-DD HH:MM:SS" format when the current task is due (scheduled to be completed). "2014-03-17 15:43:55"
"currentUser": { Begin Current User object.
"userId": Unique ID of the user currently assigned to case. Set to empty string if the first task in the case and the current user is the first user assigned to the case. "00000000000000000000000000000001"
"firstName": First name of the user currently assigned to work on case. "Administrator"
"lastName": Last name of the user currently assigned to work on case. "admin"
"fullName": Username of the user currently assigned to work on case. "Administrator"
}, End Current User object.
} End Case object.
Get To Do Cases: GET /light/todo
Get the list of To Do cases for the logged in user. Cases with "TO DO" status that have been assigned to the user.

GET /api/1.0/{workspace}/light/todo

Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/todo
filtersSee Filters for Listing cases./api/1.0/workflow/light/todo?search=credit
Example:
If a successful, then the HTTP status code is set to 200 and an array of case objects is returned.
Response
Code: Select all
200(OK)
Content-Type: application/json
[
    {
        "caseId": "422421989577a713e044781056477977",
        "delIndex": "2",
        "user": {
            "userId": "00000000000000000000000000000001"
        },
        "task": {
            "taskId": "2684827585776b59b8c34b5064594501",
            "name": "Task 2"
        },
        "process": {
            "processId": "381625817577673ab580328067165018",
            "name": "Credit Card Application"
        },
        "caseNumber": "504",
        "caseTitle": "#504",
        "date": "2016-08-09T20:06:42+00:00",
        "delegateDate": "2016-07-04T14:22:58+00:00",
        "delRiskDate": "2016-07-05T12:46:58+00:00",
        "prevUser": {
            "userId": "00000000000000000000000000000001",
            "fullName": "admin",
            "firstName": "Administrator",
            "lastName": " "
        },
        "dueDate": "2016-07-05T14:22:58+00:00"
    },
    {
        ...
    }
]
 


If an error occurred, then the HTTP status code will be set to 400 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400,
        "message": "Bad Request: The category with $cat_uid: '93718116854ca5884585758048057153' does not exist."
    }
}
 



Get Draft Cases: GET /light/draft

Get the list of Draft cases for the logged-in user.

GET /api/1.0/{workspace}/light/draft

Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/draft
filtersSee Filters for Listing cases./api/1.0/workflow/light/draft?search=credit
Example:
If a successful, then the HTTP status code is set to 200 and an array of case objects.

Response
Code: Select all
200(OK)
Content-Type: application/json
[
    {
        "caseId": "9463806155759e4e35d8c91002221350",
        "delIndex": "1",
        "user": {
            "userId": "00000000000000000000000000000001"
        },
        "currentUser": {
            "userId": "00000000000000000000000000000001",
            "firstName": "Administrator",
            "lastName": "admin",
            "fullName": "admin"
        },
        "task": {
            "taskId": "3922729495759b6bf9a6a28080991458",
            "name": "Task 1"
        },
        "process": {
            "processId": "912929092570c0d4df0cda9009595707",
            "name": "Credit Card Application"
        },
        "caseNumber": "18",
        "caseTitle": "#18",
        "date": "2016-06-09T21:51:31+00:00",
        "delegateDate": "2016-06-09T21:51:31+00:00",
        "dueDate": "2016-06-10T17:00:00+00:00"
    },
    {
        ...
    } 
]
 
If an error occurred, then the HTTP status code will be set to 400 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400,
        "message": "Bad Request: The category with $cat_uid: '93718116854ca5884585758048057153' does not exist."
   }
}
 


Get Participated Cases: GET /light/participated

Get the list of cases in which the logged in user has participated.

GET /api/1.0/{workspace}/light/participated

Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/participated
filtersSee Filters for Listing cases./api/1.0/workflow/light/participated?search=credit
Example:
If successful, then the HTTP status code is set to 200 and an array of case objects is returned.

Response
Code: Select all
200(OK)
Content-Type: application/json
[
    {
        "caseId": "878540039577a6423024c28051620897",
        "delIndex": "2",
        "currentUser": {
            "userId": "00000000000000000000000000000001",
            "fullName": "admin",
            "firstName": "Administrator",
            "lastName": "admin"
        },
        "task": {
            "taskId": "9450348655776b5c2ad4f78047229126",
            "name": "Unrecognized Country"
        },
        "process": {
            "processId": "381625817577673ab580328067165018",
            "name": "Credit Card Application"
        },
        "caseNumber": "45",
        "caseTitle": "#45",
        "delegateDate": "2016-07-04T13:27:06+00:00",
        "prevUser": {
            "userId": "22515869157606b4a666b53060146617",
            "fullName": "alex",
            "firstName": "Alex",
            "lastName": "Shepherd"
        },
        "dueDate": "2016-07-05T13:27:06+00:00",
        "date": "2016-07-04T13:27:06+00:00"
    },
    {
        ....
    }
]    
 
If an error occurred, then the HTTP status code will be set to 400 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400,
        "message": "Bad Request: The category with $cat_uid: '93718116854ca5884585758048057153' does not exist."
    }
}
 


Get Paused Cases: GET /light/paused
Get a list of paused cases which are assigned to the logged-in user.

GET /api/1.0/{workspace}/light/paused
Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/paused
filtersSee Filters for Listing cases./api/1.0/workflow/light/paused?search=training
Example:
If a successful, then the HTTP status code is set to 200 and an array of case objects is returned.

Response
Code: Select all
200(OK)
Content-Type: application/json
[
    {
        "caseId": "878540039577a6423024c28051620897",
        "currentUser": {
            "userId": "00000000000000000000000000000001",
            "fullName": "admin",
            "firstName": "Administrator",
            "lastName": "admin"
        },
        "task": {
            "taskId": "9450348655776b5c2ad4f78047229126",
            "name": "Unrecognized Country"
        },
        "process": {
            "processId": "381625817577673ab580328067165018",
            "name": "Credit Card Application"
        },
        "caseNumber": "45",
        "caseTitle": "#45",
        "delIndex": "2",
        "delegateDate": "2016-07-04T13:27:06+00:00",
        "prevUser": {
            "userId": "22515869157606b4a666b53060146617",
            "fullName": "alex",
            "firstName": "Alex",
            "lastName": "Shepherd"
        },
        "dueDate": "2016-07-05T13:27:06+00:00",
        "date": "2016-07-04T13:27:06+00:00"
    },
    {
        ....
    }
]
 
If an error occurred, then the HTTP status code will be set to 400 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400,
        "message": "Bad Request: The category with $cat_uid: '93718116854ca5884585758048057153' does not exist."
    }
}
 


Get Unassigned Cases: GET /light/unassigned
Get the list of Unassigned cases, which the logged-in user may claim (i.e., assign to him/herself to work on). These are cases whose current task have a self-service assignment rule, but have not yet been claimed by any user.
GET /api/1.0/{workspace}/light/unassigned
Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/unassigned
filtersSee Filters for Listing cases./api/1.0/workflow/light/unassigned?search=training
Example:
If a successful, then the HTTP status code is set to 200 and an array of case objects is returned.

Response
Code: Select all
200(OK)
Content-Type: application/json
[
    {
        "caseId": "37826538057bb2246879296081817606",
        "delIndex": "2",
        "caseNumber": "47",
        "prevUser": {
            "userId": "00000000000000000000000000000001",
            "firstName": "Administrator",
            "lastName": "admin",
            "fullName": "admin"
        },
        "task": {
            "taskId": "1791371925744bfb6d275f3023702129",
            "name": "Set a decision"
        },
        "process": {
            "processId": "4639232115744bf606b4d45009686397",
            "name": "Accounting Review"
        },
        "delegateDate": "2016-08-22T16:03:49+00:00",
        "dueDate": "2016-08-23T16:03:49+00:00",
        "caseTitle": "#47",
        "date": "2016-08-22T16:03:47+00:00",
        "currentUser": {
            "userId": "",
            "firstName": "",
            "lastName": "",
            "fullName": ""
        }
    },
    {
        ....
    }
]
 
If an error occurred, then the HTTP status code will be set to 400 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400,
        "message": "Bad Request: The category with $cat_uid:"93718116854ca5884585758048057153' does not exist."
    }
}


Get Cases Counters: GET /light/counters

Returns a list of the counters of the different cases types of the workspace, including cases with "Cancelled", "Paused", "Unassigned" and "Completed" status.

GET /api/1.0/{workspace}/light/counters

URL Parameters:
NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/counters
Result:
If a successful request, the HTTP status code is 200 and it returns a JSON array of the object with the following structure:

Element Description Example
[Start array
{Start user object
"toDo"Number of cases in the inbox tray."8"
"draft"Number of cases in the draft tray."131"
"cancelled"Number of cases cancelled."32"
"participated"Number of cases where the user has participated."238"
"paused"Number of cases paused."0"
"completed"Number of cases completed."22"
"unassigned"Number of cases unassigned."0"
}End user object.
]End array.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "toDo": "8",
    "draft": "131",
    "cancelled": "32",
    "participated": "238",
    "paused": "0",
    "completed": "22",
    "unassigned": 0
}
 



Get History of a Case: GET /light/history/{app_uid}

Get the case history.

GET /api/1.0/{workspace}/light/history/{app_uid}

URL Parameters:
ParameterDescriptionExample
workspaceWorkspace name which by default is "workflow"./api/1.0/workflow/light/history/37213410154d375de3e3620044382558
app_uidCase's unique ID./api/1.0/workflow/light/history/37213410154d375de3e3620044382558
Example:
If the case was found, then the HTTP status code is set to 200 and an array of case objects is returned.

Response
Code: Select all
200(OK)
Content-Type: application/json
{
    "data": {
        "processName": "Credit Card Application",
        "flow": [
            {
                "dueDate": "2016-07-01T16:25:31+00:00",
                "taskName": "",
                "userFullName": "Shepherd Alex",
                "flowStatus": ""
            },
            {
                "dueDate": "2016-07-01T16:25:37+00:00",
                "taskName": "Review",
                "userFullName": "admin Administrator",
                "flowStatus": "PAUSE"
            }
        ]
    },
    "totalCount": 2
}
 


If an error occurs, the HTTP status code is 400 or greater and an error object is returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: The row '' in table Application doesn't exist!"
    }
}
 


Get Case Information: GET /light/{type}/case/{app_uid}

Get information about a case and its task with the highest delegation index. The type of this case must be paused, unassigned or participated.

GET /api/1.0/{workspace}/light/{type}/case/{app_uid}

URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/paused/case/115968518533473068ad299078535175
typeType of the case. Must be paused, unassigned or participated./api/1.0/workflow/light/paused/case/115968518533473068ad299078535175
app_uidUnique ID of the case./api/1.0/workflow/light/paused/case/115968518533473068ad299078535175
Example:

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "0": {
        "case": {
        "caseNumber": "9"
        }
    },
    "case": {
        "caseId": "45516967758064bb0551cc1070923288",
        "caseTitle": "#9",
        "caseNumber": 9,
        "caseStatus": "DRAFT",
        "processId": "84326857657e19c29b19ff1098422424",
        "caseDescription": "",
        "caseCreator": "Alex Shepherd",
        "caseCreateDate": "2016-10-18T16:20:00+00:00",
        "caseUpdateData": "2016-10-18T16:46:17+00:00",
        "processTitle": "Credit Card Application"
    },
    "task": {
        "taskId": "27028966657e19c5037c429053080948",
        "delDelegateDate": "2016-10-18T16:20:00+00:00",
        "delInitDate": "2016-10-18T16:20:00+00:00",
        "delDueDate": "2016-10-19T16:20:00+00:00",
        "delFinishDate": "2016-10-18T16:46:27+00:00",
        "currentUser": "Administrator admin",
        "taskTitle": "Task 1"
    }
}
 


Get Case Variables: GET /light/{app_uid}/variables
Get the variables of a case. Take into consideration that the access to the case variables is denied if the user is not assigned as a Supervisor of the process or does not have permissions to access the case.

GET /api/1.0/{workspace}/light/{app_uid}/variables

This endpoint retrieves the update date of case variables as an extra property: SYS_VAR_UPDATE_DATE, if the parameters pro_uid, act_uid and app_index are sent.

GET /api/1.0/{workspace}/light/{app_uid}/variables?pro_uid={pro_uid}&act_uid={act_uid}&app_index={app_index}


Parameters:
Name Type Description Example
workspace String Workspace name /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables
app_uid String Unique ID of the case. /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables

Optional Filters:
NameTypeDescriptionExample
pro_uid String UID of the process. /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables?pro_uid=90644396857dae0132d9b37009028033&act_uid=37860360657db0cd0a05515076176831&app_index=1&dyn_uid=234234234234234
dyn_uid String UID of the DynaForm. /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables?pro_uid=90644396857dae0132d9b37009028033&act_uid=37860360657db0cd0a05515076176831&app_index=1&dyn_uid=234234234234234
act_uid String UID of the task. /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables?pro_uid=90644396857dae0132d9b37009028033&act_uid=37860360657db0cd0a05515076176831&app_index=1&dyn_uid=234234234234234
app_index Integer Delegation index number. /api/1.0/workflow/light/951507568581c9b2e7ab470094006704/variables?pro_uid=90644396857dae0132d9b37009028033&act_uid=37860360657db0cd0a05515076176831&app_index=1&dyn_uid=234234234234234

Example:
Response

If a successful request, the HTTP status code is 200 and it returns a JSON array of the object.
Code: Select all
200 (OK)
Content-Type: application/json
{
    "SYS_LANG": "en",
    "SYS_SKIN": "neoclassic",
    "SYS_SYS": "workflow312Of",
    "APPLICATION": "601043701581c9ad1299149025005028",
    "PROCESS": "381625817577673ab580328067165018",
    "TASK": "225443088577673db78a911081439178",
    "INDEX": "2",
    "USER_LOGGED": "97628784158120686bfdbf6054947768",
    "USR_USERNAME": "cybil",
    "lastNameCustomer": "Grady",
    "lastNameCustomer_label": "Grady",
    "firstNameCustomer": "Travis",
    "firstNameCustomer_label": "Travis",
    "addressCustomer": "372 Holden Street",
    "addressCustomer_label": "372 Holden Street",
    "phoneNumber": "619-264-7537",
    "phoneNumber_label": "619-264-7537",
    "emailCustomer": "travil@mail.com",
    "emailCustomer_label": "travil@mail.com",
    "companyPosition": "General Chief",
    "companyPosition_label": "General Chief",
    "companyName": "ABS Coorporation",
    "companyName_label": "ABS Coorporation",
    "amountCredit": "123.000",
    "amountCredit_label": "123.000",
    "evaluationComments": "None",
    "evaluationComments_label": "None",
    "APP_NUMBER": "56",
    "PIN": "JT4K"
    "SYS_VAR_UPDATE_DATE": "2016-11-11 14:26:55"
}
 

List of Processes to Start Case: GET /light/start-case

Retrieves all the available processes from which the logged-in user can start a case.

GET /api/1.0/{workspace}/light/start-case

Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/start-case
Result:
If a successful request, the HTTP status code is 200 and it returns a JSON array of the object with the following structure:

Element Description Example
[Start array
{Start case object
"text"Title of the process and initial task."Absence Request (Open a Request)
"processId"Process unique ID."2410651855744c04c56e721060945387"
"taskId"Task unique ID."9742128435744c0721a6f61093288102"
"forms": [Dynaforms contained in the task's steps.
{Start forms object.
"formId"Dynaform ID."86667198657ebc4150e8708021876427"
"formUpdateDate"Datetime on ISO 8601 format of the last time when the DynaForm was updated."2016-09-28T19:11:54+00:00"
"index"Delegation index.1
"title"Title of the Form."Client Information"
"descripcion"Description of the Form.""
"stepId"Step unique ID."37641926057ebc8fca3f913091191934"
"stepUidObj"The object's unique ID."86667198657ebc4150e8708021876427"
"stepMode"The mode of the DynaForm that can be "EDIT" or "VIEW"."EDIT"
"stepPosition"The positive integer for the step in the task. The first step in a task has a POSITION of 1, the second step is 2, etc.1
"triggers": {Triggers assigned to the form.
"before"If a trigger is assigned before the form, the value will be true. If not, false.true
"after"If a trigger is assigned before the form, the value will be true. If not, false.false
}End triggers object.
}End Form object.
{Start Form object.
...Adittional forms.
}End Form object.
]End Forms array.
}End Case Object.
]End array.

Example:

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "text": "Absence Request (Open a Request)",
        "processId": "2410651855744c04c56e721060945387",
        "taskId": "9742128435744c0721a6f61093288102",
        "forms": [
        {
        `   "formId": "61099243157753817adb231009141631",
            "formUpdateDate": "2016-06-30T15:19:02+00:00",
            "index": 1,
            "title": "User Info",
            "description": "",
            "stepId": "6443481445775390b3b2d43016229909",
            "stepUidObj": "61099243157753817adb231009141631",
            "stepMode": "EDIT",
            "stepPosition": 1,
            "triggers": {
                "before": false,
                "after": false
            }
        }  
        ]
    },
    {
        ...
    }
]  

Start a New Case: POST /light/process/{pro_uid}/task/{task_ID}/start-case

Start a new case and assign the logged-in user to work on the initial task in the case. Note that the logged-in user must be in the pool of assigned users for the initial task. Also note that the new case's status will be set to "DRAFT", not "TO_DO".

POST /api/1.0/{workspace}/light/process/{pro_uid}/task/{task_ID}/start-case

URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/83975219757bb4e97617419089589121/start-case
pro_uidUnique ID of the process./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/83975219757bb4e97617419089589121/start-case
task_IDUnique ID of the task where to start the case. It recommended that this be a task with a start event, but it is possible to specify a task in the middle of the process which doesn't have a start event./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/83975219757bb4e97617419089589121/start-case
POST Parameters:
None.
Example:
If the new case was created, then the HTTP status code is set to 200 (OK) and there is a return value.
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "caseId": "21362304657befa1dce95e9027894765",
    "caseIndex": 1,
    "caseNumber": 54
}
 
If the status code is 300 or higher then an error occurred, and an error object will usually be returned, such as:
Code: Select all
{
    "error": {
        "code": 404,
        "message": "Not Found"
    }  
}
 


Claim case: POST /light/case/{app_uid}/claim

Claim an unassigned case, the user logged-in will be assigned to the unassigned case.
POST /api/1.0/{workspace}/light/case/{app_uid}/claim

Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/case/37826538057bb2246879296081817406/claim
app_uidIntegerUnique ID of the unassigned case./api/1.0/workflow/light/case/37826538057bb2246879296081817406/claim
POST Parameters:
None.

Example:

If the case note was claimed, then the HTTP status code is set to 200 (OK) and there is the following return value.
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
If the status code is 300 or higher then an error occurred, and an error object will usually be returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: this case has 0 delegations"
    }
}
 

Pause Case: POST /light/cases/{app_uid}/pause

Pause a case.
POST /api/1.0/{workspace}/light/cases/{app_uid}/pause

Warning: In order to pause a case, the logged-in user should either be currently assigned to work on the case or should have access to the case as a Process Supervisor.

URL Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/pause
app_uidCase's unique ID./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/pause
PUT Parameters:
ParameterDescriptionExample
unpauseDateThe date when the case will be unpaused. This date must be ISO-8601 format. If the case will be paused indefinitely, then set this parameter as "" (empty string)."2016-08-25T16:46:28+00:00"
noteContent Content of the note "Reason to pause the case" "Paused for vacations"
notifyUserSet to 1 to notify users of the case.To not notify, set to 0.0
Example:
If successful, then the HTTP status code will be set to 200 and there will be a return value.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "success": true,
    "msg": "The Case 44 was paused successfully and it will be unpaused on date 2016-08-25T16:46:28+00:00"
}

 
If an error occurred, then the HTTP status code will be 300 or greater and an error object will be returned, such as:
Code: Select all
{
    "error": {
        "code":    400
        "message": "Bad Request: The application with $app_uid: '55519601555ba4b4bd5a3c9097861253' does not exist."
   }
}
 



Unpause Case: POST /light/cases/{app_uid}/unpause

Unpause a case which was previously paused. After being unpaused, the case may be opened and worked on again.

POST /api/1.0/{workspace}/light/cases/{app_uid}/unpause

Warning: In order to unpause a case, the logged-in user should either be currently assigned to work on the case or should have access to the case as a Process Supervisor.

URL Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/unpause
app_uidCase's unique ID./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/unpause
POST Parameters:
None.

Example:
If successful, then the HTTP status code is set to 200 and there is a return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
Otherwise, the HTTP status code is set to 300 or higher and an error object is returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Case with \"925018310577539e5bbb773070531031\" not paused."
    }
}
 

Cancel Case: POST /light/cases/{app_uid}/cancel

Cancel a case assigned to the user logged-in. The case's status is changed to "CANCELLED" and it is no longer possible to open or changed the case, but all the data for the case remain in the database.

POST /api/1.0/{workspace}/light/cases/{app_uid}/cancel

Warning: The logged-in user should only be able to cancel a case if he/she is the the currently assigned user to the case or the logged-in user has the PM_CANCELCASE permission in his/her role.

Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/cancel
app_uidCase's unique ID./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/cancel
Example:
If successful, the HTTP status code is set to 200 and there is a return value.
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
If an error occurred, then the HTTP status code is set to 300 or greater, and an error object is returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: The user with \"78967285157606ac915b021069317429\" is invalid to cancel the Case."
    }
}
 


Delete Case: DELETE /light/cases/{app_uid}/delete

Delete a case, which means that its record is removed from the wf_{WORKSPACE}.APPLICATION table, so its case data is deleted. Other information may remain about the case in other database tables, such as APP_DELEGATION, APP_DOCUMENT, APP_MESSAGE, etc., plus any files uploaded or generated in the case will remain in the shared directory on the ProcessMaker server. Only cases in their initial task may be deleted by the currently assigned user to the case.

For all other cases, it is recommended to cancel them using PUT /cases/{app_uid}/cancel.

DELETE /api/1.0/{workspace}/light/case/{app_uid}/delete

URL Parameters:
/delete
ParameterDescriptionExample
workspaceWorkspace name which by default is "workflow"./api/1.0/workflow/light/case/37213410154d375de3e3620044382558
app_uidCase's unique ID./api/1.0/workflow/cases/37213410154d375de3e3620044382558
Example:
If the case was deleted, the HTTP status code is set to 200 and there is a message as response.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "message": "Command executed successfully"
}
 
If an error occurs, the HTTP status code is 400 or greater and an error object is returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: The row '74093967055b108960031d3070921393' in table Application doesn't exist!"
    }
}
 


DynaForms
The following REST endpoints are used to manage DynaForms in ProcessMaker.


1.(GET) Get Dynaforms List

2.(GET) Delete a Case

3.(GET) Get Steps for Task



Get Dynaforms List: GET /light/project/{prj_uid}/dynaforms

Get the list of DynaForms and its components of a process.

GET /api/1.0/{workspace}/light/project/{prj_uid}/dynaforms

Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaforms
prj_uidStringProject UID/api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaforms
Result:
TypeDescription
arrayReturns an array of dynaforms objects
Example:
If successful, then the HTTP status code is set to 200 and there is a return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "formId": "797514119549986dda6ae12073466457",
        "formTitle": "form 0002",
        "formDescription": "",
        "formContent": {
            ...
        },
        "index": 0
    },
    {
        "formId": "2597913595499668b8540a7080223994",
        "formTitle": "form 0001",
        "formDescription": "",
        "formContent": {
            ...
        },
        "index": 1
    }
]
 
Example:
Code: Select all
[
    {
    "formId": "74914630757b5d6c9b533d8008317507",
    "formTitle": "Credit Card Application",
    "formDescription": "",
    "formContent": {
      "name": "Credit Card Application",
      "description": "",
      "items": [
        {
          "type": "form",
          "variable": "",
          "var_uid": "",
          "dataType": "",
          "id": "74914630757b5d6c9b533d8008317507",
          "name": "Credit Card Applications",
          "description": "",
          "mode": "edit",
          "script": {
            "type": "js",
            "code": " "
          },
          "language": "en",
          "externalLibs": "",
          "printable": false,
          "items": [
            [
              {
                "type": "title",
                "id": "title0000000001",
                "label": "Masks",
                "colSpan": 12
              }
            ],
            [
              {
                "type": "text",
                "variable": "textVar",
                "var_uid": "76839253557b5d7042eaa44075145043",
                "dataType": "string",
                "protectedValue": false,
                "id": "textVar",
                "name": "textVar",
                "label": "textVar",
                "defaultValue": "",
                "placeholder": "",
                "hint": "",
                "required": false,
                "textTransform": "none",
                "validate": "",
                "validateMessage": "",
                "maxLength": 1000,
                "formula": "",
                "mode": "parent",
                "operation": "",
                "datasource": "database",
                "dbConnection": "workflow",
                "dbConnectionLabel": "PM Database",
                "sql": "",
                "dataVariable": "",
                "var_name": "textVar",
                "colSpan": 12,
                "optionsSql": [],
                "data": {
                  "value": "",
                  "label": ""
                }
              }
            ],
            [
              {
                "type": "grid",
                "variable": "gridVar",
                "var_uid": "76229858357bb04f6acb2a0004165894",
                "dataType": "grid",
                "protectedValue": false,
                "id": "clientsGrid",
                "name": "gridVar",
                "label": "clientsGrid",
                "hint": "",
                "required": false,
                "columns": [
                  {
                    "type": "text",
                    "variable": "",
                    "var_uid": "",
                    "dataType": "",
                    "protectedValue": false,
                    "id": "Description",
                    "name": "Description",
                    "label": "Description",
                    "defaultValue": "",
                    "placeholder": "",
                    "hint": "",
                    "required": false,
                    "textTransform": "none",
                    "validate": "",
                    "validateMessage": "",
                    "maxLength": 1000,
                    "formula": "",
                    "mode": "parent",
                    "operation": "",
                    "datasource": "database",
                    "dbConnection": "workflow",
                    "dbConnectionLabel": "PM Database",
                    "sql": "",
                    "dataVariable": "",
                    "columnWidth": "10",
                    "width": 100,
                    "title": "Description",
                    "optionsSql": [],
                    "data": {
                      "value": "",
                      "label": ""
                    }
                  },
                  {
                    ....
                  }
                ],
                "data": [],
                "mode": "parent",
                "layout": "responsive",
                "pageSize": "0",
                "addRow": true,
                "deleteRow": true,
                "title": "clientsGrid",
                "colSpan": 12
              }
            ],
            [
              {
                ...
              }
            ]
          ],
          "variables": [
            {
              "var_uid": "76839253557b5d7042eaa44075145043",
              "prj_uid": "19201561157b5d67817cf26005902199",
              "var_name": "textVar",
              "var_field_type": "string",
              "var_field_size": 10,
              "var_label": "string",
              "var_dbconnection": "workflow",
              "var_dbconnection_label": "PM Database",
              "var_sql": "",
              "var_null": 0,
              "var_default": "",
              "var_accepted_values": "[]",
              "inp_doc_uid": ""
            }
            {
              ....
            }
          ]
        }
      ]
    },
    "formUpdateDate": "2016-08-22 14:43:18",
    "index": 0
  }
]    
 

Get DynaForm(s) Information: POST /light/project/{prj_uid}/dynaforms

Retrieves a detailed information of one or more Dynaforms of a process.

POST /api/1.0/{workspace}/light/project/{prj_uid}/dynaforms

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/project/{prj_uid}/dynaforms
prj_uidUnique ID of the project UID /api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaforms
POST Fields:
NameTypeDescription
formIdStringThe unique ID of the Dynaform.
Example:
Request
Code: Select all
Content-Type: form-data
    formId[]:22860717757bb4d5b79cf03096683267
    formId[]:89465332057bb4e62926c97058735850
Response

If successful, the HTTP status code is set to 200 and the response is a array of objects.
Code: Select all
200 (OK)
Content-Type: application/json
[
  {
    "formId": "22860717757bb4d5b79cf03096683267",
    "formTitle": "form1",
    "formDescription": "",
    "formContent": {
      "name": "form1",
      "description": "",
      "items": [
        {
          "type": "form",
          "variable": "",
          "var_uid": "",
          "dataType": "",
          "id": "22860717757bb4d5b79cf03096683267",
          "name": "form1",
          "description": "",
          "mode": "edit",
          "script": "",
          "language": "en",
          "externalLibs": "",
          "printable": false,
          "items": [
            [
              {
                "type": "title",
                "id": "title0000000001",
                "label": "title_1",
                "colSpan": 12
              }
            ],
            [
              {
                "type": "text",
                "variable": "textVar",
                "var_uid": "68545532257bb4d6a644be4069377865",
                "dataType": "string",
                "protectedValue": false,
                "id": "textVar",
                "name": "textVar",
                "label": "Name",
                "defaultValue": "",
                "placeholder": "",
                "hint": "",
                "required": false,
                "textTransform": "none",
                "validate": "",
                "validateMessage": "",
                "maxLength": 1000,
                "formula": "",
                "mode": "parent",
                "operation": "",
                "datasource": "database",
                "dbConnection": "workflow",
                "dbConnectionLabel": "PM Database",
                "sql": "",
                "dataVariable": "",
                "var_name": "textVar",
                "colSpan": 12,
                "optionsSql": [],
                "data": {
                  "value": "",
                  "label": ""
                }
              }
            ],
            [
              {
                "type": "textarea",
                "variable": "textareaVar",
                "var_uid": "41436767557bb4d80932e41013553413",
                "dataType": "string",
                "protectedValue": false,
                "id": "textareaVar",
                "name": "textareaVar",
                "label": "Textarea",
                "defaultValue": "",
                "placeholder": "",
                "hint": "",
                "required": false,
                "validate": "",
                "validateMessage": "",
                "mode": "parent",
                "datasource": "database",
                "dbConnection": "workflow",
                "dbConnectionLabel": "PM Database",
                "sql": "",
                "dataVariable": "",
                "rows": "5",
                "var_name": "textareaVar",
                "colSpan": 12,
                "optionsSql": [],
                "data": {
                  "value": "",
                  "label": ""
                }
              }
            ],
            [
              {
                "type": "submit",
                "id": "submit0000000001",
                "name": "submit0000000001",
                "label": "submit_1",
                "colSpan": 12
              }
            ]
          ],
          "variables": [
            {
              "var_uid": "68545532257bb4d6a644be4069377865",
              "prj_uid": "42517089857bb4d34845871067355246",
              "var_name": "textVar",
              "var_field_type": "string",
              "var_field_size": 10,
              "var_label": "string",
              "var_dbconnection": "workflow",
              "var_dbconnection_label": "PM Database",
              "var_sql": "",
              "var_null": 0,
              "var_default": "",
              "var_accepted_values": "[]",
              "inp_doc_uid": ""
            },
            {
              "var_uid": "41436767557bb4d80932e41013553413",
              "prj_uid": "42517089857bb4d34845871067355246",
              "var_name": "textareaVar",
              "var_field_type": "string",
              "var_field_size": 10,
              "var_label": "string",
              "var_dbconnection": "workflow",
              "var_dbconnection_label": "PM Database",
              "var_sql": "",
              "var_null": 0,
              "var_default": "",
              "var_accepted_values": "[]",
              "inp_doc_uid": ""
            }
          ]
        }
      ]
    },
    "formUpdateDate": "2016-08-26 16:47:02"
  }
]    
 


Get DynaForm: GET /light/project/{prj_uid}/dynaform/{dyn_uid}

Get a single DynaForm and its components in a process.

GET /api/1.0/{workspace}/light/project/{prj_uid}/dynaform/{dyn_uid}

Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaform/22860717757bb4d5b79cf03096683267
prj_uidStringProject (Process) UID/api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaform/22860717757bb4d5b79cf03096683267
dyn_uidStringDynaform UID/api/1.0/workflow/light/project/42517089857bb4d34845871067355246/dynaform/22860717757bb4d5b79cf03096683267
Result:

TypeDescription
objectReturns an object with the dynaform data
Example:
If successful, then the HTTP status code is set to 200 and there is a return object.
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
  "formId": "22860717757bb4d5b79cf03096683267",
  "formTitle": "form1",
  "formDescription": "",
  "formContent": {
    "name": "form1",
    "description": "",
    "items": [
      {
        "type": "form",
        "variable": "",
        "var_uid": "",
        "dataType": "",
        "id": "22860717757bb4d5b79cf03096683267",
        "name": "form1",
        "description": "",
        "mode": "edit",
        "script": "",
        "language": "en",
        "externalLibs": "",
        "printable": false,
        "items": [
          [
            {
              "type": "title",
              "id": "title0000000001",
              "label": "title_1",
              "colSpan": 12
            }
          ],
          [
            {
              "type": "text",
              "variable": "textVar",
              "var_uid": "68545532257bb4d6a644be4069377865",
              "dataType": "string",
              "protectedValue": false,
              "id": "textVar",
              "name": "textVar",
              "label": "Text",
              "defaultValue": "",
              "placeholder": "",
              "hint": "",
              "required": false,
              "textTransform": "none",
              "validate": "",
              "validateMessage": "",
              "maxLength": 1000,
              "formula": "",
              "mode": "parent",
              "operation": "",
              "datasource": "database",
              "dbConnection": "workflow",
              "dbConnectionLabel": "PM Database",
              "sql": "",
              "dataVariable": "",
              "var_name": "textVar",
              "colSpan": 12,
              "optionsSql": [],
              "data": {
                "value": "",
                "label": ""
              }
            }
          ],
          [
            {
              "type": "textarea",
              "variable": "textareaVar",
              "var_uid": "41436767557bb4d80932e41013553413",
              "dataType": "string",
              "protectedValue": false,
              "id": "textareaVar",
              "name": "textareaVar",
              "label": "Textarea",
              "defaultValue": "",
              "placeholder": "",
              "hint": "",
              "required": false,
              "validate": "",
              "validateMessage": "",
              "mode": "parent",
              "datasource": "database",
              "dbConnection": "workflow",
              "dbConnectionLabel": "PM Database",
              "sql": "",
              "dataVariable": "",
              "rows": "5",
              "var_name": "textareaVar",
              "colSpan": 12,
              "optionsSql": [],
              "data": {
                "value": "",
                "label": ""
              }
            }
          ],
          [
            {
              "type": "submit",
              "id": "submit0000000001",
              "name": "submit0000000001",
              "label": "submit_1",
              "colSpan": 12
            }
          ]
        ],
        "variables": [
          {
            "var_uid": "68545532257bb4d6a644be4069377865",
            "prj_uid": "42517089857bb4d34845871067355246",
            "var_name": "textVar",
            "var_field_type": "string",
            "var_field_size": 10,
            "var_label": "string",
            "var_dbconnection": "workflow",
            "var_dbconnection_label": "PM Database",
            "var_sql": "",
            "var_null": 0,
            "var_default": "",
            "var_accepted_values": "[]",
            "inp_doc_uid": ""
          },
          {
            "var_uid": "41436767557bb4d80932e41013553413",
            "prj_uid": "42517089857bb4d34845871067355246",
            "var_name": "textareaVar",
            "var_field_type": "string",
            "var_field_size": 10,
            "var_label": "string",
            "var_dbconnection": "workflow",
            "var_dbconnection_label": "PM Database",
            "var_sql": "",
            "var_null": 0,
            "var_default": "",
            "var_accepted_values": "[]",
            "inp_doc_uid": ""
          }
        ]
      }
    ]
  },
  "formUpdateDate": "2016-08-22 19:09:38"
}
 

Get Steps for Task: GET /light/project/{prj_uid}/activity/{act_uid}/steps

Get a list of the steps assigned to a specific task.

Note: Take into consideration that Input Documents and Output Documents are not considered in ProcessMaker Mobile.

Warning: Only returns tasks which contain DynaForms.


GET /api/1.0/{workspace}/light/project/{prj_uid}/activity/{act_uid}/steps

URL Parameters:
Name Description Example
workspaceWorkspace name/api/1.0/workflow/light/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/light/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/light/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
Result:
Element Description Example
[ An array of step objects.
{ First step object.
"formId": Unique ID of the DynaForm. "800335382526013ee5406d6046561388"
"formTitle": The title of the DynaForm. "Form1"
"formDescription": The description of the DynaForm. "Info about client's history"
"formUpdateDate": When was the last time the form wa updated. "2016-08-22T19:12:08+00:00"
"index": 0
"stepId": Unique ID of the DynaForm. "26565551757bb4eaba29427028495738"
"stepUidObj": Unique ID of the step. "89465332057bb4e62926c97058735850"
"stepMode": The mode which can be "EDIT" or "VIEW". The BPMN Process Designer does not have a graphical option to use "VIEW" mode. "EDIT"
"stepPosition": The step position, where the first step in the task is 1, the second is 2, etc. 1
"triggers": { An array of the state of triggers before or after the step.
"before": The type of execution "BEFORE", if a trigger is executed after the step, the value is true, otherwise, it will be false. false
"after": The type of execution "AFTER", if a trigger is executed after the step, the value is true, otherwise, it will be false. true
}, End trigger object.
} End DynaForm step object.
] End array of step objects.

Example:
If successful, then the HTTP status code is set to 200 and there is a return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "formId": "89465332057bb4e62926c97058735850",
        "formTitle": "form2",
        "formDescription": "",
        "formUpdateDate": "2016-08-22T19:12:08+00:00",
        "index": 0,
        "stepId": "26565551757bb4eaba29427028495738",
        "stepUidObj": "89465332057bb4e62926c97058735850",
        "stepMode": "EDIT",
        "stepPosition": 1,
        "triggers": {
            "before": false,
            "after": true
        }
    },
    {
        ....
    }  
]
 


Derivation

1.(GET) Get Next Step

2.(POST) Get Next Step

3.(GET) Get user data of routing rules

4.(PUT) Route Case


Get Next Step: GET /light/process/{pro_uid}/case/{app_uid}/{app_index}/step/{step_pos}

Get the next step of the case.

GET /api/1.0/{workspace}/light/process/{prj_uid}/case/{app_uid}/{app_index}/step/{step_pos}

URL Parameters:
Name Description Example
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/92810058557c04c447218a3003013708/1/step/2
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/92810058557c04c447218a3003013708/1/step/2
app_uidUnique ID of process, which can be obtained by examining the @@APPLICATION system variable in the Debugger. /api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/92810058557c04c447218a3003013708/1/step/2
del_indexDelegation index of case, which counts tasks executed in the case, starting from 1./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/92810058557c04c447218a3003013708/1/step/2
step_posThe step's position, which indicates the order that steps execute in a task. Counting starts from 0./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/92810058557c04c447218a3003013708/1/step/2
Example:

If a user was successfully created, the HTTP status code will be set to 200 and a JSON object with information about the next step is returned:
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "TYPE": "DYNAFORM",
    "UID": "22860717757bb4d5b79cf03096683267",
    "POSITION": 1,
    "PAGE": "cases_Step?TYPE=DYNAFORM&UID=22860717757bb4d5b79cf03096683267&POSITION=1&ACTION=EDIT"
}
 
If an error occurred, the HTTP status code will be set to 400 or greater and a JSON object will be returned like the following:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: This case delegation is already closed or does not exist"
    }
} 
 
Warning: If there is no next step in the task, then returns false, but the HTTP status code is set to 200.


Get Next Step: POST /light/get-next-step/{app_uid}

This endpoint executes the actions of the following three endpoints:
    [*] Executes a trigger before a step: First, it executes any trigger assigned [url=http://wiki.processmaker.com/3.1/Triggers#When_to_set_Triggers_to_Fire]before the indicated step[/url]. [*] Get the Next Step: It obtains the details of the next step of the case. [*] Get Variables: Finally, it returns any variable stored or changed by actions 1 and 2.

POST /api/1.0/{workspace}/light/get-next-step/{app_uid}

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/get-next-step/82061767558233783794af1067311367
app_uidThe unique ID of a case./api/1.0/workflow/light/get-next-step/82061767558233783794af1067311367

POST Parameters:
Name Type Description
pro_uid String The unique ID of the process.
act_uid String The unique ID of the current task.
step_uid String The unique ID of the current step, which can be found in the wf_{workspace}.STEP.STEP_UID field in the database.
step_pos String The current step's position, which indicates the order that steps are executed in a task. Counting starts from 0.
app_index String Delegation index of case, which counts tasks executed in the case, starting from 1.
dyn_uid String Dynaform UID.
Example:

Request
Code: Select all
Content-Type: application/json
{ 
    "pro_uid": "2410651855744c04c56e721060945387", 
    "act_uid": "4296299435744c072447636005051465", 
    "step_uid": null, 
    "step_pos": null, 
    "app_index": null, 
    "dyn_uid":  null
    
}
 
If successful, then the HTTP status code is set to 200 and there is a status object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "conditionalSteps": {
        "TYPE": "DYNAFORM",
        "UID": "9630737305825db35e6e001079995900",
        "POSITION": 1,
        "PAGE": "cases_Step?TYPE=DYNAFORM&UID=9630737305825db35e6e001079995900&POSITION=1&ACTION=EDIT"
    },
    "triggers": {
        "status": "200"
    },
    "variables":
    {   
        "SYS_LANG": "en", 
        "SYS_SKIN": "neoclassic", 
        "SYS_SYS": "workflow", 
        "APPLICATION": "887188259574c6ad66ff546019496863", 
        "PROCESS": "647622319574c60824a05b6030883788", 
        "TASK": "590871242574c60afcc3bc2051477466", 
        "INDEX": 1, 
        "USER_LOGGED": "00000000000000000000000000000001", 
        "USR_USERNAME": "Administrator", 
        "APP_NUMBER": "416", 
        "PIN": "O9R1",
        "SYS_VAR_UPDATE_DATE": "2016-11-11 15:11:19" 
    }
}
 


Get user data of routing rules: GET /light/task/{tas_uid}/case/{app_uid}/{del_index}/assignment
Get information about users in the next case derivation.

GET /api/1.0/{workspace}/light/task/{tas_uid}/case/{app_uid}/{del_index}/assignment

URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/task/37826538057bb2246879296081817606/case/37213410154d375de3e3620044382558/2/assignment
tas_uidUnique ID of current task in case./api/1.0/workflow/task/37826538057bb2246879296081817606/case/37213410154d375de3e3620044382558/2/assignment
app_uidCase's unique ID./api/1.0/workflow/task/37826538057bb2246879296081817606/case/37213410154d375de3e3620044382558/2/assignment
del_indexCase's delegation index, which can be obtained from the @%INDEX system variable./api/1.0/workflow/task/37826538057bb2246879296081817606/case/37213410154d375de3e3620044382558/2/assignment
Example:
If the case is found, then the HTTP status code is set to 200 (OK) and there is the following return value.

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "taskId": "1791371925744bfb6d275f3023702129",
        "taskName": "Task 2",
        "taskAssignType": "SELF_SERVICE",
        "taskDefProcCode": "",
        "delPriority": "",
        "taskParent": "",
        "taskMessage": "",
        "sourceUid": "itee-939657a4b372903257044619767",
        "users": [
            {
                "userId": "",
                "userFullName": "Unassigned"
            },
            {
            ....
            }
        ]
    },
    {
        "taskId": "32409059255f07e5ba59bb9013138567",
        "taskName": "Task 3",
        "taskAssignType": "MANUAL",
        "taskDefProcCode": "",
        "delPriority": "",
        "taskParent": "",
        "taskMessage": "",
        "sourceUid": "itee-939657a4b372903257044619767",
        "users": [
            {
                "userId": "8789974095551852f549851011396934",
                "userFullName": "Grady, Travis"
            },
            {
            ....
            } 
        ]
    }
    {
        ....
    }
]
 
If the next task is the end of the process, the response will be:
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "routeFinishFlag": true,
        "users": {
            "userId": "00000000000000000000000000000001",
            "userFullName": " , Administrator"
        }
    }
]
 

If the status code is 300 or higher then an error occurred, and an error object will usually be returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Process definition error: All conditions in evaluation routing rule evaluated to false, so workflow has stopped. Please change the definition of the evaluation routing rule."
    }
}
 


Route Case: PUT /light/cases/{app_uid}/route-case

Route a case (i.e., move the case to the next task in the process according to the routing rules). Cases may only be routed if the logged-in user is the case's currently assigned user. If needing to route a case which is assigned to another user, then first reassign the case to the logged-in user and then route the case. Note that "routing" is also known as "derivating" in ProcessMaker.
PUT /api/1.0/{workspace}/light/cases/{app_uid}/route-case

URL Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/route-case
app_uidCase's unique ID./api/1.0/workflow/light/cases/55324179754ca442baeb994077387342/route-case
PUT Parameters:
ParameterDescription
TAS_UIDOptional. The unique ID of the next task in the process.
USR_UIDOptional. The unique ID of the user assigned in the next task.
TAS_ASSIGN_TYPEOptional. Task's assignment rule, which can be:
"BALANCED" (cyclical assignment),
"MANUAL" (Manual assignment),
"EVALUATE" (Value Based Assignment),
"REPORT_TO" (Reports to),
"SELF_SERVICE" (Self Service),
"SELF_SERVICE_EVALUATE" (Self Service Value Based Assignment).
TAS_DEF_PROC_CODEOptional. .
DEL_PRIORITYOptional. .
TAS_PARENTOptional. .
del_indexOptional. Specify the delegation index of a current task which will be routed. The delegation index counts the routings for a case starting from 1. The first task in a process has a delegation index of 1, the second task is 2, etc. If this parameter is not included, then the current task with the highest delegation index will be routed.
Example:
Request
Code: Select all
Content-Type: application/json
{
    "tasks": [
        {
            "TAS_UID": "14602661157bc50367d0117082336166",
            "USR_UID": "98719557457c071d85990b8063452040",
            "TAS_ASSIGN_TYPE": "BALANCED",
            "TAS_DEF_PROC_CODE": "",
            "DEL_PRIORITY": "",
            "TAS_PARENT": ""
            "SOURCE_UID":"itee-939657a4b372903257044619767"
        },
        {
            ....
        }
    ],
    "del_index" : 2
}
 
If successful, then the HTTP status code is set to 200 and there is the following return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status_code": 0,
    "message": "\n                        <br><br><table width='100%' cellpadding='0' cellspacing='0'>[tr=bg1][td=null]\n                    Debug Messages[/td][/tr]</table>\n",
    "timestamp": "2016-08-26 16:29:57",
    "routing": [
        {
            "userId": "98719557457c071d85990b8063452040",
            "userName": "Travis travis",
            "taskId": "54489135757c0612e78caa4069275812",
            "taskName": "Task 3",
            "delIndex": "3",
            "delThread": "1",
            "delThreadStatus": "OPEN"
        }
    ]
}
 
If the process has come to its end.
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status_code": 0,
    "message": "End of process()\n                        <br><br><table width='100%' cellpadding='0' cellspacing='0'>[tr=bg1][td=null]\n                    Debug Messages[/td][/tr]</table>\n",
    "timestamp": "2016-08-26 17:16:17",
    "routing": []
}
 
If an error occurred, then the HTTP status code is set to 400 or greater and an error object is returned, such as:
Code: Select all
{  
  "error": {
    "code": 400,
    "message: "Bad Request: This case delegation is already closed or does not exist"
  }
}



Triggers

Execute Trigger: POST /light/process/{pro_uid}/task/{act_uid}/case/{app_uid}/step/{step_uid}/execute-trigger/{type_trigger}

Executes a specific trigger.

GET /api/1.0/{workspace}/light/process/{pro_uid}/task/{act_uid}/case/{app_uid}/step/{step_uid}/execute-trigger/{type_trigger}

URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
app_uidUnique ID of process, which can be obtained by examining the @@APPLICATION system variable in the Debugger. /api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
step_uidThe unique ID of a step, which can be found in the wf_{workspace}.STEP.STEP_UID field in the database./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
type_triggerType of the trigger can be "after" or "before"./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/task/
83975219757bb4e97617419089589121/case/92810058557c04c447218a3003013708/
step/27197265657bb4ea5197b70039271709/execute-trigger/before
POST Parameters:
None.

Example:
Response

If the trigger was successfully executed, the HTTP status code will be set to 200 and a JSON object with information about the new user is returned:
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
If an error occurred, the HTTP status code will be set to 400 or greater and a JSON object will be returned like the following:
Code: Select all
{
  error: {
    code:    400,
    message: "Bad Request: usr_username. Username 'janedoe' already exists"
  }
} 
 

Case Notes
The following REST endpoints are used to manage Case Notes in ProcessMaker.


1.(GET) Get Case Notes

2.(POST) Create Case Note


Get Case Notes: GET /light/case/{app_uid}/notes

Get a list of the case notes made by the current user for a specified case.

GET /api/1.0/{workspace}/light/case/{app_uid}/notes

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/cases/57793680455e7a4326b71f5064060314/notes
app_uidUnique ID of the case where the notes are attached./api/1.0/workflow/light/case/57793680455e7a4326b71f5064060314/notes
Filters for case notes
start={num}Optional. Number where the list of notes starts./api/1.0/workflow/cases/57793680455e7a4326b71f5064060314/notes?start=30
Result:
If successful, the HTTP status code is set to 200 and the response is a array of case note objects:
Element Description
[Start array.
{Start case note object.
"caseId",The unique ID of the case where the note is attached.
"user": {Start user object.
"userId",The unique ID of the user who added the note.
"name",Username of the user who added the note.
"firstName",Firstname of the user who added the note.
"lastName",Lastname of the user who added the note.
"email",Email of the user who added the note.
}End user object.
"notes": {Start Notes object.
"date",The date when the note was added in "YYYY-MM-DD HH:MM:SS" format.
"content"The content of the case note.
}End user object.
},End case note object.
...Any additional case notes.
]End array.
Example:
If successful, then the HTTP status code is set to 200 and there is a return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "caseId": "9122009275776996c9a4094099314766",
        "user": {
            "userId": "00000000000000000000000000000001",
            "name": "admin",
            "firstName": "Administrator",
            "lastName": "admin",
            "email": "admin@processmaker.com"
        },
        "notes": {
            "date": "2016-08-23T14:14:33+00:00",
            "content": "Note 10"
        }
    }
    {
        ...
    }   
]
 
Note: Only users who have been assigned Process Permissions to case notes may access them. Even the user who is currently assigned to work on the case may not see the case notes without Process Permission for case notes. If the logged-in user doesn't have proper permissions to access case notes, the following error object is returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: You do not have permission to access the cases notes"
    }
}
 



Create Case Note: POST /light/case/{app_uid}/note

Create a new case note for a given case. Note that only users who are currently assigned to work on the case or have Process Permissions to access case notes may create a case note.

POST /api/1.0/{workspace}/light/case/{app_uid}/note
URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/case/115968518533473068ad299078535175/note
app_uidUnique ID of the case./api/1.0/workflow/light/case/115968518533473068ad299078535175/note
POST Fields:
NameDescription
noteContentContent of the case note in plain text. Use \n to insert a new line in the text.
sendMailOptional. Set to 1 to send an email with the content of the case note in its body to all the participants in the case. The default is 0, which doesn't send an email. Note that this endpoint adds the emails to the queue, but they only sent out when the cron.php file executes.
Example:
Request
Code: Select all
Content-Type: application/json
{   
    "noteContent": "This a new note",
    "sendMail": 1   
}
 
If the case note was created, then the HTTP status code is set to 200 (OK) and there is the following return value.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
If the status code is 300 or higher then an error occurred, and an error object will usually be returned, such as:
Code: Select all
{
   error: {
      "code":    400,
      "message": "Bad Request: You do not have permission to access the cases notes"
   }
}
 

Files
The following REST endpoints are used to manage Files in ProcessMaker.


1. Create case file record(s)
2. Generate a GoogleMaps image file
3. Generate Base64 string of file




Create case file record(s): POST /light/case/{app_uid}/upload

Create new case file record(s) in a specified case. These case files can be attached files (used by File controls), Input Document files, or Output Document files in version 1.0.1.8 and later. In version 1.0.1.7 and earlier, the case files can only be attached files. (Note that case files are known as AppDocuments in ProcessMaker).

This endpoint adds new record(s) in the APP_DOCUMENT table and stores their filename(s) in the CONTENT table in the database. It returns the generated case file ID and version number for each file. This information can then be used to call the POST /light/case/{app_uid}/upload/{app_doc_uid} endpoint to upload each file.

POST /api/1.0/{workspace}/light/case/{app_uid}/upload

URL Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/cases/115968518533473068ad299078535175/upload
app_uidUnique ID of the case./api/1.0/workflow/cases/115968518533473068ad299078535175/upload
POST Fields:
ExampleDescription
[Start array of objects.
{Start object, which holds information about the case file.
"name": "scannedReceipts2016-05.jpg",Required. The filename of the file which will later be uploaded with POST /light/case/{app_uid}/upload/{app_doc_uid}.
[tr]
"appDocType": "INPUT",Optional, available in ProcessMaker Mobile App version 1.0.1.8 and later. The type of case file, which can be:
"ATTACHED": an attached file which is uploaded to a File control which isn't associated with an Input Document,
"INPUT": an Input Document file (or uploaded to a File control which is associated with an Input Document),
"OUTPUT": an Output Document file. Note: Instead of this option, it is recommended to use POST /cases/{app_uid}/output-document to generate Output Document files.
If not included, then set to "ATTACHED" by default.
"docUid": "26489274557325e0cefb242036509648",Optional, available in version 1.0.1.8 and later. The unique ID of the Input Document or Output Document. Set to -1 for an attached file which is uploaded through a file control which isn't associated with an Input Document. If not included then set to -1 by default.
"fieldName": "receiptFile"Optional, available in version 1.0.1.8 and later. The name of the File control where the file will be uploaded. If uploaded to File controls inside a grid, set to "GridVariable_RowNumber_FileFieldName". For example, a value of "clientList_2_contractFile", means that the file was uploaded to the second row of a grid whose variable is "clientList" and whose File field has the name "contractFile". If the file will be uploaded in an Input Document step (not a File control in a Dynaform), then set to NULL or do not include this parameter.
}End object.
{...}Any additional objects with information about case files, which will later be uploaded.
]End array of objects.

Result:

If the case file record(s) were created, then the HTTP status code is set to 200 (OK) and an array of objects is returned with the following information about the generated case file record(s):
ExampleDescription
[Start array of objects.
{Start object, which holds information about the new case file record.
"docVersion": 1,The document version number which will always be 1 for the first version of the case file.
"appDocUid" : "82749015357325e0d1cfef6058054658"The generated unique ID for the new case file.
}End object.
{...}Any additional objects with information about new case files.
]End array of objects.
If a bad case ID is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
   error: {
      "code":    400,
      "message": "Bad Request: this case has 0 delegations"
   }
}
 
If the "name" parameter is not included, then the HTTP status code is set to 200 and the response is NULL.


Example:

Request:
Code: Select all
[
    {  //attached file uploaded through Home > Documents
        "name": "requestedBudget.xls"
    },
    {  //attached file uploaded to File control with the name "employeePhoto" in a DynaForm
        "name":      "johnDoePhoto.jpg",
        "fieldName": "employeePhoto",  
    },
    {  //attached file uploaded to File control with the name "receiptFile" in the first row of grid with "receiptList" variable
        "name":      "officeSupplies.doc",
        "fieldName": "receiptList_1_receiptFile",  
    },
    {  //attached file uploaded to File control with the name "receiptFile" in the second row of grid with "receiptList" variable
        "name":      "newOfficeFurniture.doc",
        "fieldName": "receiptList_2_receiptFile",  
    },
    {  //Input Document file associated with a File control with the name "contractFile" 
        "name":      "AcmeServicesContract.pdf",
        "appDocType":"INPUT",
        "docUid":    "26489274557325e0cefb242036509648"
        "fieldName": "contractFile",
    },
    {  //Input Document file (which is uploaded in an Input Document step and not a File control) 
        "name":      "NewWidgetPrices.xls",
        "appDocType":"INPUT",
        "docUid":    "1a8598f3d7d6ce40dc2abbdbd7cdaa49"
    },
]
 
Response:
Code: Select all
[
    {  
        "docVersion": 1,
        "appDocUid" : "189395356573278c8b2d799089824447"
    },
    {  
        "docVersion": 1,
        "appDocUid" : "201295905573278c8e45438092199134"
    },
    {  
        "docVersion": 1,
        "appDocUid" : "9886722215731415bb671a0038276864"
    },
    {  
        "docVersion": 1,
        "appDocUid" : "24454306957325ad4205899098323500"
    },
    {  
        "docVersion": 1,
        "appDocUid" : "35313659957324f217ccda7000260391"
    },
    {  
        "docVersion": 1,
        "appDocUid" : "5876481515732526a093938002875566"
    }
]
 

PHP Example:

The following example creates a file case record for an Input Document file which is associated with a File control which has the name "expenses".
Code: Select all
$oToken = pmRestLogin("BDBSKDWPZCMDZPSXPOHAXCMZQZLMLCQV", "25253873955e0e542943e80035324554", "mary", "p4sSw0rD");

$caseId = '9886722215731415bb671a0038276864';
$url = "/api/1.0/workflow/light/case/$caseId/upload";
$filePath = '/home/amos/Pictures/ReceiptListAmountFieldRed.png';
$aVars = array(
    array(
        'name'       => 'newFurnitureReceipt.jpeg',
        'appDocType' => 'INPUT',
        'docUid'     => '26489274557325e0cefb242036509648',
        'fieldName'  => 'expenses'
    )
);

$oRet = pmRestRequest("POST", $url, $aVars, $oToken->access_token);

if ($oRet->status == 200 and is_array($oRet->response)) {
    $caseFileId = $oRet->response[0]->appDocUid;
    $docVersion = $oRet->response[0]->docVersion;
}
 



Generate a GoogleMaps image file: POST /light/case/{app_uid}/upload/location

Generate a GoogleMaps .jpg image file for a case. This image can be found in the Documents section under the Home tab.

GET /api/1.0/{workspace}/light/case/{app_uid}/upload/location

URL Parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/case/54736000457c082f3a9e770092827937/upload/location
app_uidUnique ID of the case./api/1.0/workflow/light/case/54736000457c082f3a9e770092827937/upload/location
POST Fields:
NameTypeDescription
latitudeStringLatitude in signed decimal degrees format.
longitudeStringLongitude signed decimal degrees format.
Example:

Request
Code: Select all
Content-Type: application/json
{   
    "latitude":-16.5207124,
    "longitude":-68.0915129
}
 
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "docVersion": 1,
        "appDocUid": "98492534757c09df13a9f36097638223"
    }
]
 



Generate Base64 string of file: POST /light/case/{app_uid}/download64

Generate a base64 string of a file.

POST /light/case/{app_uid}/download64

URL Parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/case/54736000457c082f3a9e770092827937/download64
app_uidUnique ID of the case./api/1.0/workflow/light/case/54736000457c082f3a9e770092827937/download64
POST Fields:
NameTypeDescriptionExample
fileIdStringUnique ID of the document. To find a file's UID, query the wf_{WORKSPACE}.APP_DOCUMENT.APP_DOC_ID field."22115928657c0aed3ed3705031084023"
versionStringThe version of the file, this version starts counting from the number 1. The version number can be looked up in the wf_{WORKSPACE}.APP_DOCUMENT.DOC_VERSION field."1"
Example:

Request
Code: Select all
Content-Type: application/json
[
    {
        "fileId":"22115928657c0aed3ed3705031084023",
        "version": "1"
    }
]
 
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
  {
    "fileId": "22115928657c0aed3ed3705031084023",
    "fileContent": "/9j/4AAQSkZJRgABAQEAYABgAADSkcgSlBF.....P/2Q=="
  }
]
 


Processes

1. Get List of Processes with cases
2. Get a base64 of the ProcessMap


Get List of Processes with cases: GET /light/process/{app_status}

Get a list of processes with cases with a specific case status.

GET /api/1.0/{workspace}/light/process/{app_status}

URL Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name/api/1.0/workflow/light/process/todo
workspaceStringCase status which can be "TODO", "DRAFT", "PAUSED", "PARTICIPATED", or "UNASSIGNED"/api/1.0/app_status/light/process/todo
Optional Filter:
NameTypeDescriptionExample
cat_uidStringUID of the category of the processes./api/1.0/workflow/light/process/todo?cat_uid=10300781257c082bce3cea2001759648
Result:
TypeDescription
arrayReturns an array of objects with processes.
Example:
If successful, then the HTTP status code is set to 200 and there is a return object.
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    [
        "",
        "All Processes"
    ],
    [
        "381625817577673ab580328067165018",
        "Credit Card Application"
    ]
    [
        ....
    ]
]
 


Get a base64 of the ProcessMap: GET /light/process/{pro_uid}/case

Get an base64 representation string of the Process Map of a case. This string can be decode into an image with a decoder tool. If a Case UID is defined, each task will be differentiated by a color which represents its task state.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case?app_uid={app_uid}

URL Parameters:
NameDescriptionExample
workspaceWorkspace name /api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case?app_uid=96987915057bc51a8d1a4d8000616397
prj_uidUnique ID of the project UID /api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case?app_uid=96987915057bc51a8d1a4d8000616397

Optional URL Parameters:
ParameterDescriptionExample
act_uidUnique ID of the activity (step or subprocess) /api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case?app_uid=96987915057bc51a8d1a4d8000616397
Example:
If successful, then the HTTP status code is set to 200 and there is a return object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "map": "iVBORw0KGgoA........................2jG4AAAAASUVORK5CYII="
}
 
If an error occurred, then the HTTP status code is set to 400 or greater and an error object is returned, such as:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: The case with app_uid: 96988915057bc51a8d1a4d8000616397 does not exist."
  }
}
 

Categories

Categories List: GET /light/category

Get a list of the categories of the workspace.

GET /api/1.0/{workspace}/light/category

Parameters:
ParameterDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/category

Result:
TypeDescription
arrayReturns an array of arrays with the categories.
Example:

Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    [
        "",
        "All Categories"
    ],
    [
        "134134260577422518852c0034302874",
        "Finance"
    ],
    [
        "9002108495744bf7964ddd8044133538",
        "Accounting"
    ],
    [
        ....
    ]
]
 

Users


Current User Data: GET /light/user/data

Get information about the current logged user.

GET /api/1.0/{workspace}/light/user/data

Parameters:

NameTypeDescription
workspaceStringWorkspace name
Result:

TypeDescription
objectReturns an object with the current user data.
Example:

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "userId": "00000000000000000000000000000001",
    "firstName": "Administrator",
    "lastName": "admin",
    "fullName": "Administrator admin",
    "email": "admin@processmaker.com",
    "userRole": "System Administrator",
    "userPhone": "",
    "updateDate": "2008-05-23 18:36:19",
    "userPhoto": ""
}
 

Get User(s) Data: POST /light/users/data

Get information about one or more users.

GET /api/1.0/{workspace}/light/users/data

Parameters:
NameDescriptionDefaultExample
workspaceWorkspace name/api/1.0/workflow/light/config
POST Fields:
NameTypeDescription
idsArrayAn array of unique IDs of the users.
Example:

Request
Code: Select all
Content-Type: application/json
{
    "user": {
        "ids": [
            "98719557457c071d85990b8063452040",
            "62598765454941eba8f97f3053468117",
            "25197855754941eda695c22036754866"
        ]
    }
}
 
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "userId": "98719557457c071d85990b8063452040",
        "firstName": "Travis",
        "lastName": "Grady",
        "fullName": "travis travis",
        "email": "travis.grady@email.com",
        "userRole": "PROCESSMAKER_ADMIN",
        "userPhone": "",
        "updateDate": "2016-08-26 16:44:08",
        "userPhoto": "R0ldBEPTAD65gC0sxmIRZm...IZ5mIiZmIqpmNrYD1USEAA7"
    }
]
 
Session

Logout Session: POST /light/logout

Finish the session access token for REST login sessions. Information about the access token value can be reviewed in the wf_{workspace}.OAUTH_ACCESS_TOKENS table in the database.

GET /api/1.0/{workspace}/light/logout

Parameters:

NameTypeDescription
workspaceStringWorkspace name
POST Fields:
NameTypeDescription
accessStringThe ID of the access token. Information about the access token value can be reviewed in the wf_{workspace].OAUTH_ACCESS_TOKENS.ACCESS_TOKEN table in the database.
refreshStringSet to 1 to refresh the token.
Example:

Request
Code: Select all
Content-Type: application/json
{
    "access":  "e62e76745f5b18b10023b2fe9025b7b0d1f5c4bb",
    "refresh": "1"
}
 
If successful, then the HTTP status code is set to 200 and there is a status object.

Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "status": "ok"
}
 
If a bad token ID is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: The row \"e85293a2118fe948271abb60a4e45c2007fed3cb\" in table OAUTH_ACCESS_TOKENS doesn't exist!"
    }
}
 

Configuration

Workspace Configuration: GET /light/config
Get a config information of the current workspace.

GET /api/1.0/{workspace}/light/config

Parameters:
NameDescriptionDefaultExample
workspaceWorkspace name/api/1.0/workflow/light/config
Result:
If successful, the HTTP status code is set to 200 and the response is a array of objects:
Element Description
{Start array.
"timeZone",Timezone of the workspace.
"multiTimeZone","True" if using the Enterprise Edition, otherwise, its value will be "false".
"version",ProcessMaker Version.
"buildType",Community or Enterprise.
"environment",
{Start environment object.
"format","@lastName, @firstName (@userName)".
"dateFormat",Date Format "Y-m-d H:i:s".
"casesListDateFormat",Date format of the cases "Y-m-d H:i:s".
}End environment object.
"listLanguage": [
{Start List of languages object.
"L10n",Language localisation code.
"label"Language label.
},End languages object.
....Any additional languages.
]End languages array.
}End array.
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "timeZone": "GMT-04:00",
    "multiTimeZone": true,
    "version": "3.0.1.8.patch1",
    "buildType": "Enterprise",
    "environment": {
        "format": "@lastName, @firstName (@userName)",
        "dateFormat": "Y-m-d H:i:s",
        "casesListDateFormat": "Y-m-d H:i:s"
    },
    "listLanguage": [
        {
            "L10n": "en",
            "label": "English"
        },
        {
            "L10n": "ja",
            "label": "Japanese"
        },
        {
            "L10n": "th",
            "label": "Thai"
        },
        {
            ....
        }
    ]
}
 







Case Tracker
The following endpoints are the methods currently implemented for the case tracker of the designer in the ProcessMaker API. These endpoints are defined in workflow/engine/src/ProcessMaker/Services/Api/Light/Tracker.php and call code in workflow/engine/src/ProcessMaker/BusinessModel/Light/Tracker.php.

1. Get Case and Process ID
2. Get Case Tracker History
3. Get Case Tracker Messages
4. Get Case Tracker Single Message
5. Get Case Tracker Documents
6. Get Case Tracker Object


Get Case ID: GET /light/case/{number_case}/tracker/{pin}

Get the case ID and the process ID using the Case Tracker.

GET /api/1.0/{workspace}/light/case/{number_case}/tracker/{PIN}

Parameters:
NameDescriptionExample
workspaceWorkspace name./api/1.0/workflow/light/case/214/tracker/V1UU
Number caseNumber of Case./api/1.0/{workspace}/light/case/214/tracker/V1UU
PINThe PIN that the Case Tracker generates that allows an external user to log into ProcessMaker and review the advances of a given case./api/1.0/{workspace}/light/case/214/tracker/V1UU
Example:
Result:
If successful, the HTTP status code is set to 200 and the response is a array of objects:
Element Description
{Start array.
"process",Unique ID of the process.
"app_uid",Unique ID of the case.
}End array.
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "process": "42517089857bb4d34845871067355246",
    "app_uid": "57132976957c6d7b3a8b140038860627"
}
 

Get Case Tracker History: GET /light/process/{pro_uid}/case/{app_uid}/tracker-history
Get the history of the case tracked.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case/{app_uid}/tracker-history

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/tracker-history
pro_uidThe unique ID of a process. To find the UIDs for processes in the wf_{WORKSPACE} database, use the following query:
SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';
/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/
57132976957c6d7b3a8b140038860627/tracker-history
app_uidCase's unique ID./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/tracker-history
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "user": {
            "firstName": "Travis",
            "lastName": "Grady",
            "name": "Grady Travis"
        },
        "delegateDate": "2016-08-31 13:12:19",
        "processId": "42517089857bb4d34845871067355246",
        "taskId": "83975219757bb4e97617419089589121",
        "caseId": "57132976957c6d7b3a8b140038860627",
        "index": "1",
        "initDate": "2016-08-31 13:12:19",
        "enableAction": "",
        "disableAction": "",
        "taskTitle": "Task 1",
        "finishDate": "2016-08-31 13:57:15",
        "type": ""
    },
    {
        "user": {
            "firstName": "Alex",
            "lastName": "Shepherd",
            "name": "Shepherd Alex"
        },
        "delegateDate": "2016-08-31 13:57:15",
        "processId": "42517089857bb4d34845871067355246",
        "taskId": "14602661157bc50367d0117082336166",
        "caseId": "57132976957c6d7b3a8b140038860627",
        "index": "2",
        "initDate": "",
        "enableAction": "",
        "disableAction": "",
        "taskTitle": "Task 2",
        "finishDate": "-",
        "type": "IN_PROGRESS"
    }
]
 
If a bad parameter is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Disabled. Please contact the system administrator."
    }
}
 

Get Case Tracker Messages: GET /light/process/{pro_uid}/case/{app_uid}/tracker-messages

Get the messages passed between processes and messages sent to the user in case something is missing. These messages are displayed in the "My History Messages" tab in the "Case Tracker" site.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case/{app_uid}/tracker-messages

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-messages
pro_uidThe unique ID of a process. To find the UIDs for processes in the wf_{WORKSPACE} database, use the following query:
SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';
/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-messages
app_uidCase's unique ID./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-messages
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "messageId": "491860623555a462e5a52c7092614581",
        "caseId": "7584676665551f345bcf209092260479",
        "messageType": "DERIVATION",
        "messageSubject": "A note has been added to the case. Dismissal of  ",
        "messageFrom": "maria@colosa.com",
        "messageTo": "Administrator   <maria@colosa.com>",
        "messageBody": "Case: Dismissal of <br>Author: Maria Alvarez <maria@colosa.com>",
        "messageDate": "2015-05-18 23:06:06",
        "messageCc": "",
        "messageBcc": "",
        "messageTemplate": "",
        "messageStatus": "pending"
    },
    {
        "messageId": "307349284555dfe44a846c3081989313",
        "caseId": "7584676665551f345bcf209092260479",
        "messageType": "DERIVATION",
        "messageSubject": "A note has been added to the case. Dismissal of  ",
        "messageFrom": "maria@colosa.com",
        "messageTo": "Administrator   <maria@colosa.com>",
        "messageBody": "Case: Dismissal of <br>Author: Maria Alvarez <maria@colosa.com>",
        "messageDate": "2015-05-21 18:48:20",
        "messageCc": "",
        "messageBcc": "",
        "messageTemplate": "",
        "messageStatus": "pending"
    }
]

 
If a bad parameter is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Disabled. Please contact the system administrator."
    }
}
 
Get Case Tracker Single Message: GET /light/process/{pro_uid}/case/{app_uid}/message/{msg_uid}/view

Get information of an specific message.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case/{app_uid}/message/{msg_uid}/view

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
message/491860623555a462e5a52c7092614581/view
pro_uidThe unique ID of a process. To find the UIDs for processes in the wf_{WORKSPACE} database, use the following query:
SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';
/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
message/491860623555a462e5a52c7092614581/view
app_uidCase's unique ID./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
message/491860623555a462e5a52c7092614581/view
msg_uidMessage's unique ID./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
message/491860623555a462e5a52c7092614581/view
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "messageId": "491860623555a462e5a52c7092614581",
    "caseId": "7584676665551f345bcf209092260479",
    "messageType": "DERIVATION",
    "messageSubject": "A note has been added to the case. Dismissal of  ",
    "messageFrom": "travis.grady@mail.com",
    "messageTo": "Administrator   <maria@mail.com>",
    "messageBody": "Case: Dismissal of <br />Author: Administrator   <maria@mail.com><br /><br />Hello",
    "messageDate": "2015-05-18 23:06:06",
    "messageCc": "",
    "messageBcc": "",
    "messageTemplate": "",
    "messageStatus": "pending"
}
 
If a bad parameter is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Disabled. Please contact the system administrator."
    }
}
 
Get Case Tracker Documents: GET /light/process/{pro_uid}/case/{app_uid}/tracker-docs

Get the forms and documents of the case tracked. These docs are listed in the
"My Case Forms and Documents" tab in the "Case Tracker" site.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case/{app_uid}/tracker-docs

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-docs
pro_uidThe unique ID of a process. To find the UIDs for processes in the wf_{WORKSPACE} database, use the following query:
SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';
/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-docs
app_uidCase's unique ID./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/
tracker-docs
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
[
    {
        "objectTitle": "Credit Card Application",
        "objectType": "DYNAFORM",
        "objectId": "22860717757bb4d5b79cf03096683267",
        "condition": "",
        "position": "1"
    }
]
 
If a bad parameter is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Disabled. Please contact the system administrator."
    }
}
 

Get Case Tracker Object: GET /light/process/{pro_uid}/case/{app_uid}/object/{obj_uid}/{type}/show

Get information of an object assigned in the case tracker.

GET /api/1.0/{workspace}/light/process/{pro_uid}/case/{app_uid}/object/{obj_uid}/{type}/show

Parameters:
NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/object/
22860717757bb4d5b79cf03096683267/DYNAFORM/show
pro_uidThe unique ID of a process./api/1.0/workflow/light/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/object/
22860717757bb4d5b79cf03096683267/DYNAFORM/show
app_uidCase's unique ID./api/1.0/workflowlight/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/object/
22860717757bb4d5b79cf03096683267/DYNAFORM/show
obj_uidCase's unique ID./api/1.0/workflowlight/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/object/
22860717757bb4d5b79cf03096683267/DYNAFORM/show
typeObject type./api/1.0/workflowlight/process/42517089857bb4d34845871067355246/case/57132976957c6d7b3a8b140038860627/object/
22860717757bb4d5b79cf03096683267/DYNAFORM/show
Example:
Response
Code: Select all
200 (OK)
Content-Type: application/json
{
    "fields": {
    "APP_UID": "57132976957c6d7b3a8b140038860627",
    "APP_TITLE": "#214",
    "APP_DESCRIPTION": "",
    "APP_NUMBER": 214,
    "APP_PARENT": "",
    "APP_STATUS": "TO_DO",
    "PRO_UID": "42517089857bb4d34845871067355246",
    "APP_PROC_STATUS": "",
    "APP_PROC_CODE": "",
    "APP_PARALLEL": "N",
    "APP_INIT_USER": "98719557457c071d85990b8063452040",
    "APP_CUR_USER": "98719557457c071d85990b8063452040",
    "APP_CREATE_DATE": "2016-08-31 13:12:19",
    "APP_INIT_DATE": "2016-08-31 13:12:19",
    "APP_FINISH_DATE": null,
    "APP_UPDATE_DATE": "2016-08-31 14:37:44",
    "APP_DATA": {
      "SYS_LANG": "en",
      "SYS_SKIN": "neoclassic",
      "SYS_SYS": "workflow",
      "APPLICATION": "57132976957c6d7b3a8b140038860627",
      "PROCESS": "42517089857bb4d34845871067355246",
      "TASK": "14602661157bc50367d0117082336166",
      "INDEX": "2",
      "USER_LOGGED": "98719557457c071d85990b8063452040",
      "USR_USERNAME": "Travis",
      "textVar": "Travis Grady",
      "textVar_label": "Travis Grady",
      "textareaVar": "",
      "textareaVar_label": "",
      "APP_NUMBER": "214",
      "PIN": "V1UU",
      "Data": {
        "1": {
          "APP_NUMBER": "214"
        }
      },
      "CaseNumber": "214",
      "__VAR_CHANGED__": "Data,APPLICATION,CaseNumber,Data,aData,USER_LOGGED,textVar,aData,aData",
      "aData": {
        "username": "travis",
        "firstname": "Travis",
        "lastname": "Grady",
        "mail": "travis.grady@mail.com",
        "address": "",
        "zipcode": "",
        "country": "Brazil",
        "state": null,
        "location": null,
        "phone": "",
        "fax": "",
        "cellular": "",
        "birthday": "2016-08-26",
        "position": "",
        "replacedby": "",
        "duedate": "2017-08-26",
        "calendar": "",
        "status": "ACTIVE",
        "department": "",
        "reportsto": "",
        "userexperience": "NORMAL",
        "photo": "/opt/pm31/processmaker/workflow/public_html/images/user.gif"
      },
      "__DYNAFORM_OPTIONS": {
        "PREVIOUS_STEP_LABEL": "",
        "NEXT_STEP_LABEL": "",
        "NEXT_STEP": "#",
        "NEXT_ACTION": "alert(\"Sample\"); return false;",
        "PRINT_PREVIEW": "#",
        "PRINT_PREVIEW_ACTION": "tracker_PrintView?CTO_UID_OBJ=22860717757bb4d5b79cf03096683267&CTO_TYPE_OBJ=PRINT_PREVIEW"
      }
    },
    "APP_PIN": "1f914516e29f7bddc965b079b6c9c408",
    "APP_DURATION": 0,
    "APP_DELAY_DURATION": 0,
    "APP_DRIVE_FOLDER_UID": "",
    "APP_ROUTING_DATA": "a:0:{}",
    "STATUS": "To do",
    "TITLE": "#214",
    "DESCRIPTION": "",
    "CREATOR": "Travis Grady",
    "CREATE_DATE": "2016-08-31 13:12:19",
    "UPDATE_DATE": "2016-08-31 14:37:44",
    "CURRENT_DYNAFORM": "22860717757bb4d5b79cf03096683267"
  },
  "record": {
    "DYN_VERSION": "2",
    "DYN_LABEL": "",
    "DYN_CONTENT": "{\"name\":\"Credit Card Application Form\",\"description\":\"\",\"items\":[{\"type\":\"form\",\"variable\":\"\",\"var_uid\":\"\",\"dataType\":\"\",\"id\":\"22860717757bb4d5b79cf03096683267\",\"name\":\"Credit Card Application Form\",\"description\":\"\",\"mode\":\"edit\",\"script\":\"\",\"language\":\"en\",\"externalLibs\":\"\",\"printable\":false,\"items\":[[{\"type\":\"title\",\"id\":\"title0000000001\",\"label\":\"Credit Card Application\",\"colSpan\":12}],[{\"type\":\"text\",\"variable\":\"textVar\",\"var_uid\":\"68545532257bb4d6a644be4069377865\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"textVar\",\"name\":\"textVar\",\"label\":\"Name\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"textTransform\":\"none\",\"validate\":\"\",\"validateMessage\":\"\",\"maxLength\":1000,\"formula\":\"\",\"mode\":\"parent\",\"operation\":\"\",\"datasource\":\"database\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"dataVariable\":\"\",\"var_name\":\"textVar\",\"colSpan\":12}],[{\"type\":\"textarea\",\"variable\":\"textareaVar\",\"var_uid\":\"41436767557bb4d80932e41013553413\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"textareaVar\",\"name\":\"textareaVar\",\"label\":\"Details\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"validate\":\"\",\"validateMessage\":\"\",\"mode\":\"parent\",\"datasource\":\"database\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"dataVariable\":\"\",\"rows\":\"5\",\"var_name\":\"textareaVar\",\"colSpan\":12}],[{\"type\":\"submit\",\"id\":\"submit0000000001\",\"name\":\"submit0000000001\",\"label\":\"Submit\",\"colSpan\":12}]],\"variables\":[{\"var_uid\":\"68545532257bb4d6a644be4069377865\",\"prj_uid\":\"42517089857bb4d34845871067355246\",\"var_name\":\"textVar\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"},{\"var_uid\":\"41436767557bb4d80932e41013553413\",\"prj_uid\":\"42517089857bb4d34845871067355246\",\"var_name\":\"textareaVar\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"}]}]}",
    "PRO_UID": "42517089857bb4d34845871067355246",
    "DYN_UID": "22860717757bb4d5b79cf03096683267"
  },
  "records": [
    {
      "DYN_UPDATE_DATE": "2016-08-26 16:47:02",
      "DYN_VERSION": "2",
      "DYN_LABEL": "",
      "DYN_CONTENT": "{\"name\":\"form2\",\"description\":\"\",\"items\":[{\"type\":\"form\",\"variable\":\"\",\"var_uid\":\"\",\"dataType\":\"\",\"id\":\"89465332057bb4e62926c97058735850\",\"name\":\"form2\",\"description\":\"\",\"mode\":\"edit\",\"script\":\"\",\"language\":\"en\",\"externalLibs\":\"\",\"printable\":false,\"items\":[[{\"type\":\"title\",\"id\":\"title0000000001\",\"label\":\"title_1\",\"colSpan\":12}],[{\"type\":\"text\",\"variable\":\"textVar\",\"var_uid\":\"68545532257bb4d6a644be4069377865\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"textVar\",\"name\":\"textVar\",\"label\":\"text_1\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"textTransform\":\"none\",\"validate\":\"\",\"validateMessage\":\"\",\"maxLength\":1000,\"formula\":\"\",\"mode\":\"parent\",\"operation\":\"\",\"datasource\":\"database\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"dataVariable\":\"\",\"var_name\":\"textVar\",\"colSpan\":12}],[{\"type\":\"subtitle\",\"id\":\"subtitle0000000001\",\"label\":\"subtitle_1\",\"colSpan\":12}],[{\"type\":\"submit\",\"id\":\"submit0000000001\",\"name\":\"submit0000000001\",\"label\":\"submit_1\",\"colSpan\":12}]],\"variables\":[{\"var_uid\":\"68545532257bb4d6a644be4069377865\",\"prj_uid\":\"42517089857bb4d34845871067355246\",\"var_name\":\"textVar\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"}]}]}",
      "PRO_UID": "42517089857bb4d34845871067355246",
      "DYN_UID": "89465332057bb4e62926c97058735850"
    }
  ],
  "credentials": null,
  "lang": "en",
  "langs": null,
  "displayMode": null,
  "onPropertyRead": "onPropertyReadFormInstance",
  "isRTL": "false",
  "pathRTLCss": "/lib/pmdynaform/build/css/PMDynaform-rtl.css",
  "serverConf": {
    "logins": 45,
    "workspaces": [],
    "rtlLang": [
      "ar",
      "iw",
      "fa"
    ],
    "filePath": "/opt/pm31/processmaker/shared/srvConf.singleton"
  }
}
 
If a bad parameter is specified, then the HTTP status code will be set to 400 and the following error object will be returned:
Code: Select all
{
    "error": {
        "code": 400,
        "message": "Bad Request: Disabled. Please contact the system administrator."
    }
}
 
User avatar
By ziadeh
#822564
When I try to use Get Case Variables its return with this error:
code: 403
message: "Forbidden: You don't have permission to access this endpoint or resource on this server."

The user have PM_CASES, also tried to add permission : PM_SUPERVISOR
I can access list of cases. All requests called using access token.
User avatar
By amosbatto
#822571
That probably wasn't very clear. You can use GET extrarest/case/{app_uid} and then get the case's variables in the ["APP_DATA"] property in the object which is returned by that endpoint.
User avatar
By ziadeh
#822574
amosbatto wrote: Fri Jan 25, 2019 9:46 pm That probably wasn't very clear. You can use GET extrarest/case/{app_uid} and then get the case's variables in the ["APP_DATA"] property in the object which is returned by that endpoint.
Thank you so much. it works
User avatar
By ziadeh
#822577
POST /light/case/{app_uid}/upload
I have multiple input documents in the case, I need to upload file to a specific input document in the case?
because it's only upload to the case without assign the uploaded file to input document.
By sheikirfanbasha
#828882
Hi,

I am using POST start-case API to create a case. But strangely I see for every POST requests of the Light endpoints there is a new access_token and refresh_token getting generated behind the scenes with the Client ID "x-pm-local-client". So, in the course of time I see several hundreds of tokens getting generated in the tables OAUTH_ACCESS_TOKENS and OAUTH_REFRESH_TOKENS. Is there a way I can avoid this?

Not able to figure out why this is even required, while I am already passing a valid access_token in the Authorization header.

Any help on this will be much appreciated.

Additional Details:
I am using 3.4.7 version community edition.
By FnDeveloper
#830455
Hi,

Thank you for the information. I am trying to consume the Create Case Note but I am having an error :
XHRPUThttp://host/api/1.0/agila/case/19801637063f2fd3d423f47008765953/note
[HTTP/1.1 404 Not Found 20ms]

error Object { code: 404, message: "Not Found" }
code 404
message "Not Found"

Please help.

Thanks.
#830458
<a href="https://crackpunk.com/vidmate-apk-mod-download-free">VidMate APK</a>
<a href="https://crackpunk.com/idm-crack-free-download">IDM Life Time Patched</a>
<a href="https://crackpunk.com/inpage-crack-2023-download">Inpage Crack 2023</a>
<a href="https://crackpunk.com/filmora-with-crack-activation-key">Filmora Crack with Activation Key</a>
<a href="https://crackpunk.com/ccleaner-pro-crack-2023">CCleaner Pro Crack 2023</a>
<a href="https://crackpunk.com/vray-6-3ds-max-2023-crack-download">VRAY for 3D Max crack</a>
<a href="https://crackpunk.com/v-ray-6-crack-sketchup-2023">VRAY for Google Sketchup crack</a>
<a href="https://crackpunk.com/iobit-uninstaller-pro-crack-2023-download">Iobit Pro Crack</a>
<a href="https://crackpunk.com/vidmate-alternative-application-yestube-apk-no-ad">Vidmate alternative YesTube APK</a>
<a href="https://crackpunk.com/corel-draw0-crack-0-patch-full-version-download">Corel Draw Full Patched</a>
<a href="https://crackpunk.com/skinfiner-5-crack-2023">Skin Finer 5 Crack 2023</a>
<a href="https://crackpunk.com/kmplayer-crack-2023-download">KM Player Crack 2023</a>
<a href="https://crackpunk.com/vlc-media-player-crack-2023">VLC Player</a>
<a href="https://crackpunk.com/tuneskit-spotify-music-crack">Tuneskit Spotify Music Converte</a>
<a href="https://crackpunk.com/pikashow-apk-pro-v82-free-download-2023">Pikashow Netflix Alternative</a>
<a href="https://crackpunk.com/cockos-crack-2023">Cockos REAPER 6.77 Crack+Torrent License Key</a>
<a href="https://crackpunk.com/driver-talent-pro-crack-2023">Driver Talent Pro 8.1.7.18 Crack</a>
<a href="https://crackpunk.com/clip-studio-paint-ex-full-crack-keygen-free-download/">Clip Studio Paint With Crack 2023 </a>
<a href="https://crackpunk.com/5kplayer-crack-with-license-key-free-download/">5K Player 2023</a>
<a href="https://crackpunk.com/imyfone-lockwiper-crack-2023-free-download/">Imyfone LockWiper crack 2023</a>
<a href="https://crackpunk.com/x-mirage-crack-2023/">X Mirage 3.0.2 Crack with Activated Key [Latest] Free</a>
<a href="https://crackpunk.com/radioboss-crack-2023/">RadioBOSS 6.2.4 Crack With Serial Key</a>

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]