Introduction
This article gives an overview on how to expose your workflows and integrations on webMethods.io Integration as APIs.
Prerequisites:
- You must have an active webMethods.io Integration tenant. If you do not, please request a free trial here.
- 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.
- 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.
-
Login to your webMethods.io Integration tenant.
-
Create a workflow and select a webhook.
-
Copy the webhook URL till /run and save it for later use.
-
Click Next and provide the below sample body for your webhook.
{
"text”: “”,
"username”: “”
}
-
This is it for the webhook configuration.
-
Now, select the Slack connector and configure it as shown below.
-
Map the webhook data with the Slack input as shown below.
-
This is how your workflow should look at the end.
B.
In this section, we will create an API representing the workflow created above.
-
Log in to your webMethods.io API Gateway tenant and click on APIs.
-
Now, select Create to create an API and follow the steps shown in the proceeding steps.
-
Fill up the required details as shown below and proceed to Technical Information.
-
Paste the previously copied webhook URL in the Server URL Field and click on Add.
-
Now, add a resource like shown below.
-
Save the API.
-
Now, activate the API to interact with it.
-
Copy the Gateway endpoint.
-
Copy the webhook id following /run in the webhook URL.
-
To test your API, open up Postman and send a POST request to Gateway endpoint + / + webhook id with a request body.