# Rest API call self hosting error

**URL:** <https://community.weweb.io/t/rest-api-call-self-hosting-error/12077>\
**Category:** Ask us anything\
**Created:** [September 11, 2024, 1:49pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077 "2024-09-11T13:49:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![i42tech](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/i42tech/32/9812_2.png) [@i42tech](https://community.weweb.io/u/i42tech)\
**Post date:** [September 11, 2024, 1:49pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/1 "2024-09-11T13:49:18Z")

</div>

I have a project that is communicating with an homemade Rest API remotely.

When I develop inside Weweb, all my calls to this API are working correctly, the IP address is also fixed like this: [http://xx.67.xxx.xxx:8088/v1/codes/lexicontags/](http://xx.67.xxx.xxx:8088/v1/codes/lexicontags/)

Now, I want to host my site so I deployed my Weweb project, download the project files and start my own web site with the Weweb project inside.

Everything is working (visually) but all the calls to my API doesn’t work and not sure how but the URL I see trying to communicate is this (which I don’t know where it’s coming from):

_[http://localhost/ww/cms\_data\_sets/cff17b4c-9a97-446c-adcf-4a5bb79225d5/fetch?limit=NaN&offset=0](http://localhost/ww/cms_data_sets/cff17b4c-9a97-446c-adcf-4a5bb79225d5/fetch?limit=NaN&offset=0)_

How come I’m loosing connection to my hardcoded IP Rest API if I want to host my Weweb project myself??

---

<div class="post-metadata">

**Author:** ![i42tech](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/i42tech/32/9812_2.png) [@i42tech](https://community.weweb.io/u/i42tech)\
**Post date:** [September 12, 2024, 12:53pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/2 "2024-09-12T12:53:55Z")

</div>

Simple question is:

Can you use the REST API plugin if you self host your project? It doesn’t seem to work. If yes, what am I doing wrong?

Thank you

---

<div class="post-metadata">

**Author:** ![DanielL](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/daniell/32/13398_2.png) [@DanielL](https://community.weweb.io/u/DanielL)\
**Post date:** [September 12, 2024, 12:57pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/3 "2024-09-12T12:57:03Z")

</div>

Hi @i42tech,

Is the “proxy through server” option enabled in your plugin?

---

<div class="post-metadata">

**Author:** ![i42tech](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/i42tech/32/9812_2.png) [@i42tech](https://community.weweb.io/u/i42tech)\
**Post date:** [September 12, 2024, 1:02pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/4 "2024-09-12T13:02:57Z")

</div>

Yes it is. To make sure it was not my backend, I created a mock Rest API at [mockapi.io](http://mockapi.io) and within Weweb, no issue, it’s loading the data inside a grid but as soon as I self host the project, the connection to this rest API doesn’t work anymore like if the Rest API plugin doesn’t work in a self-hosting scenario…which is crucial for me.

---

<div class="post-metadata">

**Author:** ![DanielL](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/daniell/32/13398_2.png) [@DanielL](https://community.weweb.io/u/DanielL)\
**Post date:** [September 12, 2024, 2:31pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/5 "2024-09-12T14:31:02Z")

</div>

Can you please ensure this option is not enabled and try again? The REST API plugin requires communication with WeWeb microservices if the ‘‘proxy through server’’ option is enabled.

---

<div class="post-metadata">

**Author:** ![i42tech](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/i42tech/32/9812_2.png) [@i42tech](https://community.weweb.io/u/i42tech)\
**Post date:** [September 16, 2024, 2:56pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/6 "2024-09-16T14:56:13Z")

</div>

Yes I can confirm that it’s working when the CORS proxy is off.

Note to Dev… those dependencies to some microservices should be documented if possible.

Thank you

---

<div class="post-metadata">

**Author:** ![i42tech](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/i42tech/32/9812_2.png) [@i42tech](https://community.weweb.io/u/i42tech)\
**Post date:** [September 19, 2024, 6:08pm UTC](https://community.weweb.io/t/rest-api-call-self-hosting-error/12077/7 "2024-09-19T18:08:09Z")

</div>

Another question because I would like to make it work. My RESTAPI right now is not HTTPS but HTTP. Is it possible that Weweb requires the RESTAPI to be HTTPS if you don’t bypass CORS?
