Secrets /
Get secret details
View a secret with details about its linked addons
Path parameters
projectId
string requiredID of the projectsecretId
string requiredID of the secret
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredIdentifier for the secret groupname
string requiredSecret group namedescription
stringA short description of the secret grouptype
string requiredThe permission type of the secret group.one ofsecret, configsecretType
string requiredThe type of the created secret groupone ofenvironment-arguments, environment, argumentsprojectId
string requiredID of the project that the secret group belongs topriority
integer requiredThe priority with which different secret groups will be mergedmin0max100restrictions
{object} requiredRestriction settings of the secretrestricted
booleanWhether the secret is restricted to specific resources. If this is `true`, only resources listed in `nfObjects` or with a tag listed in `tags` will have access to these secrets. Otherwise, all resources in the project will be able to access it.nfObjects
[array]List of Northflank services & jobs the secret is restricted to- {object}
id
string requiredID of the entity the secret is restricted to.pattern^[A-Za-z0-9-]+$type
string requiredType of the entity the secret is restricted to.one ofservice, jobtagMatchCondition
stringIf all or any of the tags must be present on the target for it to match the condition.one ofand, orcreatedAt
string requiredThe timestamp when the secret group was created atupdatedAt
string requiredThe timestamp the secret group was last updated atsecrets
{object} requiredDecrypted secret data from secrets saved to this group.addonSecrets
[array] requiredDetails about linked addons.- {object}
id
string requiredThe ID of the linked addonname
string requiredThe name of the linked addonaddonType
string requiredThe addon type of the linked addonversion
string requiredThe version of the linked addonvariables
{object} requiredDecrypted secret data. If the `show` parameter is set to `group`, this will only contain secrets saved to this group. If the `show` parameter is set to `inherited`, this will only contain secrets inherited from linked addons. Otherwise, this will contain both.
API
CLI
JS Client
GET /v1/projects/{projectId}/secrets/{secretId}/details
Example response
200 OK
The secret with details about its linked addons.
JSON
{
"data": {
"id": "example-secret-group",
"name": "Example secret group",
"tags": [
"my-tag"
],
"description": "This is the secret group description",
"type": "secret",
"secretType": "environment",
"projectId": "default-project",
"priority": 10,
"restrictions": {
"restricted": true,
"nfObjects": [
{
"id": "example-service",
"type": "service"
}
],
"tags": [
"my-tag"
],
"tagMatchCondition": "or"
},
"createdAt": "2021-01-01 12:00:00.000Z",
"updatedAt": "2021-01-01 12:00:00.000Z",
"secrets": {
"variables": {
"a_key": "a_secret",
"b_key": "b_secret"
},
"files": {
"/dir/fileName": {
"data": "VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=",
"encoding": "utf-8"
}
}
},
"addonSecrets": [
{
"id": "example-addon",
"name": "Example Addon",
"addonType": "mongodb",
"version": "4.4.1",
"variables": {
"NF_MONGO_USERNAME": "0000000000000000",
"NF_MONGO_PASSWORD": "00000000000000000000000000000000"
}
}
]
}
}