Secrets
This contains APIs related to Secrets as defined in Harness
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is the list of Secret IDs. Details specific to these IDs would be fetched.
Type of Secret whether it is SecretFile, SecretText or SSH key
Filter Secrets based on name, Identifier and tags by this search term
Source Category like CLOUD_PROVIDER, SECRET_MANAGER, CLOUD_COST, ARTIFACTORY, CODE_REPO, MONITORING or TICKETING
Specify whether or not to include secrets from all the sub-scopes of the given Scope
falseSpecify 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
falsePage Index of the results to fetch.Default Value: 0
0Results per page(max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Specify the secret managers whose secrets should be listed
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the list of 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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is a boolean value to specify if the Secret is Private. The default value is False.
falseBad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the created Secret details
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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is a boolean value to specify if the Secret is Private. The default value is False.
falseThis is the encrypted Secret File that needs to be uploaded.
Specification of Secret file
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns created Secret file
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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is a boolean value to specify if the Secret is Private. The default value is False.
falseBad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the created Secret details
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"
}
]
}Secret ID
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the Secret with the requested ID and Scope
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"
}
]
}Secret ID
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the updated Secret
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"
}
]
}Secret ID
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project 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
Not Found
Internal server error
It returns true if the secret is successfully deleted and false if it is not deleted
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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Page Index of the results to fetch.Default Value: 0
0Results per page(max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Properties of the Secret Filter defined in Harness
This is the secret name on which the filter will be applied.
This is the secret identifier on which the filter will be applied.
secretManagerIdentifiers
Description of filter created.
Text to search/filter the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the list of 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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Page Index of the results to fetch.Default Value: 0
0Results per page(max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
This has the filter information for the Secret in Harness.
This is the list of Entity Identifiers on which the filter will be applied.
Text to search/filter the Entity.
Specifies the connector category.
This is true if secrets are filtered at each subsequent scope.
This is true if secrets are filtered from all super scopes.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the list of Secrets
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"
}
]
}Secret ID
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is the encrypted Secret File that needs to be uploaded.
Specification of Secret file
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the updated Secret file details
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"
}
]
}Secret ID
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns the updated Secret details
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"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Secret ID
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
Returns validation response
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"
}
]
}Secret Identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Not Found
Internal server error
It returns true if the Identifier is unique and false if the Identifier is not unique.
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?