Secrets /
Get secret
Required permission
Project > Secrets > General > Read
Path parameters
projectId
string requiredID of the project
secretId
string requiredID of the secret
Query parameters
show
stringWhich secrets to display - if set to
this
only the group's secrets are displayed, if set toinherited
only secrets from linked addons are displayed, if set toall
or not provided, both are displayed.one ofthis, inherited, all
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredIdentifier for the secret group
name
string requiredSecret group name
description
stringA short description of the secret group
secretType
string requiredThe type of the created secret group
one ofenvironment-arguments, environment, argumentsprojectId
string requiredID of the project that the secret group belongs to
priority
integer requiredThe priority with which different secret groups will be merged
min0max100restrictions
{object} requiredRestriction settings of the secret
restricted
booleanWhether the secret is restricted to specific resources. If this is
true
, only resources listed innfObjects
or with a tag listed intags
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, jobcreatedAt
string requiredThe timestamp when the secret group was created at
updatedAt
string requiredThe timestamp the secret group was last updated at
secrets
{object} requiredDecrypted secret data. If the
show
parameter is set tothis
, this will only contain secrets saved to this group. If theshow
parameter is set toinherited
, this will only contain secrets inherited from linked addons. Otherwise, this will contain both.
GET /v1/projects/{projectId}/secrets/{secretId}
Example response
200 OK
JSON
{
"data": {
"id": "example-secret-group",
"name": "Example secret group",
"tags": [
"my-tag"
],
"description": "This is the secret group description",
"secretType": "environment",
"projectId": "default-project",
"priority": 10,
"restrictions": {
"restricted": true,
"nfObjects": [
{
"id": "example-service",
"type": "service"
}
],
"tags": [
"my-tag"
]
},
"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"
}
}
}
}
}