This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

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


You can configure the HTTP endpoint using XML. Click on Switch to source view link in the HTTP Endpoint page.

The syntax is as follows.

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

HTTP Endpoint Attributes




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

Using the URI postfix property:

Let's take a look at it using an example. If you add a / between {uri.var.context2}{uri.var.postfix}, it is evaluated as an invalid invocation because {uri.var.postfix} contains a / at the start.


<http uri-template="http://{}:{uri.var.port}/{uri.var.context1}/services/{uri.var.context2}{uri.var.postfix}" method="get">


The HTTP method to use during the invocation.

UI Configuration

The following page is opened by clicking HTTP Endpoint in the Add Endpoint tab of the Manage Endpoints page.

The parameters to configure an HTTP endpoint are as follows.

Parameter NameDescription
NameThis parameter is used to enter a unique name for the endpoint.
URI Template

The URI template of the endpoint. Insert uri.var. before each variable. Click Test to test the URI.

If the endpoint URL is an encoded URL, then you need to add legacy-encoding: when defining the uri-template.

e.g., uri-template="legacy-encoding:{uri.var.APIurl}"

HTTP Method

The HTTP method to use during the invocation of the endpoint. Supported methods are as follows.

  • Get
  • Post
  • Patch
  • Put
  • Delete
  • Options
  • Head
  • Leave-as-is
Show Advanced OptionsClick this link if you want to add advanced options to the endpoint. See Advanced Options for details of common advanced options you can add.

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="


Example 1 - populating an HTTP endpoint during mediation

<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:

  • No labels