447
Views
5
Comments
Solved
Where/How to configure environment variables
Question
Application Type
Reactive
Service Studio Version
11.54.18 (Build 62611)

Hi, 

I am new to OutSystems let me excuse my poor explanation in advance.

I would like to learn where and how to set environment variables for a certain OutSystems applications.


Currently I am working on creating the connection with Azure OpenAI Connector, and I prefer setting  the environment variables for its API keys so that those keys can be protected from being leaked in case. 

But the problem is that I cannot find where to configurate environment variables on OutSystems Service Center > Administoration tab > Environment Configuration.

Can anyone give me any advice? 

The application type is reactive web, and the version of service studio is 11.54.18. 


Plus, if anyone tells me if and how those API keys can be set with environment variables, I would be much appreciated. 

At this point after making quite of research, getting a little skeptical if it is even possible...

UserImage.jpg
vikas sharma
Champion
Solution

Hi,

Service center environment variables are something different. From environment variables you can configure some env. wise values only.

From API point of view, if you want to store some API keys, then you can store them in the Site properties.  Apart from that when you are consuming any API then you can change the base URL of the API from service center , may be different for each env. Also you can change the logging level for the api from service center.  For this you need to go in the module in which APIs are consumed then go on integration tab.

regards 

UserImage.jpg
Sushi-rolls

Hi Vikas, thank you for your reply.

In my understanding, there is no way to set variables that can be used in entire environment, and I was wondering if those variables could be used when setting the API base URL, but that is also not possible, so the base URL must be set with full path without using variables, is that correct?

I could set API base URL from service center as you mentioned, and I will try site property for handling the API keys.

Thank you again!

2023-10-18 19-55-47
Dawud M.
Solution

Hi @Sushi-rolls.

As @Vikas Sharma said, you can implement this by using Site Properties. This is a module-level configuration, meaning that you will need to configure it for every module that needs it.

Here you have a step-by-step tutorial on how to configure them.

I hope this helps!

UserImage.jpg
Sushi-rolls

Hi Dawud, 

Thank you for sharing the tutorial page link!

It helpled me having better understanding of site properties.

2023-10-18 19-55-47
Dawud M.

My pleasure. If you feel you got your question answered, please consider marking it as resolved.

UserImage.jpg
vikas sharma
Champion
Solution

Hi,

Service center environment variables are something different. From environment variables you can configure some env. wise values only.

From API point of view, if you want to store some API keys, then you can store them in the Site properties.  Apart from that when you are consuming any API then you can change the base URL of the API from service center , may be different for each env. Also you can change the logging level for the api from service center.  For this you need to go in the module in which APIs are consumed then go on integration tab.

regards 

UserImage.jpg
Sushi-rolls

Hi Vikas, thank you for your reply.

In my understanding, there is no way to set variables that can be used in entire environment, and I was wondering if those variables could be used when setting the API base URL, but that is also not possible, so the base URL must be set with full path without using variables, is that correct?

I could set API base URL from service center as you mentioned, and I will try site property for handling the API keys.

Thank you again!

2023-10-18 19-55-47
Dawud M.
Solution

Hi @Sushi-rolls.

As @Vikas Sharma said, you can implement this by using Site Properties. This is a module-level configuration, meaning that you will need to configure it for every module that needs it.

Here you have a step-by-step tutorial on how to configure them.

I hope this helps!

UserImage.jpg
Sushi-rolls

Hi Dawud, 

Thank you for sharing the tutorial page link!

It helpled me having better understanding of site properties.

2023-10-18 19-55-47
Dawud M.

My pleasure. If you feel you got your question answered, please consider marking it as resolved.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.