How to use Call API
Overview
The Call API skill is meant to help the users to easily call an API within their flow.
Request Options
Body
The request body can be set here.
Headers
The request headers can be set here and should respect the JSON format.
Response
Memory
To save the response, we use Memory. By default the response will be saved in temp.response
, but you can use the memory of your choice.
The saved response object should look like this:
{
"body": <Response Body>,
"status": 200
}
Success / Failure
When a response return a status code 400
and above, the request will result in a failure and will execute the On failure
transition. All other status codes will result in a success and will execute the On success
transition.
Templating
Templating is supported in the body
and the headers
to get access to your variables stored in Memory. All bot
, user
, session
, temp
, event
are accessible via templating.