This documentation is for WSO2 Enterprise Service Bus version 4.8.0 . View documentation for the latest release.

All docs This doc
Skip to end of metadata
Go to start of metadata

The HTTP endpoint allows you to define REST endpoints using URI templates similar to the REST API. The URI templates allow a RESTful URI to contain variables that can be populated during mediation runtime using property values whose names have the "uri.var." prefix. An HTTP endpoint can also define the particular HTTP method to use in the RESTful invocation.

XML Configuration

If you want to configure the HTTP Endpoint using XML, click the Switch to source view link on the HTTP Endpoint page, and then use the following syntax:

<http uri-template="URI Template" method="GET|POST|PATCH|PUT|DELETE" />

HTTP Endpoint Attributes




The URI template that constructs the RESTful endpoint URL at runtime.


The HTTP method to use during the invocation.


<endpoint xmlns="" name="HTTPEndpoint">
    <http uri-template="http://localhost:8080/{uri.var.servicepath}/restapi/{uri.var.servicename}/menu?category={uri.var.category}&amp;type={uri.var.pizzaType}" method="GET">

The URI template variables in this example HTTP endpoint can be populated during mediation as follows:

            <property name="uri.var.servicepath" value="PizzaShopServlet"/>
            <property name="uri.var.servicename" value="PizzaWS"/>
            <property name="uri.var.category" value="pizza"/>
            <property name="uri.var.pizzaType" value="pan"/>
                <endpoint key="HTTPEndpoint"/>

This configuration will cause the RESTful URL to evaluate to:


UI Configuration

  1. On the Add Endpoint tab, click HTTP Endpoint (see Adding an Endpoint). The HTTP Endpoint page appears with its default view.
  2. Specify a unique name for this endpoint, and then enter the URI template, inserting "uri.var." before each variable. To test the URI, click Test.
  3. Specify the HTTP method to use during the invocation of this endpoint.
  4. Optionally, add advanced options and properties as described in Adding an Endpoint

You can create HTTP endpoints by specifying values for the parameters given above.

Alternatively, you can specify one parameter as the HTTP endpoint by using multiple other parameters, and then pass that to define the HTTP endpoint as follows:

<property name="uri.var.httpendpointurl" expression="fn:concat($ctx:prefixuri, $ctx:host, $ctx:port, $ctx:urlparam1, $ctx:urlparam2)" />
<http uri-template="
  • No labels