EnvironmentGroup

This contains APIs related to EnvironmentGroup.

Create an Environment Group

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Request Body schema:
required

Details of the Environment Group to be created

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string^[a-zA-Z_][0-9a-zA-Z_]{0,127}$

Identifier of the Environment Group.

color
string

Color of the Environment Group.

yaml
required
string

Yaml of the Environment Group.

Responses
400

Bad Request

500

Internal Server Error

default

If the YAML is valid, returns created Environment Group. If not, it sends what is wrong with the YAML

post/ng/api/environmentGroup
Request samples

Sample Environment Group payload

{
  • "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"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets an Environment Group by identifier

Securityx-api-key
Request
path Parameters
envGroupIdentifier
required
string

Environment Group Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

deleted
boolean
Default: false

Specify whether environment group is deleted or not

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal Server Error

default

The saved Environment Group

get/ng/api/environmentGroup/{envGroupIdentifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update an Environment Group by Identifier

Securityx-api-key
Request
path Parameters
envGroupIdentifier
required
string

Environment Group Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

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

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

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

resolvedConflictCommitId
string

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

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

lastCommitId
string

last commit id of the file

isNewBranch
boolean
Default: false

Checks the new branch

isHarnessCodeRepo
boolean

Is Harness code repo enabled

header Parameters
If-Match
string
Request Body schema:
required

Details of the Environment Group to be updated

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string^[a-zA-Z_][0-9a-zA-Z_]{0,127}$

Identifier of the Environment Group.

color
string

Color of the Environment Group.

yaml
required
string

Yaml of the Environment Group.

Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Environment Group

put/ng/api/environmentGroup/{envGroupIdentifier}
Request samples

Sample Environment Group payload

{
  • "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"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete en Environment Group by Identifier

Securityx-api-key
Request
path Parameters
envGroupIdentifier
required
string

Environment Group Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

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

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

forceDelete
boolean
Default: false

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

header Parameters
If-Match
string
Responses
400

Bad Request

500

Internal Server Error

default

Returns true if the Environment Group is deleted

delete/ng/api/environmentGroup/{envGroupIdentifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets Environment Group list

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

envGroupIdentifiers
Array of strings
searchTerm
string

The word to be searched and included in the list response

page
integer <int32>
Default: 0

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

size
integer <int32>
Default: 25

Results per page

sort
Array of strings

Sort criteria for the elements.

filterIdentifier
string

Filter identifier

branch
string

Name of the branch.

repoIdentifier
string

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

getDefaultFromOtherRepo
boolean

if true, return all the default entities

includeAllEnvGroupsAccessibleAtScope
boolean
Default: false

Specify true if all accessible environment groups are to be included

Request Body schema:

This is the body for the filter properties for listing Environment Groups

Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Environment Groups

post/ng/api/environmentGroup/list
Request samples
No sample
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}