This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with APIs via the Management Console
You can easily add APIs as well as delete APIs that are no longer required via the Management Console. The following topics describe how you can add APIs and delete APIs:
Adding APIs
Follow the steps below to add an endpoint
- Open the WSO2 EI management console.
- Click the Main tab, and then click APIs to open the Deployed APIs page.
- Click Add API to open the Add API page.
Enter values for the following parameters in the header of the page as required.
Parameter Name Description Data Type Required/Optional Best Practices API Name A unique name for the API. String Required  Context This parameter specifies a URL context to which the requests processed by the REST API should be limited. See Specifying the Context for further information. String Required Version your APIs as early as possible in the development cycle. At present, the EI identifies each API by its unique context name. If you introduce a version in the API context (e.g., /Service 1.0.0), you can update it when you upgrade the same API (e.g., /Service 1.0.1) Host Name The host at which the API is anchored. String Optional  Port The port of the REST API. Integer Optional  Add Resource Click this link to add one or more  At least one resource is required. Create at most only one default resource (a resource with neither a uri-template nor a url-mapping) for each API.
The parameters that can be configured for each resource is described in detail in the next section.
Click Add Resource to expand the page and display the Resource section.
Configure the following parameters for the resource.Parameter Name Description Data Type Required/Optional Methods Select the required check boxes to indicate the HTTP method to be used to invoke the REST API. See Best practices for designing REST APIs for more information. boolean Required URL Style Select a value for his parameter to indicate whether you are specifying a URL mapping or a URI template. A new data field named URL-Mapping or URI-Template will appear based on the selection. Enter the required pattern in this data field. string Required In Sequence This specifies the mediation flow for incoming messages. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
 One of the four options should be selected. Out Sequence This specifies the mediation flow for outgoing messages. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
 One of the four options should be selected. Fault Sequence This specifies the mediation flow for messages with errors. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
Â
 One of the four options should be selected. - Click Update to update the resource to the configuration. Repeat this step to enter as many resources as required.
- Click Save to save the API. The API would now appear in the list of deployed APIs.
Deleting APIs
Follow the steps below to delete an API.
- Open the WSO2 EI management console.
- Click the Main tab, and then click APIs to open the Deployed APIs page. All the available APIs will be listed.
- Click Delete for the relevant API. Then click Yes in the message which appears to confirm whether you want the API to be deleted. The API will be removed from the deployed APIs list