curl --request PUT \
--url https://api.env0.com/environment-discovery/projects/{projectId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": true,
"isGitLabEnterprise": true,
"isGitHubEnterprise": true,
"isGitLab": true,
"isAzureDevOps": true,
"isHelmRepository": true,
"vcsConnectionId": "<string>",
"repository": "<string>",
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"globPattern": "<string>",
"rootPath": "<string>",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": true,
"isTerragruntRunAll": true
}
'import requests
url = "https://api.env0.com/environment-discovery/projects/{projectId}"
payload = {
"id": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": True,
"isGitLabEnterprise": True,
"isGitHubEnterprise": True,
"isGitLab": True,
"isAzureDevOps": True,
"isHelmRepository": True,
"vcsConnectionId": "<string>",
"repository": "<string>",
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"globPattern": "<string>",
"rootPath": "<string>",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": True,
"isTerragruntRunAll": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
projectId: '<string>',
organizationId: '<string>',
tokenName: '<string>',
tokenId: '<string>',
sshKeys: [{id: '<string>', name: '<string>'}],
githubInstallationId: 123,
bitbucketClientKey: '<string>',
isBitbucketServer: true,
isGitLabEnterprise: true,
isGitHubEnterprise: true,
isGitLab: true,
isAzureDevOps: true,
isHelmRepository: true,
vcsConnectionId: '<string>',
repository: '<string>',
revision: '<string>',
path: '<string>',
fileName: '<string>',
helmChartName: '<string>',
terraformVersion: '<string>',
opentofuVersion: '<string>',
terragruntVersion: '<string>',
pulumiVersion: '<string>',
ansibleVersion: '<string>',
globPattern: '<string>',
rootPath: '<string>',
autoDeployByCustomGlob: '<string>',
createNewEnvironmentsFromPullRequests: true,
isTerragruntRunAll: true
})
};
fetch('https://api.env0.com/environment-discovery/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.env0.com/environment-discovery/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'projectId' => '<string>',
'organizationId' => '<string>',
'tokenName' => '<string>',
'tokenId' => '<string>',
'sshKeys' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'githubInstallationId' => 123,
'bitbucketClientKey' => '<string>',
'isBitbucketServer' => true,
'isGitLabEnterprise' => true,
'isGitHubEnterprise' => true,
'isGitLab' => true,
'isAzureDevOps' => true,
'isHelmRepository' => true,
'vcsConnectionId' => '<string>',
'repository' => '<string>',
'revision' => '<string>',
'path' => '<string>',
'fileName' => '<string>',
'helmChartName' => '<string>',
'terraformVersion' => '<string>',
'opentofuVersion' => '<string>',
'terragruntVersion' => '<string>',
'pulumiVersion' => '<string>',
'ansibleVersion' => '<string>',
'globPattern' => '<string>',
'rootPath' => '<string>',
'autoDeployByCustomGlob' => '<string>',
'createNewEnvironmentsFromPullRequests' => true,
'isTerragruntRunAll' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.env0.com/environment-discovery/projects/{projectId}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.env0.com/environment-discovery/projects/{projectId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.env0.com/environment-discovery/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}"
response = http.request(request)
puts response.read_body{
"repository": "<string>",
"type": "opentofu",
"organizationId": "<string>",
"name": "<string>",
"discoveryFileConfiguration": {
"repositoryRegex": "<string>"
},
"globPattern": "<string>",
"environmentPlacement": "topProject",
"rootPath": "<string>",
"workspaceNaming": "default",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": true,
"isTerragruntRunAll": true,
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"terragruntTfBinary": "terraform",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": true,
"isGitLabEnterprise": true,
"isGitHubEnterprise": true,
"isGitLab": true,
"isAzureDevOps": true,
"isHelmRepository": true,
"vcsConnectionId": "<string>",
"id": "<string>",
"projectId": "<string>",
"author": {
"email": "<string>",
"user_id": "<string>",
"username": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"app_metadata": {
"organizations": [
{
"id": "<string>",
"role": "<string>",
"name": "<string>"
}
],
"isApiKey": true,
"isAutogeneratedTerraformDeployer": true,
"apiKeyType": "oidc",
"createdBy": "<string>",
"organizationId": "<string>",
"isSystemUser": true,
"readOnly": true,
"blockedByOrganizationLockout": true
},
"picture": "<string>",
"name": "<string>",
"last_login": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"blocked": true,
"identities": [
{
"provider": "<string>",
"connection": "<string>",
"user_id": "<string>",
"isSocial": true,
"access_token": "<string>",
"refresh_token": "<string>"
}
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true,
"authorId": "<string>",
"isSingleUse": true,
"description": "<string>",
"retry": {
"onDestroy": {
"times": 123,
"errorRegex": "<string>"
},
"onDeploy": {
"times": 123,
"errorRegex": "<string>"
}
},
"runTestsOnPullRequest": true,
"projectIds": [
"<string>"
],
"isAllProjects": true,
"tagPrefix": "<string>"
}Enable/Update Environment Discovery Configuration
curl --request PUT \
--url https://api.env0.com/environment-discovery/projects/{projectId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": true,
"isGitLabEnterprise": true,
"isGitHubEnterprise": true,
"isGitLab": true,
"isAzureDevOps": true,
"isHelmRepository": true,
"vcsConnectionId": "<string>",
"repository": "<string>",
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"globPattern": "<string>",
"rootPath": "<string>",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": true,
"isTerragruntRunAll": true
}
'import requests
url = "https://api.env0.com/environment-discovery/projects/{projectId}"
payload = {
"id": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": True,
"isGitLabEnterprise": True,
"isGitHubEnterprise": True,
"isGitLab": True,
"isAzureDevOps": True,
"isHelmRepository": True,
"vcsConnectionId": "<string>",
"repository": "<string>",
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"globPattern": "<string>",
"rootPath": "<string>",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": True,
"isTerragruntRunAll": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
projectId: '<string>',
organizationId: '<string>',
tokenName: '<string>',
tokenId: '<string>',
sshKeys: [{id: '<string>', name: '<string>'}],
githubInstallationId: 123,
bitbucketClientKey: '<string>',
isBitbucketServer: true,
isGitLabEnterprise: true,
isGitHubEnterprise: true,
isGitLab: true,
isAzureDevOps: true,
isHelmRepository: true,
vcsConnectionId: '<string>',
repository: '<string>',
revision: '<string>',
path: '<string>',
fileName: '<string>',
helmChartName: '<string>',
terraformVersion: '<string>',
opentofuVersion: '<string>',
terragruntVersion: '<string>',
pulumiVersion: '<string>',
ansibleVersion: '<string>',
globPattern: '<string>',
rootPath: '<string>',
autoDeployByCustomGlob: '<string>',
createNewEnvironmentsFromPullRequests: true,
isTerragruntRunAll: true
})
};
fetch('https://api.env0.com/environment-discovery/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.env0.com/environment-discovery/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'projectId' => '<string>',
'organizationId' => '<string>',
'tokenName' => '<string>',
'tokenId' => '<string>',
'sshKeys' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'githubInstallationId' => 123,
'bitbucketClientKey' => '<string>',
'isBitbucketServer' => true,
'isGitLabEnterprise' => true,
'isGitHubEnterprise' => true,
'isGitLab' => true,
'isAzureDevOps' => true,
'isHelmRepository' => true,
'vcsConnectionId' => '<string>',
'repository' => '<string>',
'revision' => '<string>',
'path' => '<string>',
'fileName' => '<string>',
'helmChartName' => '<string>',
'terraformVersion' => '<string>',
'opentofuVersion' => '<string>',
'terragruntVersion' => '<string>',
'pulumiVersion' => '<string>',
'ansibleVersion' => '<string>',
'globPattern' => '<string>',
'rootPath' => '<string>',
'autoDeployByCustomGlob' => '<string>',
'createNewEnvironmentsFromPullRequests' => true,
'isTerragruntRunAll' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.env0.com/environment-discovery/projects/{projectId}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.env0.com/environment-discovery/projects/{projectId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.env0.com/environment-discovery/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"projectId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"tokenName\": \"<string>\",\n \"tokenId\": \"<string>\",\n \"sshKeys\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"githubInstallationId\": 123,\n \"bitbucketClientKey\": \"<string>\",\n \"isBitbucketServer\": true,\n \"isGitLabEnterprise\": true,\n \"isGitHubEnterprise\": true,\n \"isGitLab\": true,\n \"isAzureDevOps\": true,\n \"isHelmRepository\": true,\n \"vcsConnectionId\": \"<string>\",\n \"repository\": \"<string>\",\n \"revision\": \"<string>\",\n \"path\": \"<string>\",\n \"fileName\": \"<string>\",\n \"helmChartName\": \"<string>\",\n \"terraformVersion\": \"<string>\",\n \"opentofuVersion\": \"<string>\",\n \"terragruntVersion\": \"<string>\",\n \"pulumiVersion\": \"<string>\",\n \"ansibleVersion\": \"<string>\",\n \"globPattern\": \"<string>\",\n \"rootPath\": \"<string>\",\n \"autoDeployByCustomGlob\": \"<string>\",\n \"createNewEnvironmentsFromPullRequests\": true,\n \"isTerragruntRunAll\": true\n}"
response = http.request(request)
puts response.read_body{
"repository": "<string>",
"type": "opentofu",
"organizationId": "<string>",
"name": "<string>",
"discoveryFileConfiguration": {
"repositoryRegex": "<string>"
},
"globPattern": "<string>",
"environmentPlacement": "topProject",
"rootPath": "<string>",
"workspaceNaming": "default",
"autoDeployByCustomGlob": "<string>",
"createNewEnvironmentsFromPullRequests": true,
"isTerragruntRunAll": true,
"revision": "<string>",
"path": "<string>",
"fileName": "<string>",
"helmChartName": "<string>",
"terraformVersion": "<string>",
"opentofuVersion": "<string>",
"terragruntVersion": "<string>",
"terragruntTfBinary": "terraform",
"pulumiVersion": "<string>",
"ansibleVersion": "<string>",
"tokenName": "<string>",
"tokenId": "<string>",
"sshKeys": [
{
"id": "<string>",
"name": "<string>"
}
],
"githubInstallationId": 123,
"bitbucketClientKey": "<string>",
"isBitbucketServer": true,
"isGitLabEnterprise": true,
"isGitHubEnterprise": true,
"isGitLab": true,
"isAzureDevOps": true,
"isHelmRepository": true,
"vcsConnectionId": "<string>",
"id": "<string>",
"projectId": "<string>",
"author": {
"email": "<string>",
"user_id": "<string>",
"username": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"app_metadata": {
"organizations": [
{
"id": "<string>",
"role": "<string>",
"name": "<string>"
}
],
"isApiKey": true,
"isAutogeneratedTerraformDeployer": true,
"apiKeyType": "oidc",
"createdBy": "<string>",
"organizationId": "<string>",
"isSystemUser": true,
"readOnly": true,
"blockedByOrganizationLockout": true
},
"picture": "<string>",
"name": "<string>",
"last_login": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"blocked": true,
"identities": [
{
"provider": "<string>",
"connection": "<string>",
"user_id": "<string>",
"isSocial": true,
"access_token": "<string>",
"refresh_token": "<string>"
}
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true,
"authorId": "<string>",
"isSingleUse": true,
"description": "<string>",
"retry": {
"onDestroy": {
"times": 123,
"errorRegex": "<string>"
},
"onDeploy": {
"times": 123,
"errorRegex": "<string>"
}
},
"runTestsOnPullRequest": true,
"projectIds": [
"<string>"
],
"isAllProjects": true,
"tagPrefix": "<string>"
}Authorizations
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.
Body
opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible Response
opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible Was this page helpful?