API Url : Dev environnement Url and production Url

Hi,

I’m using API’s developped by myself. So when i’m in dev process i call my APi with this kind of url’s
image
But when i’m have to deploy my wappler site and of course my APi’s i have to go througth all my Api call’s and change the url as this:
image

Is there a way to have dynamic Url’s based on dev or prod deployement ?

Thank’s

if you want to use dynamic endpoint for your API request . you can create table like “apiEndPoints” then you can call your endpoints into your API actions

1 Like

If you are calling api’s on the same server which is executing the server action, you can use this;

https://{{$_SERVER['HTTP_HOST']}}/api/cost_level_up
1 Like

How so clever @mebeingken ! Thx a lot guys for your suggestions !

1 Like