Skip to content

Create or replace a CI secret or variable

PUT
/api/v3/organizations/{organisation}/ci/values/{name}
curl --request PUT \
--url https://dashboard.quantcdn.io/api/v3/organizations/test-org/ci/values/DEPLOY_KEY \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "secret", "value": "example", "repo": "acme/web", "branches": [ "example" ] }'

Sets one value for the organisation, or for one repository when repo is set. The value is write-only for a secret: the response never carries it. The backend validates the name, the value and the limits and answers 400 with a message. Needs the cloud:write scope and the delete_applications permission.

organisation
required
string

The organisation ID

Example
test-org
name
required
string

The name, such as DEPLOY_KEY

Example
DEPLOY_KEY
Media typeapplication/json
object
kind
required
string
Allowed values: secret var
value
required
string format: password
repo

Owner/name. Lower-cased by the server. Leave out for an organisation value.

string
Example
acme/web
branches

Only jobs on these branches get the value. Leave out for every branch.

Array<string>

The value is saved

Media typeapplication/json
CI value write result
object
name
string
kind
string
Allowed values: secret var
scope
string
Allowed values: org repo
repo
string
branches
Array<string>
updatedAt
string format: date-time
Example
{
"name": "DEPLOY_KEY",
"kind": "secret",
"scope": "org",
"repo": "acme/web"
}

The name, the value or a limit is not valid

Media typeapplication/json
CI value validation error
object
message
string
Example
{
"message": "Name must match ^[A-Z_][A-Z0-9_]*$."
}

The organisation does not have CI runners

The request body has the wrong shape