# Writing API in Adapters

**URL:** <https://discourse.mozilla.org/t/writing-api-in-adapters/44470>\
**Category:** WebThings\
**Created:** [August 30, 2019, 12:54pm UTC](https://discourse.mozilla.org/t/writing-api-in-adapters/44470 "2019-08-30T12:54:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijit.nathwani](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@abhijit.nathwani](https://discourse.mozilla.org/u/abhijit.nathwani)\
**Post date:** [August 30, 2019, 12:54pm UTC](https://discourse.mozilla.org/t/writing-api-in-adapters/44470/1 "2019-08-30T12:54:29Z")

</div>

Hi,

is it possible to write APIs in adapters so that we can manage few functionalities? Is it possible to access them via the gateway URL like `gateway.mozilla-iot.org/addons/custom_adapter/someAPI` ?

I was curious about this feature. It would open up lots of possibilities.  
Thanks,  
Abhijit

---

<div class="post-metadata">

**Author:** ![mstegeman](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mstegeman](https://discourse.mozilla.org/u/mstegeman)\
**Post date:** [August 30, 2019, 7:25pm UTC](https://discourse.mozilla.org/t/writing-api-in-adapters/44470/2 "2019-08-30T19:25:11Z")

</div>

Currently, no. This is a feature a lot of people have requested, so we’re taking a look. The tricky part is proxying HTTP connections across an IPC bridge to an add-on.
