Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
User avatar
By amosbatto
#812739
I have created an "extraRest" plugin which you can import which contains an endpoint to retrieve case information using the case number:
(24 KiB) Downloaded 534 times
To use it, you need to go to Admin > Plugins > Plugin Manager and click on "Import". After you have imported it, then select the "extraRest Plugin" in the list and click on "Enable".

Then you can call the endpoint at the URL:
http://{your-domain-or-ip}/api/1.0/{workspace}/extrarest/case/number/{app_number}
For example:
http://example.com/api/1.0/workflow/ext ... number/103

It will return the same information as the Cases::LoadCase() function in an object.
For example:
Code: Select all
{
    APP_UID : "4024927765a500dab8d2b55062456785",
    APP_TITLE : "#226",
    APP_DESCRIPTION : "",
    APP_NUMBER : 226,
    APP_PARENT : "",
    APP_STATUS : "TO_DO",
    APP_STATUS_ID : "2",
    PRO_UID : "5978368845a4ea2a878e370031610500",
    APP_PROC_STATUS : "",
    APP_PROC_CODE : "",
    APP_PARALLEL : "N",
    APP_INIT_USER : "00000000000000000000000000000001",
    APP_CUR_USER : "00000000000000000000000000000001",
    APP_CREATE_DATE : "2018-01-05 18:43:39",
    APP_INIT_DATE : "2018-01-05 18:43:39",
    APP_FINISH_DATE : "",
    APP_UPDATE_DATE : "2018-01-05 19:07:13",
    APP_DATA : {
            SYS_LANG : "en",
            SYS_SKIN : "neoclassic",
            SYS_SYS : "workflow",
            APPLICATION : "4024927765a500dab8d2b55062456785",
            PROCESS : "5978368845a4ea2a878e370031610500",
            TASK : "6661502815a4ea3c0def5f4024745954",
            INDEX : "4",
            USER_LOGGED : "00000000000000000000000000000001",
            USR_USERNAME : "admin",
            specFile_label : ""Copy_case_data-1.pmx"",
            APP_NUMBER : "226",
            PIN : "YZV5",
            specFile : ""3950403955a500dc62b1d98032142826"",
            __VAR_CHANGED__ : "specFile,specFile,specFile,specFile,result",
            result : "0"
    },
    APP_PIN : "18802cc0e3bf67cfe11e408df28807d4",
    APP_DURATION : 0,
    APP_DELAY_DURATION : 0,
    APP_DRIVE_FOLDER_UID : "",
    APP_ROUTING_DATA : "a:0:{}",
    STATUS : "To do",
    TITLE : "#226",
    DESCRIPTION : "",
    CREATOR : "Administrator admin",
    CREATE_DATE : "2018-01-05 18:43:39",
    UPDATE_DATE : "2018-01-05 19:07:13"
}
If you want to add new endpoints or check the code, see the file:
workflow/engine/plugins/extraRest/src/Services/Api/ExtraRest/Extra.php

Note: If you want to edit the URLs or POST parameters of an endpoint, you need to disable and then enable again the plugin in ProcessMaker to reregister the endpoints, so they are rewritten in the shared/sites/{workspace}/routes.php file.

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]