Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.
#824504
When I'm using processmaker api to query pmtables according to the https://wiki.processmaker.com/3.1/REST_ ... 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
object(stdClass)[403]
  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.
0.1.1
MAFE JS Lib. Ver.
release/3.2.3.a44fbc3
PM Dynaform JS Lib. Ver.
release/3.2.3.c450379
Upgrades/PatchesNever upgraded
how can I solve the problem?
#824520
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.

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[…]