Updates a global secret with the specified payload
Path parameters
secretId
string requiredID of the secret
Query parameters
runDependents
booleanOn update, whether to run the global secret’s configured dependent templates (when enabled). Defaults to false.idempotencyKey
stringDeduplicates dependent template runs when the same update is retried.
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, azure, originselfHostedVcsId
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-._]+$dependents
{object}templates
{object}items
[array]Templates to run, referenced by internalId.- stringmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$
Response body
- {object}Response object.
data
{object} requiredResult data.name
string requiredmin length3max length100pattern^[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, azure, originselfHostedVcsId
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-._]+$dependents
{object}templates
{object}items
[array]Templates to run, referenced by internalId.- stringmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$
createdAt
stringtime of creationupdatedAt
stringtime of updatetriggerResult
{object}batchId
string requiredmax length128accepted
integer requiredsucceeded
integer requiredfailed
integer requiredskipped
integer requireddeduplicated
integer requireditems
[array] required- {object}
templateInternalId
string requiredmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$status
string requiredone ofsucceeded, failed, skipped, deduplicatedtemplateRunId
string
API
CLI
JS Client
PATCH /v1/secrets/{secretId}
PATCH /v1/teams/{teamId}/secrets/{secretId}
Example request
Request body
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","filePath":"/Dockerfile"}}' \
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",
"filePath": "/Dockerfile"
}
}
}