List Variables by Scope
Lists all variables for the provided scope(s). If more than one scope is given - variables will be overridden by lower level scopes - just like env zero does. For example - Provided both organizationId and projectId, if a variable exists on both scopes, a single instance of it will be returned, with its Project scope value
Authorization
env0_API_Key env zero 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 env zero 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
env zero 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.
In: header
Query Parameters
Used for querying variables defined on organization level
Used for querying variables defined on project level
Used for querying variables defined on blueprint level
Used for querying variables defined on environment level
Used for querying variables defined for a specific deployment
Used for querying variables defined on workflow environment level
Used for querying variables defined on workflow blueprint level
Used for querying sub environment blueprint variables, constructed as {workflowBlueprintId}:{subAlias}
Used for querying variables defined in a configuration set
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/configuration?organizationId=string"[ { "overwrites": { "scope": "SET", "scopeId": "string", "value": "string", "schema": { "type": "string", "enum": [ "string" ], "format": "HCL" }, "isReadonly": true, "isRequired": true, "isSensitive": true, "regex": "string" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "value": "string", "id": "string", "userId": "string", "isSensitive": true, "isReadonly": true, "isRequired": true, "regex": "string", "scopeId": "string", "scope": "SET", "type": 0, "toDelete": true, "projectId": "string", "organizationId": "string", "schema": { "type": "string", "enum": [ "string" ], "format": "HCL" }, "description": "string", "isOutput": true }]Create a configuration set POST
Creates a configuration set - a reusable, named group of variables that can be assigned to templates, projects or environments. `name`, `scope` and `scopeId` are required. Returns the created set.
Create or update variable POST
Creates or updates configuration variables. Variables are resolved through env zero's scope hierarchy, so a variable set at a lower scope overrides the same variable set higher up. Returns the resulting variables.