Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Environment Group

This contains APIs related to EnvironmentGroup.

Create an Environment Group

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

Body

This is the EnvironmentGroupRequest entity defined in Harness

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

identifierstringOptional

Identifier of the Environment Group.

Pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
colorstringOptional

Color of the Environment Group.

yamlstringRequired

Yaml of the Environment Group.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/environmentGroup
POST /gateway/ng/api/environmentGroup?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 378

{
  "name": "environmentGroup",
  "identifier": "environmentGroupId",
  "orgIdentifier": "default",
  "projectIdentifier": "projectIdentifier",
  "yaml": "environmentGroup:\n  name: environmentGroup\n  identifier: environmentGroupId\n  description: \"\"\n  tags: {}\n  orgIdentifier: default\n  projectIdentifier: projectIdentifier\n  envIdentifiers:\n    - EnvironmentId1\n    - EnvironmentId2\n"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets an Environment Group by identifier

get
Path parameters
envGroupIdentifierstringRequired

Environment Group Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

deletedbooleanOptional

Specify whether environment group is deleted or not

Default: false
branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/environmentGroup/{envGroupIdentifier}
GET /gateway/ng/api/environmentGroup/{envGroupIdentifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update an Environment Group by Identifier

put
Path parameters
envGroupIdentifierstringRequired

Environment Group Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

rootFolderstringOptional

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePathstringOptional

File Path of the Entity.

commitMsgstringOptional

Commit Message to use for the merge commit.

lastObjectIdstringOptional

Its required field during update call request. It can be fetched from the response of GET API call for the entity

resolvedConflictCommitIdstringOptional

If the entity is git-synced, this parameter represents the commit id against which file conflicts are resolved

baseBranchstringOptional

Name of the default branch.

connectorRefstringOptional

Identifier of Connector needed for CRUD operations on the respective Entity

lastCommitIdstringOptional

last commit id of the file

isNewBranchbooleanOptional

Checks the new branch

Default: false
isHarnessCodeRepobooleanOptional

Is Harness code repo enabled

Header parameters
If-MatchstringOptional
Body

This is the EnvironmentGroupRequest entity defined in Harness

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

identifierstringOptional

Identifier of the Environment Group.

Pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
colorstringOptional

Color of the Environment Group.

yamlstringRequired

Yaml of the Environment Group.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/environmentGroup/{envGroupIdentifier}
PUT /gateway/ng/api/environmentGroup/{envGroupIdentifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 378

{
  "name": "environmentGroup",
  "identifier": "environmentGroupId",
  "orgIdentifier": "default",
  "projectIdentifier": "projectIdentifier",
  "yaml": "environmentGroup:\n  name: environmentGroup\n  identifier: environmentGroupId\n  description: \"\"\n  tags: {}\n  orgIdentifier: default\n  projectIdentifier: projectIdentifier\n  envIdentifiers:\n    - EnvironmentId1\n    - EnvironmentId2\n"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Delete en Environment Group by Identifier

delete
Path parameters
envGroupIdentifierstringRequired

Environment Group Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

rootFolderstringOptional

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePathstringOptional

File Path of the Entity.

commitMsgstringOptional

Commit Message to use for the merge commit.

lastObjectIdstringOptional

Last Object Id

forceDeletebooleanOptional

If true, the Entity will be forced delete, without checking any references/usages

Default: false
Header parameters
If-MatchstringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
delete/environmentGroup/{envGroupIdentifier}
DELETE /gateway/ng/api/environmentGroup/{envGroupIdentifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets Environment Group list

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

envGroupIdentifiersstring[]Optional
searchTermstringOptional

The word to be searched and included in the list response

pageinteger · int32Optional

Page Index of the results to fetch.Default Value: 0

Default: 0
sizeinteger · int32Optional

Results per page

Default: 25
sortstring[]Optional

Sort criteria for the elements.

filterIdentifierstringOptional

Filter identifier

branchstringOptional

Name of the branch.

repoIdentifierstringOptional

Git Sync Config Id. [Applicable for Old Git Sync only]

getDefaultFromOtherRepobooleanOptional

if true, return all the default entities

includeAllEnvGroupsAccessibleAtScopebooleanOptional

Specify true if all accessible environment groups are to be included

Default: false
Body

Properties of the Filter entity defined in Harness.

filterTypestring · enumRequired

This specifies the corresponding Entity of the filter.

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/environmentGroup/list
POST /gateway/ng/api/environmentGroup/list?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "filterType": "Connector"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?