Bad Request
Not Found
Internal server error
Returns the list of Secrets
curl -i -X GET \ 'https://app.harness.io/ng/api/v2/secrets?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&identifiers=string&type=SecretFile&searchTerm=string&types=SecretFile&source_category=CLOUD_PROVIDER&includeSecretsFromEverySubScope=false&includeAllSecretsAccessibleAtScope=false&pageIndex=0&pageSize=50&sortOrders=fieldName%3Dstring%26orderType%3DASC&pageToken=string&secretManagerIdentifiers=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Details required to create the Secret
required | object (Secret1) This is details of the secret entity defined in Harness. |
Bad Request
Not Found
Internal server error
Returns the created Secret details
{- "secret": {
- "type": "SecretFile",
- "name": "string",
- "identifier": "string",
- "orgIdentifier": "string",
- "projectIdentifier": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "spec": {
- "errorMessageForInvalidYaml": "string",
- "type": "string"
}
}
}
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
Returns created Secret file
curl -i -X POST \ 'https://app.harness.io/ng/api/v2/secrets/files?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&privateSecret=false' \ -H 'Content-Type: multipart/form-data' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -F spec=string
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Details required to create the Secret
required | object (Secret1) This is details of the secret entity defined in Harness. |
Bad Request
Not Found
Internal server error
Returns the created Secret details
curl -i -X POST \ 'https://app.harness.io/ng/api/v2/secrets/yaml?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&privateSecret=false' \ -H 'Content-Type: application/yaml' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
Bad Request
Not Found
Internal server error
Returns the Secret with the requested ID and Scope
curl -i -X GET \ 'https://app.harness.io/ng/api/v2/secrets/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
required | object (Secret1) This is details of the secret entity defined in Harness. |
Bad Request
Not Found
Internal server error
Returns the updated Secret
{- "secret": {
- "type": "SecretFile",
- "name": "string",
- "identifier": "string",
- "orgIdentifier": "string",
- "projectIdentifier": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "spec": {
- "errorMessageForInvalidYaml": "string",
- "type": "string"
}
}
}
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
It returns true if the secret is successfully deleted and false if it is not deleted
curl -i -X DELETE \ 'https://app.harness.io/ng/api/v2/secrets/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&forceDelete=false' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
Returns the list of Secrets
{- "secretName": "string",
- "secretIdentifier": "string",
- "secretTypes": [
- "SecretFile"
], - "secretManagerIdentifiers": [
- "string"
], - "description": "string",
- "searchTerm": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "filterType": "Secret"
}
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
Returns the list of Secrets
{- "identifiers": [
- "string"
], - "searchTerm": "string",
- "secretTypes": [
- "SecretFile"
], - "sourceCategory": "CLOUD_PROVIDER",
- "includeSecretsFromEverySubScope": true,
- "includeAllSecretsAccessibleAtScope": true
}
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
Returns the updated Secret file details
curl -i -X PUT \ 'https://app.harness.io/ng/api/v2/secrets/files/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \ -H 'Content-Type: multipart/form-data' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -F spec=string
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Details of Secret to create
required | object (Secret1) This is details of the secret entity defined in Harness. |
Bad Request
Not Found
Internal server error
Returns the updated Secret details
curl -i -X PUT \ 'https://app.harness.io/ng/api/v2/secrets/{identifier}/yaml?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \ -H 'Content-Type: application/yaml' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
Bad Request
Not Found
Internal server error
Returns validation response
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}
Bad Request
Not Found
Internal server error
It returns true if the Identifier is unique and false if the Identifier is not unique.
curl -i -X GET \ 'https://app.harness.io/ng/api/v2/secrets/validateUniqueIdentifier/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "status": "SUCCESS",
- "code": "DEFAULT_ERROR_CODE",
- "message": "string",
- "correlationId": "string",
- "errors": [
- {
- "fieldId": "string",
- "error": "string"
}
]
}