Secrets /
List secrets
Gets a list of secrets belonging to the project
Path parameters
projectId
string requiredID of the project
Query parameters
per_page
integerThe number of results to display per request. Maximum of 100 results per page.page
integerThe page number to access.cursor
stringThe cursor returned from the previous page of results, used to request the next page.
Response body
- {object}Response object.
data
{object} requiredResult data.secrets
[array] requiredAn array of secret groups- {object}A secret group object
id
string requiredIdentifier for the secret groupprojectId
string requiredID of the project that the secret group belongs toname
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 secret groupone ofenvironment-arguments, environment, argumentspriority
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, orpagination
{object} requiredData about the endpoint pagination.hasNextPage
boolean requiredIs there another page of results available?cursor
stringThe cursor to access the next page of results.count
number requiredThe number of results returned by this request.
API
CLI
JS Client
GET /v1/projects/{projectId}/secrets
Example response
200 OK
The list of secrets.
JSON
{
"data": {
"secrets": [
{
"id": "example-secret-group",
"projectId": "default-project",
"name": "Example secret group",
"tags": [
"my-tag"
],
"description": "This is the secret group description",
"type": "secret",
"secretType": "environment",
"priority": 10,
"restrictions": {
"restricted": true,
"nfObjects": [
{
"id": "example-service",
"type": "service"
}
],
"tags": [
"my-tag"
],
"tagMatchCondition": "or"
}
}
]
},
"pagination": {
"hasNextPage": false,
"count": 1
}
}