---
title: "Get Environment Discovery Configuration for a Project"
method: GET
path: "/environment-discovery/projects/{projectId}"
tags: ["Templates"]
---

# Get Environment Discovery Configuration for a Project

`GET /environment-discovery/projects/{projectId}`

## Path parameters

- `projectId` string, required

## Response `200`

- BlueprintApiGetEnvironmentDiscoveryResponse
  - `discoveryFileConfiguration` BlueprintApiDiscoveryFileConfiguration
    - `repositoryRegex` string, required
  - `globPattern` string
  - `environmentPlacement` 'topProject' | 'existingSubProject'
  - `rootPath` string
  - `workspaceNaming` 'default' | 'environmentName'
  - `autoDeployByCustomGlob` string, nullable
  - `createNewEnvironmentsFromPullRequests` boolean
  - `isTerragruntRunAll` boolean
  - `repository` string, required
  - `revision` string
  - `path` string
  - `fileName` string
  - `helmChartName` string
  - `terraformVersion` string
  - `opentofuVersion` string
  - `terragruntVersion` string
  - `terragruntTfBinary` 'terraform' | 'opentofu' | 'terraform' | 'opentofu' | 'terraform' | 'opentofu'
  - `pulumiVersion` string
  - `ansibleVersion` string
  - `type` union, required
    - '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'
    - 'workflow'
    - 'module'
    - 'approval-policy'
    - 'custom-flow'
    - 'environment-discovery'
    - 'discovery-config'
    - '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'
    - 'workflow'
    - 'module'
    - 'approval-policy'
    - 'custom-flow'
    - 'environment-discovery'
    - 'discovery-config'
    - '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'
    - 'workflow'
    - 'module'
    - 'approval-policy'
    - 'custom-flow'
    - 'environment-discovery'
    - 'discovery-config'
    - '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'
    - 'workflow'
    - 'module'
    - 'approval-policy'
    - 'custom-flow'
    - 'environment-discovery'
    - 'discovery-config'
  - `tokenName` string
  - `tokenId` string
  - `sshKeys` BlueprintApiSshKey[]
    - `id` string, required
    - `name` string, required
  - `githubInstallationId` number, nullable
  - `bitbucketClientKey` string, nullable
  - `isBitbucketServer` boolean
  - `isGitLabEnterprise` boolean
  - `isGitHubEnterprise` boolean
  - `isGitLab` boolean
  - `isAzureDevOps` boolean
  - `isHelmRepository` boolean
  - `vcsConnectionId` string, nullable
  - `id` string
  - `projectId` string
  - `organizationId` string, required
  - `author` User
    - `email` string
    - `user_id` string
    - `created_at` string
    - `updated_at` string
    - `app_metadata` AppMetadata
      - `organizations` UserOrganization[]
        - `id` string, required
        - `role` string
        - `name` string
      - `isApiKey` boolean
      - `isAutogeneratedTerraformDeployer` boolean
      - `apiKeyType` 'oidc'
      - `createdBy` string
      - `organizationId` string
      - `isSystemUser` boolean
      - `readOnly` boolean
    - `picture` string
    - `name` string
    - `last_login` string
    - `given_name` string
    - `family_name` string
    - `blocked` boolean
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `isDeleted` boolean
  - `authorId` string
  - `isSingleUse` boolean
  - `name` string, required
  - `description` string
  - `retry` BlueprintApiRetry
    - `onDestroy` union
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
    - `onDeploy` union
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
      - BlueprintApiRetryDeployOrDestroyConfig
        - `times` number, required
        - `errorRegex` string
  - `runTestsOnPullRequest` boolean
  - `projectIds` string[]
  - `tagPrefix` string

---

[API](https://skmtc.dev/envzero/apis/env0-api.md) · [All operations](https://skmtc.dev/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/envzero/env0-api/revisions/513441cbe9dc/schema)
