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

Secrets

This contains APIs related to Secrets as defined in Harness

get
Query parameters
accountIdentifierstringRequired
parentUniqueIdstringRequired
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/v2/secrets/count
GET /gateway/ng/api/v2/secrets/count?accountIdentifier=text&parentUniqueId=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"
    }
  ]
}
Deprecated

Fetches the list of Secrets corresponding to the request's filter criteria.

get
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

identifiersstring[]Optional

This is the list of Secret IDs. Details specific to these IDs would be fetched.

typestring · enumOptional

Type of Secret whether it is SecretFile, SecretText or SSH key

Possible values:
searchTermstringOptional

Filter Secrets based on name, Identifier and tags by this search term

source_categorystring · enumOptional

Source Category like CLOUD_PROVIDER, SECRET_MANAGER, CLOUD_COST, ARTIFACTORY, CODE_REPO, MONITORING or TICKETING

Possible values:
includeSecretsFromEverySubScopebooleanOptional

Specify whether or not to include secrets from all the sub-scopes of the given Scope

Default: false
includeAllSecretsAccessibleAtScopebooleanOptional

Specify whether or not to include all the Secrets accessible at the scope. For eg if set as true, at the Project scope we will get org and account Secrets also in the response

Default: false
pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · max: 100Optional

Results per page(max 100)Default Value: 50

Default: 50
pageTokenstringOptional

Page Token of the next results to fetch.Default Value: ''

secretManagerIdentifiersstring[]Optional

Specify the secret managers whose secrets should be listed

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

Creates a Secret at given Scope

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

privateSecretbooleanOptional

This is a boolean value to specify if the Secret is Private. The default value is False.

Default: false
Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

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

Creates a Secret File

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

privateSecretbooleanOptional

This is a boolean value to specify if the Secret is Private. The default value is False.

Default: false
Body
fileobjectRequired

This is the encrypted Secret File that needs to be uploaded.

specstringOptional

Specification of Secret file

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/v2/secrets/files
POST /gateway/ng/api/v2/secrets/files?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: multipart/form-data
Accept: */*
Content-Length: 25

{
  "file": {},
  "spec": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}
Deprecated

Creates a secret via YAML

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

privateSecretbooleanOptional

This is a boolean value to specify if the Secret is Private. The default value is False.

Default: false
Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

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

Get the Secret by ID and Scope

get
Path parameters
identifierstringRequired

Secret ID

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/v2/secrets/{identifier}
GET /gateway/ng/api/v2/secrets/{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"
    }
  ]
}

Updates the Secret by ID and Scope

put
Path parameters
identifierstringRequired

Secret ID

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

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

Deletes Secret by ID and Scope

delete
Path parameters
identifierstringRequired

Secret ID

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

Bad Request

This is Failure entity as defied in Harness

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

Fetches the list of Secrets corresponding to the request's filter criteria.

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · max: 100Optional

Results per page(max 100)Default Value: 50

Default: 50
pageTokenstringOptional

Page Token of the next results to fetch.Default Value: ''

Body

Properties of the Secret Filter defined in Harness

secretNamestringOptional

This is the secret name on which the filter will be applied.

secretIdentifierstringOptional

This is the secret identifier on which the filter will be applied.

secretManagerIdentifiersstring[]Optional

secretManagerIdentifiers

descriptionstringOptional

Description of filter created.

searchTermstringOptional

Text to search/filter the Entity.

filterTypestring · enumOptionalPossible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "secretName": "text",
  "secretIdentifier": "text",
  "secretTypes": [
    "SecretFile"
  ],
  "secretManagerIdentifiers": [
    "text"
  ],
  "description": "text",
  "searchTerm": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "filterType": "Secret"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Fetches the list of Secrets corresponding to the request's filter criteria.

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · max: 100Optional

Results per page(max 100)Default Value: 50

Default: 50
pageTokenstringOptional

Page Token of the next results to fetch.Default Value: ''

secretManagerIdentifiersstring[]Optional
Body

This has the filter information for the Secret in Harness.

identifiersstring[]Optional

This is the list of Entity Identifiers on which the filter will be applied.

searchTermstringOptional

Text to search/filter the Entity.

sourceCategorystring · enumOptional

Specifies the connector category.

Possible values:
includeSecretsFromEverySubScopebooleanOptional

This is true if secrets are filtered at each subsequent scope.

includeAllSecretsAccessibleAtScopebooleanOptional

This is true if secrets are filtered from all super scopes.

Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "identifiers": [
    "text"
  ],
  "searchTerm": "text",
  "secretTypes": [
    "SecretFile"
  ],
  "sourceCategory": "CLOUD_PROVIDER",
  "includeSecretsFromEverySubScope": true,
  "includeAllSecretsAccessibleAtScope": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Updates the Secret file by ID and Scope

put
Path parameters
identifierstringRequired

Secret ID

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
fileobjectOptional

This is the encrypted Secret File that needs to be uploaded.

specstringOptional

Specification of Secret file

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/v2/secrets/files/{identifier}
PUT /gateway/ng/api/v2/secrets/files/{identifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: multipart/form-data
Accept: */*
Content-Length: 25

{
  "file": {},
  "spec": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Updates the Secret by ID and Scope via YAML

put
Path parameters
identifierstringRequired

Secret ID

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/v2/secrets/{identifier}/yaml
PUT /gateway/ng/api/v2/secrets/{identifier}/yaml?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/yaml
Accept: */*
Content-Length: 238

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

Validates Secret with the provided ID and Scope

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

identifierstringOptional

Secret ID

Body
typestring · enumRequiredPossible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

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

{
  "type": "SecretFile"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Checks whether the identifier is unique or not

get
Path parameters
identifierstringRequired

Secret Identifier

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/v2/secrets/validateUniqueIdentifier/{identifier}
GET /gateway/ng/api/v2/secrets/validateUniqueIdentifier/{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"
    }
  ]
}

Last updated

Was this helpful?