Try OpenEdge Now
skip to main content
Configuration
Configuring third-party Web applications : OpenEdge Management REST API framework : URL mapping
 

URL mapping

The REST API framework performs URL mapping based on the path specified in the RequestMapping annotation. The URL mapping accepts parameters defined within the URL string, and then the mappings are made available to parameters for a method through annotations.
The REST API code example shows both URL and query-parameter mapping. The mapping is based on a simple pattern matching of the incoming URL, and each parameter is treated as a wildcard string for its position within the URL. Only the URL part of the request is matched against the annotated REST handler methods, and the query string of the URL is ignored.
Consider an example where the path: /some/{container}/url/{key} has two parameters defined in it: container and key. Their values from the URL can be retrieved either from annotated method parameters or from within the body of the method. In the REST API code example, the parameters to the method are annotated with PathParam(“<url parameter>”), where the url parameter is the name matching the value in the path for the method.