Skip to content

Create an Endpoint

Follow the instructions below to create a new Endpoint artifact in the Micro Integrator for Visual Studio Code extension (MI for VS Code).

Instructions

Create the endpoint artifact

  1. Launch Visual Studio Code with the Micro Integrator for VS Code extension (MI for VS Code) installed.

    Info

    Follow the Install Micro Integrator for VS Code documentation for a complete installation guide.

  2. Create an integration project.

  3. Go to MI Project Explorer > Endpoints.

    Create endpoint

  4. Hover over Endpoints and click the + icon that appears to open the Endpoint Form below.

    Add endpoint

  5. Select the endpoint type you want from the Endpoint Form.

    Endpoint form

  6. Enter a unique name for the endpoint.

  7. Specify values for the required parameters for the selected endpoint type.

  8. Click Create to save the endpoint configuration.

The endpoint will be created in the <PROJECT_NAME>/src/main/wso2mi/artifacts/endpoints folder under the integration project you created.

Design the integration

Note

Endpoints cannot be added directly to the integration sequence. Instead, they must be invoked using the Send Mediator or the Call Mediator.

Therefore, to add an endpoint artifact to the integration sequence, use the Send Mediator or the Call Mediator.

  1. Open the Design View of your mediation sequence.
  2. Add the Call Endpoint mediator from the palette under All Mediators > Generic section to the relevant position in the mediation sequence:

    Select call endpoint

    Tip

    Similarly, you can use the Send Mediator instead of the Call Mediator.

  3. In the Call Endpoint form, select the endpoint you need to invoke under Select Endpoint. You can also select Create New to create a new endpoint artifact.

    Call endpoint

The endpoint artifact is now linked to your integration sequence.

Update the properties

  1. Go to MI Project Explorer.

  2. Select the endpoint artifact available under <PROJECT_NAME>/Endpoints/.

You can use the Form view or the Source view to update endpoint properties.

To update from the Form View:

  1. Go to MI Overview.
  2. Under the Endpoints available, select the endpoint that you need to update the properties. The Endpoint Form will be opened.
  3. Update the properties.
  4. Click Save Changes.

To update from the Source View:

  1. Go to MI Overview.
  2. Under the Endpoints available, select the endpoint you want.
  3. Click on the Show Source (</>) icon located in the top right corner of the VS Code.

    Show source

    This will open the source view of the endpoint artifact.

    Endpoint source view

To learn more about all available endpoint properties, see the endpoint properties documentation.