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

Service Overrides

This contains APIs related to Service Overrides V2

Create an ServiceOverride Entity

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

This is the Service Override Request entity defined in Harness

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

environmentRefstringRequired

Environment Reference for the Entity.

serviceRefstringOptional

Service Reference for Entity

infraIdentifierstringOptional

infraIdentifier

clusterIdentifierstringOptional

clusterIdentifier

typestring · enumRequired

Type of the override which is based on source of overrides

Possible values:
yamlstringOptional
identifierstringOptional

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "orgIdentifier": "defaultOrgId",
  "projectIdentifier": "defaultProjId",
  "environmentRef": "defaultEnvRef",
  "serviceRef": "defaultServiceRef",
  "infraIdentifier": "defaultInfraId",
  "type": "ENV_SERVICE_OVERRIDE",
  "spec": {
    "variables": [
      {
        "name": "v1",
        "type": "String",
        "value": "val1"
      }
    ],
    "manifests": [
      {
        "manifest": {
          "identifier": "manifest1",
          "type": "K8sManifest",
          "spec": {
            "store": {
              "type": "Github",
              "spec": {
                "connectorRef": "abcdConnector",
                "gitFetchType": "Branch",
                "paths": [
                  "files1"
                ],
                "repoName": "abcd",
                "branch": "master"
              }
            },
            "skipResourceVersioning": false
          }
        }
      }
    ],
    "configFiles": [
      {
        "configFile": {
          "identifier": "configFile1",
          "spec": {
            "store": {
              "type": "Harness",
              "spec": {
                "files": [
                  "/abcd"
                ]
              }
            }
          }
        }
      }
    ]
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update an ServiceOverride Entity

put
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

This is the Service Override Request entity defined in Harness

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

environmentRefstringRequired

Environment Reference for the Entity.

serviceRefstringOptional

Service Reference for Entity

infraIdentifierstringOptional

infraIdentifier

clusterIdentifierstringOptional

clusterIdentifier

typestring · enumRequired

Type of the override which is based on source of overrides

Possible values:
yamlstringOptional
identifierstringOptional

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "orgIdentifier": "defaultOrgId",
  "projectIdentifier": "defaultProjId",
  "environmentRef": "defaultEnvRef",
  "serviceRef": "defaultServiceRef",
  "infraIdentifier": "defaultInfraId",
  "type": "ENV_SERVICE_OVERRIDE",
  "spec": {
    "variables": [
      {
        "name": "v1",
        "type": "String",
        "value": "val1"
      }
    ],
    "manifests": [
      {
        "manifest": {
          "identifier": "manifest1",
          "type": "K8sManifest",
          "spec": {
            "store": {
              "type": "Github",
              "spec": {
                "connectorRef": "abcdConnector",
                "gitFetchType": "Branch",
                "paths": [
                  "files1"
                ],
                "repoName": "abcd",
                "branch": "master"
              }
            },
            "skipResourceVersioning": false
          }
        }
      }
    ],
    "configFiles": [
      {
        "configFile": {
          "identifier": "configFile1",
          "spec": {
            "store": {
              "type": "Harness",
              "spec": {
                "files": [
                  "/abcd"
                ]
              }
            }
          }
        }
      }
    ]
  }
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets Service Overrides by Identifier

get

Retrieves a Service Override by its identifier. The identifier can be user-provided during creation, or if not provided, it is auto-generated based on the override type: ENV_GLOBAL_OVERRIDE = environmentRef, ENV_SERVICE_OVERRIDE = environmentRef_serviceRef, INFRA_GLOBAL_OVERRIDE = environmentRef_infraIdentifier, INFRA_SERVICE_OVERRIDE = environmentRef_serviceRef_infraIdentifier. Dots in refs are replaced with underscores.

Path parameters
identifierstringRequired

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/serviceOverrides/{identifier}
GET /gateway/ng/api/serviceOverrides/{identifier}?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"
    }
  ]
}

Delete a ServiceOverride entity

delete
Path parameters
identifierstringRequired

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
delete/serviceOverrides/{identifier}
DELETE /gateway/ng/api/serviceOverrides/{identifier}?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"
    }
  ]
}

Move ServiceOverride YAML from inline to remote or remote to inline

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

connectorRefstringOptional

Identifier of Connector needed for CRUD operations on the respective Entity

repoNamestringOptional

Name of the repository.

branchstringOptional

Name of the branch.

filePathstringOptional

File Path of the Entity.

commitMsgstringOptional

File Path of the Entity.

isNewBranchbooleanOptional

Checks the new branch

Default: false
baseBranchstringOptional

Name of the default branch.

isHarnessCodeRepobooleanOptional

Is Harness code repo enabled

Default: false
moveConfigTypestring · enumOptional

Tells weather the entity has to be moved from inline to remote or remote to inline

Possible values:
environmentRefstringOptional

Environment Reference for the Entity.

serviceRefstringOptional

Service Reference for Entity

infraIdentifierstringOptional

infraIdentifier

serviceOverridesTypestring · enumOptional

Type of the override which is based on source of overrides

Possible values:
identifierstringOptional

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/serviceOverrides/move-config
POST /gateway/ng/api/serviceOverrides/move-config?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 git-metadata in remote ServiceOverride Entity

put

Update git-metadata in remote ServiceOverride and returns the identifier of updated ServiceOverride

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

identifierstringOptional

Service Overrides Identifier. Can be user-provided during creation; if omitted, auto-generated from environmentRef, serviceRef, and infraIdentifier based on override type.

environmentRefstringOptional

Environment Reference for the Entity.

serviceRefstringOptional

Service Reference for Entity

infraIdentifierstringOptional

infraIdentifier

serviceOverridesTypestring · enumOptional

Type of the override which is based on source of overrides

Possible values:
connectorRefstringOptional

Identifier of Connector needed for CRUD operations on the respective Entity

repoNamestringOptional

Name of the repository.

filePathstringOptional

File Path of the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/serviceOverrides/update-git-metadata
PUT /gateway/ng/api/serviceOverrides/update-git-metadata?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"
    }
  ]
}

Last updated

Was this helpful?