Reusable base domain in API Connector for endpoints

I have been working with the API connector for a while now and I just got to a situation where I simply needed to update my base URL well because bubble doesn’t currently have a way to store a base URL and reuse that for all in points via a variable or something like that I now have to change 30+ in points manually for what could’ve been one single source of truth. Not all apps depending on the nature of them require the use of the built-in data system of bubble. This particular app has its own external database with another application already running, but this app was essentially a companion app of that app therefore, the API was extremely important so basically the feature request is for a way to store the base domain for the API call that all in points can reference.

(post deleted by author)

send a screenshot of that @js10855

(your post is AI slop)

If only we could mark a solution as “Bullshit”…

However, this is a good idea @daniel54

You can flag it as such!

Oh! great! Didn’t know they added this option!

When you changed the base url for each call did you have to reinitialize each for them to work properly?

There is no base url, that I the point of my feature request. Yes if you change the endpoint currently you have to reinitialize. So this idea is centered around being able to simply change the base pointed to base_url for instance and the initialization would still follow. Because, in my example the actual endpoints are returning or push/patching the same payload.

From what I know, once initialized, this is suggested to reinitialize it if you make a change but not mandatory. The call will work even if you don’t do it.

I’ve put together a quick workaround to solve this using global expressions.

I used two APIs with different base URLs but the same endpoint (comments):

  1. https://jsonplaceholder.typicode.com/comments
  2. https://api.mydummyapi.com/comments/

By passing the base URL as a parameter via a global expression, I can switch the API Connector’s base URL just by updating that expression’s value. I have to inititalize only once.

Demo here: [link]

A native Bubble solution would be ideal, but this workaround solves the problem for now. Please let me what do you think @daniel54 @georgecollier

More effort than just defining it once in the API call really…

@daniel54 mention that he has 30+ points where he has to change so I think considering that it should be less effort. Moreover, one can forgot to update some by mistake so this can avoid that too.

yeah but it’s something you only update once… you don’t want to have to add an extra expression to every API call every time you use one…

This is not ideal, but this is a good idea. The OP idea stay relevant as it should be directly in API connector. But the workaround make sense.