Infrastructures
This contains APIs related to Infrastructure Definitions
Page Index of the results to fetch.Default Value: 0
0Results per page
100Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Environment Identifier for the Entity.
The word to be searched and included in the list response
List of InfrastructureIds
The Identifier of deployment template if infrastructure is of type custom deployment
The version label of deployment template if infrastructure is of type custom deployment
Specifies the sorting criteria of the list. Elements in the list should be of the format "property,order" or "property". Order can take values ASC or DESC for alphabetical ascending and descending orders respectively. If the order is not specified, it takes ASC by default
list of service refs required to fetch infrastructures scoped to these service refs
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Returns the list of Infrastructure for an Environment
GET /gateway/ng/api/infrastructures?accountIdentifier=text&environmentIdentifier=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"
}
]
}Account Identifier for the Entity.
This is the InfrastructureRequest entity defined in Harness
identifier of the infrastructure
organisation identifier of the infrastructure
project identifier of the infrastructure
environment reference of the infrastructure
name of the infrastructure
description of the infrastructure
type of the infrastructure
yaml spec of the infrastructure. Just yaml alone is sufficient to create an infrastructure.
Enable Service Discovery for this infrastructure definition. Only supported for Kubernetes infrastructure types with static connectorRef and namespace.
ServiceAccount name for the Service Discovery agent creation Optional — null/empty means defalut service discovery path
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Returns the created Infrastructure
POST /gateway/ng/api/infrastructures?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 710
{
"name": "infrastructure",
"identifier": "infrastructureId",
"description": "infrastructure description",
"tags": {},
"orgIdentifier": "default",
"projectIdentifier": "projectIdentifier",
"environmentRef": "environmentId",
"deploymentType": "Kubernetes",
"type": "KubernetesDirect",
"yaml": "infrastructureDefinition:\n name: infrastructure\n identifier: infrastructure\n description: infrastructure description\n tags: {}\n orgIdentifier: default\n projectIdentifier: projectIdentifier\n environmentRef: environmentId\n deploymentType: Kubernetes\n type: KubernetesDirect\n spec:\n connectorRef: connectorId\n namespace: namespace\n releaseName: release-<+INFRA_KEY>\n allowSimultaneousDeployments: false\n"
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
This is the InfrastructureRequest entity defined in Harness
identifier of the infrastructure
organisation identifier of the infrastructure
project identifier of the infrastructure
environment reference of the infrastructure
name of the infrastructure
description of the infrastructure
type of the infrastructure
yaml spec of the infrastructure. Just yaml alone is sufficient to create an infrastructure.
Enable Service Discovery for this infrastructure definition. Only supported for Kubernetes infrastructure types with static connectorRef and namespace.
ServiceAccount name for the Service Discovery agent creation Optional — null/empty means defalut service discovery path
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Returns the updated Infrastructure
PUT /gateway/ng/api/infrastructures?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 710
{
"name": "infrastructure",
"identifier": "infrastructureId",
"description": "infrastructure description",
"tags": {},
"orgIdentifier": "default",
"projectIdentifier": "projectIdentifier",
"environmentRef": "environmentId",
"deploymentType": "Kubernetes",
"type": "KubernetesDirect",
"yaml": "infrastructureDefinition:\n name: infrastructure\n identifier: infrastructure\n description: infrastructure description\n tags: {}\n orgIdentifier: default\n projectIdentifier: projectIdentifier\n environmentRef: environmentId\n deploymentType: Kubernetes\n type: KubernetesDirect\n spec:\n connectorRef: connectorId\n namespace: namespace\n releaseName: release-<+INFRA_KEY>\n allowSimultaneousDeployments: false\n"
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Infrastructure Identifier for the entity
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
envId
Specify whether Infrastructure is deleted or not
falseBad Request
This is Failure entity as defied in Harness
Internal Server Error
The saved Infrastructure
GET /gateway/ng/api/infrastructures/{infraIdentifier}?accountIdentifier=text&environmentIdentifier=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"
}
]
}Infrastructure Identifier for the entity
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Environment Identifier for the Entity.
If true, the Entity will be forced delete, without checking any references/usages
falseBad Request
This is Failure entity as defied in Harness
Internal Server Error
Returns true if the Infrastructure is deleted
DELETE /gateway/ng/api/infrastructures/{infraIdentifier}?accountIdentifier=text&environmentIdentifier=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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Environment Identifier for the entity
Infrastructure Identifier for the entity
Identifier of Connector needed for CRUD operations on the respective Entity
Name of the repository.
Name of the branch.
File Path of the Entity.
isForceImport
falseIs Harness code repo enabled
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Import and Create Infrastructure from Git Repository and saves a record for it in Harness
POST /gateway/ng/api/infrastructures/import?accountIdentifier=text&environmentIdentifier=text&repoName=text&branch=text&filePath=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"
}
]
}Infrastructure Identifier for the entity
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
envId
Identifier of Connector needed for CRUD operations on the respective Entity
Name of the repository.
Name of the branch.
File Path of the Entity.
Commit Message to use for the merge commit.
Checks the new branch
falseName of the default branch.
Is Harness code repo enabled
falseTells weather the entity has to be moved from inline to remote or remote to inline
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Move infra YAML from inline to remote
POST /gateway/ng/api/infrastructures/move-config/{infraIdentifier}?accountIdentifier=text&environmentIdentifier=text&moveConfigType=INLINE_TO_REMOTE 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 git-metadata in remote infrastructure and returns the identifier of updated infrastructure
Infrastructure Identifier for the entity
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
envId
Identifier of Connector needed for CRUD operations on the respective Entity
Name of the repository.
File Path of the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal Server Error
Returns identifier of updated infrastructure
PUT /gateway/ng/api/infrastructures/{infraIdentifier}/update-git-metadata?accountIdentifier=text&environmentIdentifier=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"
}
]
}Last updated
Was this helpful?