Secrets /
Patch global secret
Updates a global secret with the specified payload
Path parameters
secretId
string requiredID of the secret
Request body
- {object}
description
stringmax length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$secrets
{object}values
{object}files
{object}gitops
{object}vcsService
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.pattern^([A-Za-z0-9-]+)|([0-9a-f]{24})$accountLogin
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `accountLogin` is provided, Northflank will instead use your linked account with that login name.vcsLinkId
stringLegacy key. Please used accountLogin instead.repoUrl
string requiredURL of the Git repo to sync the file with.pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$branch
string requiredThe name of the branch to use.filePath
string requiredThe file path in the repository. If using an existing file, it should be in JSON format.pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$
Response body
- {object}Response object.
data
{object} requiredResult data.name
string requiredmin length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringmax length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$secrets
{object}values
{object} requiredfiles
{object}type
string requiredThe permission type of the global secret.one ofsecret, configgitops
{object}vcsService
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.pattern^([A-Za-z0-9-]+)|([0-9a-f]{24})$accountLogin
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `accountLogin` is provided, Northflank will instead use your linked account with that login name.vcsLinkId
stringLegacy key. Please used accountLogin instead.repoUrl
string requiredURL of the Git repo to sync the file with.pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$branch
string requiredThe name of the branch to use.filePath
string requiredThe file path in the repository. If using an existing file, it should be in JSON format.pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$createdAt
stringtime of creationupdatedAt
stringtime of update
API
CLI
JS Client
PATCH /v1/secrets/{secretId}
Example request
Request body
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PATCH \
--data '{"gitops":{"vcsService":"github","accountLogin":"github-user","repoUrl":"https://github.com/northflank-examples/remix-postgres-redis-demo","branch":"main"}}' \
https://api.northflank.com/v1/secrets/{secretId}Example response
200 OK
Details about the updated secret.
JSON
{
"data": {
"type": "secret",
"gitops": {
"vcsService": "github",
"accountLogin": "github-user",
"repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo",
"branch": "main"
}
}
}