Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
titleAPI Extension Sequence Example
<sequence xmlns="http://ws.apache.org/ns/synapse" name="admin--TwitterSearch:v1.0.0--In">
    <log level="custom">
        <property name="TRACE" value="API Mediation Extension"/>
    </log>
</sequence>
Info

NOTE: The tenant username must be given as <username>-AT-<domain> in the configuration. For example, if the tenant username is testuser and the domain is wso2.com, then the name attribute in the above configuration must be testuser-AT-wso2.com--TwitterSearch:v1.0.0–In. The @ sign must given as AT.

To test the code in super-tenant mode, copy it to an XML file (e.g., twittersearch_ext.xml) and save the file in the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences directory, if you are using a standalone server. In multi-tenant mode, copy the file to the tenant's synapse sequence folder. For example, if tenant id is 1, then copy it to <API_Gateway>/repository/tenants/1/synapse-configs/default/sequences folder. 

...

When an API is published, a file with its synapse configuration gets is created on the API Gateway. This synapse configuration has a set of handlers as shown in the following example:

...