Input parameters in the URL query string |
You can create a custom REST service method with input parameters that are passed in the URL query string. In the following URL, 'booking_id=154' is a URL query string: http://localhost:8090/mycustomservice/ActiveBookings?booking_id=154
To make this work, In Service Definer, the Relative URI Path field of the method must be: /ActiveBookings
and you need to have an input parameter with the Annotation field set to: @QueryParam("booking_id")
You can then use the value of the parameter in the implementation of the method. Multiple input parametersIf the method has more than 1 input parameter, the caller separates query string fragments by using the '&' symbol: http://localhost:8090/mycustomservice/ListedTours?destination=HOLLAND&tour_type=TULIPS
In Service Definer, have multiple parameter records for the method, and make sure that each has an Annotation using the @QueryParam keyword.
See also Input parameters in the URL path |