Authorizations
env0 API authentication is done via API keys. An API Key can either be created by an organization administrator, in which case it will not be connected to any specific user, or via Personal API Keys to authenticate as a user.
Creating an API Key with a Specific Role
-
Once you've created your organization, you can set up and manage API Keys.
-
Navigate to the Organization Settings page and click the API Keys tab.
-
Click Add API Key and enter a name for your key in the Name field. This name is for reference purposes only and isn't used directly in authentication.
โ๏ธSave Your API Key ID and secret The secret will not be available after you close this window.
Creating a Personal API Key
-
Click on your avatar (located on the top right of the screen)
-
Click on Personal Settings
-
Select the API Keys tab
-
Click Add API Key, and enter a name for your key in the Name field. This name is for reference purposes and isn't used directly in authentication.
โ๏ธSave your API Key ID & secret The secret will not be available after you close this window.
Using an API Key to Authenticate
Authentication of the env0 API is done using the Basic Authentication method. Each request made should include the API Key ID as the username, and the API Key secret as the password. For example, when using curl, we can include these parameters via flag --user {API Key ID}:{API Key Secret}
.
API Key Permissions
When creating an API key through the organization settings, you will need to choose if youโd like to grant it Organization Admin or User permissions. In case of the latter, you can assign fine-grained permissions per project. Personal API Keys can be created through the userโs profile page and will have the same permissions as the user has.
Rate Limits
env0 API allows up to 1K requests per 60 seconds, requests are aggregated by IP, HTTP Method and URI. If you exceed this limit, you will receive a 429
status code.
Body
SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
Whether it is an Environment or Terraform variable 0 value maps to an Environment variable 1 value maps to an Terraform variable
0
, 1
, 0
, 1
, 0
, 1
, 0
, 1
, 0
, 1
The ID of the configuration property. If provided, will act as an update. Otherwise, a new configuration property will be created.
The ID of the entity of the provided scope
. e.g. a project's ID when the provided scope
is PROJECT
.
Inapplicable for GLOBAL
scope, as it has no specific entity.
- type?: "string"
- format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
- ENVIRONMENT_OUTPUT is a special type used to indicate that the value is an output from the environment. The value format is: ${env0:<environmentId>:<outputName>} it will be resolved before deployment.
- enum?: ["option1", "option2"]
- Optional, for UI dropdown, works only without format. Note that if you want to update this list, you must provide the full updated list each time.
Response
The ID of the configuration property. If provided, will act as an update. Otherwise, a new configuration property will be created.
The ID of the entity of the provided scope
. e.g. a project's ID when the provided scope
is PROJECT
.
Inapplicable for GLOBAL
scope, as it has no specific entity.
SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
, SET
, GLOBAL
, BLUEPRINT
, SUB_ENVIRONMENT_BLUEPRINT
, PROJECT
, WORKFLOW
, ENVIRONMENT
, DEPLOYMENT
Whether it is an Environment or Terraform variable 0 value maps to an Environment variable 1 value maps to an Terraform variable
0
, 1
, 0
, 1
, 0
, 1
, 0
, 1
, 0
, 1
- type?: "string"
- format: HCL | JSON | ENVIRONMENT_OUTPUT # default: null
- ENVIRONMENT_OUTPUT is a special type used to indicate that the value is an output from the environment. The value format is: ${env0:<environmentId>:<outputName>} it will be resolved before deployment.
- enum?: ["option1", "option2"]
- Optional, for UI dropdown, works only without format. Note that if you want to update this list, you must provide the full updated list each time.