This documentation is for WSO2 Enterprise Integrator version 6.0.0 . 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

You can create a new API or import an existing API from the file system using WSO2 EI tooling. You can also add an API resource to an existing API via WSO2 EI tooling.

You need to have WSO2 EI tooling installed to create a new API or to import an existing API via WSO2 EI tooling. For instructions on installing WSO2 EI tooling, see Installing Enterprise Integrator Tooling.

Creating a new API

Follow these steps to create a new API. 

  1. In Eclipse, click the Developer Studio menu and then click Open Dashboard. This opens the Developer Studio Dashboard.
  2. Click REST API on the Developer Studio Dashboard.
  3. Leave the first option selected and click Next.
  4. Type a unique name for the new API and specify the context, hostname, and port. For more information, see Configuring Endpoints using REST APIs.
  5. Do one of the following:
    • To save the API in an existing ESB Config project in your workspace, click Browse and select that project.
    • To save the API in a new ESB Config project, click Create new ESB Project and create the new project.
  6. Click Finish. The REST API is created in the src/main/synapse-config/api folder under the ESB Config project you specified. When prompted, you can open the file in the editor, or you can right-click the API in the project explorer and click Open With > ESB Editor. Click its icon in the editor to view its properties.

Importing an API

Follow these steps to import an existing API into an ESB Config project. 

  1. In Eclipse, click the Developer Studio menu and then click Open Dashboard. This opens the Developer Studio Dashboard.
  2. Click REST API on the Developer Studio Dashboard.
  3. Select Import API Artifact and click Next.
  4. Specify the XML file that defines the API by typing its full pathname or clicking Browse and navigating to the file.
  5. In the Save API In field, specify an existing ESB Config project in your workspace where you want to save the API, or click Create new ESB Project to create a new ESB Config project and save the API configuration there.
  6. If there are multiple API definitions in the file, click Create ESB Artifacts, and then select the artifacts you want to import.
  7. Click Finish. The APIs you selected are created in the subfolders of the src/main/synapse-config/api folder under the ESB Config project you specified, and the first API appears in the editor.

Adding an API resource

Follow these steps below to add an API resource to an existing API.

  1. Open an existing API in the editor.
  2. In the tool palette, click APIResource in the API section and simply drag and drop the resource to the REST API.
  3. You can now add mediators, endpoints etc to the resource and save.
  • No labels