Exposing Workflows and Integrations as API

Introduction

This article gives an overview on how to expose your workflows and integrations on webMethods.io Integration as APIs.

Prerequisites:

  1. You must have an active webMethods.io Integration tenant. If you do not, please request a free trial here.
  2. You must have an active webMethods.io API Gateway tenant. If you do not, please go to your webMethods.io Integration > App Switcher > My Cloud and request a free trial.
  3. You must have an active Slack account to follow along with this article.

Procedure:

A.
This section showcases how to configure a webhook on webMethods.io Integration with your Slack account.

  1. Login to your webMethods.io Integration tenant.

  2. Create a workflow and select a webhook.

  3. Copy the webhook URL till /run and save it for later use.

  4. Click Next and provide the below sample body for your webhook.
    {
    "text”: “”,
    "username”: “”
    }
    image

  5. This is it for the webhook configuration.

  6. Now, select the Slack connector and configure it as shown below.
    image

  7. Map the webhook data with the Slack input as shown below.

  8. This is how your workflow should look at the end.

B.
In this section, we will create an API representing the workflow created above.

  1. Log in to your webMethods.io API Gateway tenant and click on APIs.

  2. Now, select Create to create an API and follow the steps shown in the proceeding steps.

  3. Fill up the required details as shown below and proceed to Technical Information.

  4. Paste the previously copied webhook URL in the Server URL Field and click on Add.

  5. Now, add a resource like shown below.

  6. Save the API.

  7. Now, activate the API to interact with it.

  8. Copy the Gateway endpoint.

  9. Copy the webhook id following /run in the webhook URL.

  10. To test your API, open up Postman and send a POST request to Gateway endpoint + / + webhook id with a request body.

2 Likes

Hi Anshuman,

Thanks for sharing this.

Regards,
Firoz N