Create or replace a CI secret or variable
PUT
/api/v3/organizations/{organisation}/ci/values/{name}
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/ci/values/DEPLOY_KEY';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"secret","value":"example","repo":"acme/web","branches":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
The organisation ID
Example
test-orgname
required
string
The name, such as DEPLOY_KEY
Example
DEPLOY_KEYRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
value
required
string format: password
repo
Owner/name. Lower-cased by the server. Leave out for an organisation value.
string
Example
acme/webbranches
Only jobs on these branches get the value. Leave out for every branch.
Array<string>
Responses
Section titled “Responses”The value is saved
Media typeapplication/json
CI value write result
object
name
string
kind
string
scope
string
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
