How to Work With API

I start working in my bot which is under Rasa platform, i really reach the final work.

The problem for me now is that i have to make the bot to understand my active directory, so when i ask him about any number of any employee in my organization, he should response to give me, i have the data in an API that i have create it and now i have the HTTP link for that API, the work need is to connect this API to my bot!!! how to do that? can any one help me?

You can trigger a custom action for that and call your API to query your db from there. You can find information about custom actions here: actions

1 Like

i do that for weather API which comes as Key, but i need a clear instruction aboutt how to do that for HTTP API?

You can use the Requests library inside a custom action to make calls to your HTTP API.

It could be something like:

r = requests.get('https://my-company.com/api/employee/<Employee Number>')
2 Likes