Forum Discussion

LennSar's avatar
LennSar
Contributor
4 years ago
Solved

Implement several different endpoints in a single environment

Hi there,

 

our API mostly uses one endpoint address which basically is: http://ip/some/path. Now I have a single command in a test case that needs to acces the root address: http://ip/ . 

I set up an environment variable with the first address but when I use it, it blocks the access of the endpoint address for all commands so that I can't change it anymore. How can I achieve the above? The only way I can think of is to change the endpoint address in the open Api spec for ALL requests so that the some/path part of the endoint address is part of each request, which is the last thing we'd like to do.

 

Hope you guys can point me to a different solution!

 

Thanks,

 

Lennart 

  • LennSar's avatar
    LennSar
    4 years ago

    Hi KarelHusa,

     

    I just had another idea which I think better suits what I want. I stopped using environment variables and simply replaced in the .xml file every occasion of the endpoint address to be what I have 99% of the time, which is http://IP/some/path. So now I only have to edit the 1% which is under http:/IP/ which is absolutely ok as there are only a handfull of requests that need this. 

    However, thank you very much for taking the time to think about it! Much appreciate it!