Getting the Connector
At the moment the easiest way to get the connector is to create an API asset in MuleSoft Design Center by uploading Intento API OAS YAML
Using the Connector
The connector has two operations Create Translate and Get Operation by Id. This article demonstrates how to call them using MuleSoft HTTP Listener as a trigger.
In order to use any of Intento API operations, you have to fill a configuration for the Connector upon it is added to the first Flow. After that, you can reuse the configuration.
Create Translate operation
Assume you constructed a flow
As DataWeave detects both input and output formats, you can set fixed output parameters like provider and async in our example and connect dynamic ones, like to, from and text.
Dynamic ones are shown as null in preview since no data is available to display.
Get Operation By Id operation
Using DataWeave for Get Operation By ID request is redundant, but we can use it to transform the response:
The only parameter you have to set is the operation Id (in our example from HTTP Listener query parameter id):
Once the application is deployed you can trigger its flows.
Request a translation:
Get the result by id: