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

Services

This contains APIs related to Services

Check for allowed-values in the Services

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/servicesV2/check-allowed-values
POST /gateway/ng/api/servicesV2/check-allowed-values?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 Service list

get
Query parameters
pageinteger · int32Optional

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

Default: 0
sizeinteger · int32 · max: 1000Optional

Results per page

Default: 100
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

searchTermstringOptional

The word to be searched and included in the list response

serviceIdentifiersstring[]Optional

List of ServicesIds

sortstring[]Optional

Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order

typestring · enumOptionalPossible values:
categorystring · enumOptional

Filter services by the family of service types they belong to, for example AiService for AI agent services. Can be combined with type to narrow down to a single type.

Possible values:
gitOpsEnabledbooleanOptional
tagsstring[]Optional

Filter services by tags. Each entry is of the form key:value, or key for a key-only match. A service matches if it has any of the supplied tags.

storeTypestring · enumOptional

Filter services by where the entity is stored. INLINE returns Harness-stored services, REMOTE returns Git-stored services.

Possible values:
deploymentTemplateIdentifierstringOptional

The Identifier of deployment template if infrastructure is of type custom deployment

versionLabelstringOptional

The version label of deployment template if infrastructure is of type custom deployment

includeAllServicesAccessibleAtScopebooleanOptional

Specify true if all accessible Services are to be included

Default: false
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

Create a Service

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

Service Request details defined in Harness.

identifierstringOptional

Identifier of the Service Request.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

namestringOptional

Name of the Service Request.

descriptionstringOptional

Description of the entity

yamlstringOptional

YAML for the Service Request

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "name": "serviceName",
  "identifier": "serviceId",
  "tags": {},
  "projectIdentifier": "s",
  "orgIdentifier": "default",
  "yaml": "service:\n  name: serviceName\n  identifier: serviceId\n  tags: {}\n  serviceDefinition:\n    spec:\n      artifacts:\n        primary:\n          primaryArtifactRef: artifactName\n          sources:\n            - spec:\n                connectorRef: connectorId\n                imagePath: imagePath\n                tag: tagId\n              identifier: artifactName\n              type: DockerRegistry\n    type: Kubernetes\n"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update a Service by identifier

put
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

Service Request details defined in Harness.

identifierstringOptional

Identifier of the Service Request.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

namestringOptional

Name of the Service Request.

descriptionstringOptional

Description of the entity

yamlstringOptional

YAML for the Service Request

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "name": "serviceName",
  "identifier": "serviceId",
  "tags": {},
  "projectIdentifier": "s",
  "orgIdentifier": "default",
  "yaml": "service:\n  name: serviceName\n  identifier: serviceId\n  tags: {}\n  serviceDefinition:\n    spec:\n      artifacts:\n        primary:\n          primaryArtifactRef: artifactName\n          sources:\n            - spec:\n                connectorRef: connectorId\n                imagePath: imagePath\n                tag: tagId\n              identifier: artifactName\n              type: DockerRegistry\n    type: Kubernetes\n"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Create Services

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Bodyobject · ServiceRequest[]

Service Request details defined in Harness.

identifierstringOptional

Identifier of the Service Request.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

namestringOptional

Name of the Service Request.

descriptionstringOptional

Description of the entity

yamlstringOptional

YAML for the Service Request

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

[
  {
    "identifier": "text",
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "name": "text",
    "description": "text",
    "tags": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "yaml": "text"
  }
]
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Create Services with partial success support - returns both successful and failed services

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Bodyobject · ServiceRequest[]

Service Request details defined in Harness.

identifierstringOptional

Identifier of the Service Request.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

namestringOptional

Name of the Service Request.

descriptionstringOptional

Description of the entity

yamlstringOptional

YAML for the Service Request

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

[
  {
    "identifier": "text",
    "orgIdentifier": "text",
    "projectIdentifier": "text",
    "name": "text",
    "description": "text",
    "tags": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "yaml": "text"
  }
]
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets a Service by identifier

get
Path parameters
serviceIdentifierstringRequired

Service 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 Service is deleted or not

Default: false
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/servicesV2/{serviceIdentifier}
GET /gateway/ng/api/servicesV2/{serviceIdentifier}?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 Service by identifier

delete
Path parameters
serviceIdentifierstringRequired

Service Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

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/servicesV2/{serviceIdentifier}
DELETE /gateway/ng/api/servicesV2/{serviceIdentifier}?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"
    }
  ]
}

Retrieving the list of Helm Command Options

get
Query parameters
serviceSpecTypestringRequired
versionstring · enumOptionalPossible values:
storeTypestringOptional
stepTypestringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/servicesV2/helm/command-flags
GET /gateway/ng/api/servicesV2/helm/command-flags?serviceSpecType=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"
    }
  ]
}

Retrieving the list of Kubernetes Command Options

get
Query parameters
serviceSpecTypestringRequired
stepTypestringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/servicesV2/k8s/command-flags
GET /gateway/ng/api/servicesV2/k8s/command-flags?serviceSpecType=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"
    }
  ]
}

Retrieving the list of Kustomize Command Flags

get
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

Get Plugin Info at Service

get
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

Retrieving the list of actions available for service hooks

get
Query parameters
serviceSpecTypestringRequired
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/servicesV2/hooks/actions
GET /gateway/ng/api/servicesV2/hooks/actions?serviceSpecType=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"
    }
  ]
}

Get Service YAML from Git Repository

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

serviceIdentifierstringOptional

Service Identifier for the entity

connectorRefstringOptional

Identifier of Connector needed for CRUD operations on the respective Entity

repoNamestringRequired

Name of the repository.

branchstringRequired

Name of the branch.

filePathstringRequired

File Path of the Entity.

isForceImportbooleanOptional

isForceImport

Default: false
isHarnessCodeRepobooleanOptional

Is Harness code repo enabled

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/servicesV2/import
POST /gateway/ng/api/servicesV2/import?accountIdentifier=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"
    }
  ]
}

Gets Service Access list

get
Query parameters
pageinteger · int32Optional

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

Default: 0
sizeinteger · int32Optional

Results per page

Default: 100
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

searchTermstringOptional

The word to be searched and included in the list response

serviceIdentifiersstring[] · max: 1000Optional

List of ServicesIds

sortstring[]Optional

Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order

typestring · enumOptionalPossible values:
gitOpsEnabledbooleanOptional
deploymentTemplateIdentifierstringOptional

The Identifier of deployment template if infrastructure is of type custom deployment

versionLabelstringOptional

The version label of deployment template if infrastructure is of type custom deployment

deploymentMetadataYamlstringOptional
includeAllServicesAccessibleAtScopebooleanOptional

Specify true if all accessible Services are to be included

Default: false
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/servicesV2/list/access
GET /gateway/ng/api/servicesV2/list/access?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 Service YAML from inline to remote

post
Path parameters
serviceIdentifierstringRequired

Service Identifier for the entity

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

Commit Message to use for the merge commit.

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:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/servicesV2/move-config/{serviceIdentifier}
POST /gateway/ng/api/servicesV2/move-config/{serviceIdentifier}?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 service Entity

put

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

Path parameters
serviceIdentifierstringRequired

Service Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringRequired

Organization Identifier for the Entity.

projectIdentifierstringRequired

Project Identifier for the Entity.

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/servicesV2/{serviceIdentifier}/update-git-metadata
PUT /gateway/ng/api/servicesV2/{serviceIdentifier}/update-git-metadata?accountIdentifier=text&orgIdentifier=text&projectIdentifier=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"
    }
  ]
}

Upsert a Service by identifier

put
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Header parameters
If-MatchstringOptional
Body

Service Request details defined in Harness.

identifierstringOptional

Identifier of the Service Request.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

namestringOptional

Name of the Service Request.

descriptionstringOptional

Description of the entity

yamlstringOptional

YAML for the Service Request

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "name": "serviceName",
  "identifier": "serviceId",
  "tags": {},
  "projectIdentifier": "s",
  "orgIdentifier": "default",
  "yaml": "service:\n  name: serviceName\n  identifier: serviceId\n  tags: {}\n  serviceDefinition:\n    spec:\n      artifacts:\n        primary:\n          primaryArtifactRef: artifactName\n          sources:\n            - spec:\n                connectorRef: connectorId\n                imagePath: imagePath\n                tag: tagId\n              identifier: artifactName\n              type: DockerRegistry\n    type: Kubernetes\n"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?