# Rasa HTTP SDK for node.js available?

**URL:** <https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529>\
**Category:** Getting Started with Rasa\
**Created:** [July 5, 2019, 9:08am UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529 "2019-07-05T09:08:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 5, 2019, 9:08am UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/1 "2019-07-05T09:08:57Z")

</div>

Hello there,

I am currently using node.js to implement a simple façade API for interaction with Rasa in our backend, as we already have solved the entire topic of user authentication and authorization and just want to use the Rasa functionality behind our own API. I think I have understood how to interact with the API sufficiently well to get the core behave just like in the rasa shell (add message, then predict, then execute best action for as long as we don’t get an action\_listen after which I am not doing anything else --\> Is this documented anywhere?).

Is there an SDK for the HTTP API for node.js somewhere? I have found [rasa-api](https://www.npmjs.com/package/rasa-api), but that’s not for the 1.x version of Rasa. Would anybody else also be interesting in having such a package? I might consider creating one; the API docs are there (Swagger docs), so extracting that and creating a node package to interact with the API should be pretty straight forward.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 5, 2019, 3:47pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/2 "2019-07-05T15:47:15Z")

</div>

As of right now, the only supported SDK we offer is the python one – super cool that there was a node one before though! Maybe you should try to collab with the person who created that one already – in any case, I think creating an up-to-date one is a great idea!

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 7, 2019, 6:20pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/3 "2019-07-07T18:20:42Z")

</div>

> [@erohmensing](#):
>
> I think creating an up-to-date one is a great idea!

It would probably make sense to add some minor things to the `rasa.yaml` OpenAPI spec (mostly `operationId` properties), then it should be really easy to create an SDK via something like [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). PRs are accepted in principle if they make sense, right?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 7, 2019, 6:58pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/4 "2019-07-07T18:58:32Z")

</div>

@DonMartin76 yes, we love to accept contributor PRs! I think adding things to the OpenAPI spec that seem to have been overlooked is a great addition. OpenAPI Generator looks like a really cool tool!

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 7, 2019, 7:04pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/5 "2019-07-07T19:04:56Z")

</div>

> [@erohmensing](#):
>
> I think adding things to the OpenAPI spec that seem to have been overlooked is a great addition.

I was really happy you have such a document in the first place. Makes it so much easier to reason about the API. ReDoc makes a pretty good job in generating the documentation as well. I think it would make sense to have a more thorough description of how you could use it as well. But that’s a different topic.

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 7, 2019, 7:07pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/6 "2019-07-07T19:07:10Z")

</div>

> [@erohmensing](#):
>
> yes, we love to accept contributor PRs!

One more little thing: I found the `rasa.yaml` in the `docs` branch, somewhere in the `master` directory. That’s the right place to update it?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 7, 2019, 7:08pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/7 "2019-07-07T19:08:08Z")

</div>

Yep, this one? [rasa/rasa.yml at master · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/master/docs/_static/spec/rasa.yml) I believe that should be the spot.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 7, 2019, 7:20pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/8 "2019-07-07T19:20:53Z")

</div>

Also, it’d be great if, when you make a PR, you could link to it in this post. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 7, 2019, 7:21pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/9 "2019-07-07T19:21:58Z")

</div>

PR is up: [Add operationId properties to endpoints by DonMartin76 · Pull Request #3953 · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/pull/3953)

I’ll see how far I get in the next days with writing a node.js SDK; the generator is fine, but it leaves a couple of open ends that need to fixed (package file, TypeScript transpilation,…).

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 7, 2019, 7:24pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/10 "2019-07-07T19:24:57Z")

</div>

Awesome, thanks! With regards to merging an SDK, I’m not sure if we would host it specifically on the rasa codebase, as that means that we would have to commit to maintaining it, and frankly we don’t have many node engineers. However, I’m sure an open source node SDK that people could download and use would still be very helpful and we could lead people who need that functionality to your plug-in.

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 7, 2019, 7:28pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/11 "2019-07-07T19:28:01Z")

</div>

> [@erohmensing](#):
>
> With regards to merging an SDK, I’m not sure if we would host it specifically on the rasa codebase, as that means that we would have to commit to maintaining it,

Sure. I wasn’t actually expecting that. I would start with a package on my GitHub; it should be possible to automate myself out of maintaining it as well, as long as you keep it up to date OpenAPI-spec-wise.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 7, 2019, 7:30pm UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/12 "2019-07-07T19:30:35Z")

</div>

That sounds like a great solution for both of us 👍

---

<div class="post-metadata">

**Author:** ![DonMartin76](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DonMartin76](https://forum.rasa.com/u/DonMartin76)\
**Post date:** [July 9, 2019, 7:31am UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/13 "2019-07-09T07:31:19Z")

</div>

Having some minor issues with the `oneOf` request parameter on one of the endpoints. Will have to tweak that to only use one notation I fear… But it should still be okay.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 9, 2019, 7:48am UTC](https://forum.rasa.com/t/rasa-http-sdk-for-node-js-available/12529/14 "2019-07-09T07:48:45Z")

</div>

No worries, just explain it on the PR and the person reviewing will check it out to make sure its alright!
