This documentation is for WSO2 Enterprise Service Bus version 5.0.0. For the latest ESB, view the latest WSO2 Enterprise Integrator documentation.

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

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

  1. Open the ESB management console.
  2. Click the Main tab, and then click APIs to open the Deployed APIs page.
  3. Click Add API to open the Add API page.
  4. Enter values for the following parameters in the header of the page as required.

    Parameter NameDescriptionData TypeRequired/OptionalBest Practices
    API NameA unique name for the API.StringRequired 
    ContextThis parameter specifies a URL context to which the requests processed by the REST API should be limited. See Specifying the Context for further information.StringRequiredVersion your APIs as early as possible in the development cycle. At present, the ESB 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 NameThe host at which the API is anchored.StringOptional 
    PortThe port of the REST API.IntegerOptional 
    Add ResourceClick 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.

  5. Click Add Resource to expand the page and display the Resource section.


    Configure the following parameters for the resource.

    Parameter NameDescriptionData TypeRequired/Optional
    MethodsSelect 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.booleanRequired
    URL StyleSelect 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.stringRequired
    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.
  6. Click Update to update the resource to the configuration. Repeat this step to enter as many resources as required.
  7. 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.

  1. Open the ESB management console.
  2. Click the Main tab, and then click APIs to open the Deployed APIs page. All the available APIs will be listed.
  3. 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

  • No labels