How to add Environment Variables to PROJECT scope?

I am looking to add Environment Variables to “PROJECT” scope. Examples shown below is to add to “ENVIRONMENT” scope.

## Environment variable
The examples from below are for the ENVIRONMENT scope, but you can also attach variables to PROJECT and APPLICATION .


You can use the V2 API until that feature comes in the console.

@Aggis15 Thanks for replying.
These V2 API documentation does not show full commands to use. I never used CLI on Qovery. Can you give me an example command to use to add Environment Variable under PROJECT scope? The example commands I linked shows how to add variables in ENVIRONMENT scope. I can’t figure out how to change the scope.

You’re confusing a few things here. CLI means Command Line Interface. That was used for the V1 to do certain actions with your environment. The V2 shipped with a brand new API that is used to handle your environment. The CLI is not used by the V2 anymore, nor is it scheduled to be. It may be deprecated with the V1 once V2 is out of Beta. You will need a token to authenticate yourself which you can do so by reading the instructions here. After, you can look at the docs and complete certain actions like, as you want, add environment variables.

Here is how you can add variables to your project.
Here is how you can add variables to your application.
Here is how you can add variables to your environment.

Please let me know if you need any further help. Thanks.


Got it working using the command below:

curl -X POST '<your_project_id>/environmentVariable' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_token>' \
--data-raw '{
    "key": "idLoremexeu",
    "value": "enim sunt aliqua magna"
1 Like