DEV Community

Mariela Dimitrova for Software AG Tech Community

Posted on • Originally published at tech.forums.softwareag.com on

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. image
  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. image
  8. This is how your workflow should look at the end. image

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. image
  2. Now, select Create to create an api and follow the steps shown in the proceeding steps. image
  3. Fill up the required details as shown below and proceed to Technical Information. image
  4. Paste the previously copied webhook URL in the Server URL Field and click on Add. image
  5. Now, add a resource like shown below. image
  6. Save the API. image
  7. Now, activate the API to interact with it. image
  8. Copy the Gateway endpoint. image
  9. Copy the webhook id following /run in the webhook URL. image
  10. To test your API, open up Postman and send a POST request to Gateway endpoint + / + webhook id with a request body. image

Read full topic

Discussion (0)