Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

An API definition is identified by the <api> tag. Each API must specify a unique name and a unique URL context (see below). A REST API is made of one or more resources, which is a logical component of an API that can be accessed by making a particular type of HTTP call. For example:

Code Block
languagexml
<api name="

...

String" context="

...

uri path of API" [hostname="host name of server"]  [port="port number"]>
	<resource [methods="GET|POST|PUT|DELETE|OPTIONS|HEAD|PATCH"] [uri-template="uri template"|url-mapping="url mapping"]>
		<inSequence>...</inSequence>?
		<outSequence>...</outSequence>?
		<faultSequence>...</faultSequence>?
	</resource>
</api>

Once a request is dispatched to a resource it will be mediated through the in-sequence of the resource. At the end of the in-sequence the request can be forwarded to a back-end application for further processing. Any responses coming from the back-end system are mediated through the out-sequence of the resource. You can also define a fault-sequence to handle any errors that may occur while mediating a message through a resource.

...