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

Moderator: amosbatto

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.
When I'm using processmaker api to query pmtables according to the ... ing_Filter and filter them like this:
Code: Select all
    $url  = "/api/1.0/toranj/pmtable/" . $tourlist . '/data?q= {"where": {"tourname": "tr456"}}';
    $oRet = pmRestRequest("GET",$url, null, $oauthToken->access_token);
actually request this url: /api/1.0/[workspacename]/pmtable/[pmtableuid]/data?q= {"where": {"tourname": "tr456"}}
the result return no response:
Code: Select all
  public 'response' => null
  public 'status' => int 400
but there is a row with this specific query in database.
I'm using bitnami processmaker enterprise 3.2:
Code: Select all
ProcessMaker Ver.
3.2.3 - Enterprise Edition
PMUI JS Lib. Ver.
MAFE JS Lib. Ver.
PM Dynaform JS Lib. Ver.
Upgrades/PatchesNever upgraded
how can I solve the problem?
You need to get rid of the spaces in your URL.
This code worked for me:
Code: Select all
function getPmTableSearch($oToken) {
	$tableId = '6030376055c6375a3334329095826979';
	$url = '/api/1.0/workflow/pmtable/'.$tableId.'/data?q={"where":{"FILENAME":"CommentsInWiki.odt"}}';
	$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);
	print "\n\n".json_encode($oRet->response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)."\n\n";
If you need a space, then use %20 in place of the space.

See: "Cron Job $_SERVER issue" (stackove[…]

As you have got seen that after every single updat[…]

issue with processmaker 3.2

Hello! The solution to your question is the foll[…]

BPMN project disappeared

Hi Alex! , maybe you forgot to save your process[…]