Differences:
- The first difference between query and path parameters is their position in the URL. While the query parameters appear on the right side of the ‘?’ in the URL, path parameters come before the question mark sign.
- Secondly, the query parameters are used to sort/filter resources. On the other hand, path parameters are used to identify a specific resource or resources.
- You can’t omit values in path parameters since they are part of the URL. On the other hand, query parameters are added at the end of the URL, and thus can allow omission of some values as long as the serializing standards are followed.
- Query parameters have unique attributes which help to define resources in a better way. Path parameters, on the other hand, have dynamic resources, which act upon more granular objects of the resource.
How to create Template Parameters in OIC:
How the path and Query Parameters URLs look:
For Path or Template parameters:
https:/oic_instance/ic/api/integration/v1/flows/rest/Hello_World_Rest_Service/2.0/sayHello/Sanddy
For Query Parameters:
https:/oic_instance/ic/api/integration/v1/flows/rest/Hello_World_Rest_Service/2.0/sayHello?name=Sanddy
No comments:
Post a Comment