Understanding REST Web application URI construction
The REST Web application developer defines the URI path during the REST Web application development. Users access a REST Web application using the URI. For more information on defining a Web application URI, see the Progress Developer Studio for OpenEdge Online help.
This section helps you understand the different components of the Rest Web application URI:
Table 77. Syntax
http[s]://host:port/rest-app-name/url-pattern
host
Specifies the location of the host computer on which the Web server resides.
In the case of REST Web applications, host must be localhost as it is mandatory that the Web server and the REST Web applications reside in the same computer.
port
Specifies the port number assigned to the Web server.
url-pattern
Specifies the URI pattern you supplied for the REST Web application.
For instance, if you are using a Tomcat Web server, you define the value for url-pattern using the <url-pattern> tag in the web.xml (in the ...\apache-tomcat-7.0.29\conf).
rest-app-name
Specifies the name of the REST Web application that is being accessed.
Typically, url-pattern, and rest-app-name are assigned aliases (actual values) during REST Web application development. Aliases typically do not consist of physical names related to the system or to file paths, but rather names meaningful to providers.
For example, consider the sample Web server and the REST Web application elements and aliases in the following table.
Table 78. Sample aliases for URL components
URL component
Sample alias
host
localhost
port
8080
rest-app-name
customerInfo
uri-pattern
rest
Given the aliases in the above table, you access the customerInfo REST application using the following URI:
The URI for the REST Web application is defined by the REST Web application developer. Essentially, the application developer constructs and sets up all the input/output parameters (header, body, cookie, query string, path, and form) when developing the ABL REST Web application in Progress Developer Studio for OpenEdge. For more information on constructing the REST Web application URI using REST Expose Editor, see the Progress Developer Studio for OpenEdge online help. As part of URI construction, you must ensure that you are aware of how the URL is encoded when transmitted over the Internet. For more information on HTML URL Encoding, see http://www.w3schools.com/tags/ref_urlencode.asp.