For example Oracle Fusion applications provides REST API's using both path parameters and query parameters.
Path Parameter Sample:
https://fusion-host-name:443/hcmRestApi/resources/latest/userAccounts/{UserGUID}
When you provide this URL in OIC relative URL path , OIC will create a parameter called UserGUID with type as String.
You can use this parameter variable to pass dynamic values during runtime.
Query Parameter Sample:
https://idcs-host-name/admin/v1/Users?filter=userName+sw+%22vijaya%22
https://oracle-fusion-hostname/hcmRestApi/resources/latest/emps?q=PersonNumber=112233
In this scenario , we cant provide URL with ? in OIC rest end point. We can provide value till ? mark.
In the above examples, query parameters are filter and q strings.
While creating REST invoke , select add query parameters and provide Query parameters as filter and q.
We can provide values to these parameters in mapping and we can pass dynamic values.
Example :
q mapping concat("PersonNumber=",'$dynamic_person_number')
No comments:
Post a Comment