Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
Hi, I'm using the ProcessMaker API to integrate with another web system here from the company. I am using to fetch the endpoint task ... ch.2Fpaged using to log into the API a standard admin user that I have in my PM workspace . Then I filter through the USR_UID. It works.
However I would like to know if it is possible to make filters like this for the endpoint list of cases in draft, which participated, unassigned and start-up tasks?
User avatar
By amosbatto
You can get most of the lists like this:

If you want the participated and unassigned lists for a particular user, then import this plugin:
(27.5 KiB) Downloaded 82 times
The extraRest plugin contains this custom endpoint:

For participated cases:

For unassigned cases:

There are many other options, which you can find in the endpoint's source code:
Code: Select all
     * Return the list of cases for a specified user without being that logged-in user
     * @url GET /cases/user/:user_uid
     * @access protected
     * @param string $user_uid User's unique ID. Set to 00000000000000000000000000000000 for logged-in user. {@from path} {@min 32} {@max 32}
     * @param int $start {@from query}
     * @param int $limit {@from query}
     * @param string $action {@from query} {@choice todo,draft,sent,unassigned,paused,completed,cancelled,search,simple_search,to_revise,to_reassign,all,gral,default} 
     * @param string $filter {@from query} {@choice read,unread,started,completed}
     * @param string $search String to search for. {@from query}
     * @param string $pro_uid Process unique ID. {@from query} {@min 32}{@max 32}
     * @param string $app_status Only used if action=search {@from query} {@choice TO_DO,DRAFT,PAUSED,CANCELLED,COMPLETED,ALL}
     * @param string $date_from YYYY-MM-DD {@from query}
     * @param string $date_to YYYY-MM-DD {@from query}
     * @param string $dir Ascending or descending sort order. {@from query} {@choice ASC,DESC}
     * @param string $sort Database field to sort by. {@from query}
     * @param string $cat_uid Category unique ID. {@from query} {@min 32}{@max 32}
     * @param boolean $configuration Set to 1 or 0. {@from query} {@from path}
     * @param boolean $paged Set to 1 or 0. {@from query} {@from path}
     * @param string $newer_than YYYY-MM-DD. Like date_from, but > not >=. {@from query}
     * @param string $older_than YYYY-MM-DD. Like date_to, but < not <=. {@from query}
     * @return array
     * @author Amos Batto <[email protected]>
     * @copyright Public Domain
    public function getCasesForUser(
        $user_uid,                            //for the logged-in user, set to: 00000000000000000000000000000000 
        $start = null,
        $limit = null,
        $action = null, 
        $filter = null,
        $search = null,
        $pro_uid = null,                      //process unique ID
        $app_status = null,                   //only used if $action=='search'
        $date_from = null,
        $date_to = null,
        $dir = null,                          //ASC or DESC
        $sort = "APP_CACHE_VIEW.APP_NUMBER",
        $cat_uid = null,                      //category unique ID
        $configuration = true,                
        $paged = true,
        $newer_than = '',                     //same as $date_from, but > rather than >=
        $older_than = ''                      //same as $date_to, but < rather than <=
    ) {  
        $type = null;                         //not setable parameter
        $callback = null;                     //not setable parameter
        $g = new G();

        if ($user_uid == 0) {
            $user_uid = $this->getUserId();
        //see Applications::getAll() defined in workflow/engine/classes/class.applications.php
        $oApp = new \Applications();
        $aList = $oApp->getAll(
        if ($paged) {
            return $aList;
        } else {
            return $aList['data'];
REST API Question

I am currently looking at developing a portlet for[…]

Everybody wants to be famous, but nobody wants to […]

Hi, I attached a sample config file, Please check […]

Error clicking on Participated

Hi, I attached a sample config file, Please check […]