REST URI rules are not detected in REST DPH when JSON DPH is used also

Document ID : KB000074985
Last Modified Date : 08/10/2018
Show Technical Document Details
Issue:
Using multiple DPHs in API calls is not adding REST URI rules when JSON DPH is added also.
Environment:
DevTest 10.1,10.2,10.3.
Cause:
The issue seems to be that when auto-detecting which DPHs to use against a mixture of GET and POST requests, the JSON DPH is taking precedence over the REST DPH.  This behavior exists in the importers and recorders of Workstation and Portal, as well as the Invoke V2 API. 
Resolution:
For DevTest 10.3, open a support case and refer DE380691 and we can share a patch. 

For other versions prior to 10.3, the below is recommended:
In case of importing a mixture of GET requests and POST requests with JSON bodies, the JSON DPH will be the only one auto-selected since it carries a higher weight than the REST DPH when both are found to be valid candidates.

To have the URI rules in REST DPH, we must explicitly add it as below in the API Request Body:  
------
{  
"forRequest": true,  
"typeId": "RESTDPH",  
"rules": [  
              {"uri": "GET /images/current/{URLPARAM0}/"},  
              {"uri": "GET /orders/id/{URLPARAM0}/sample/"},  
              {"uri": "POST /account/imaging/"}  
            ]  
}  
-----