Create Secret V2
Creates a secret
The version of the API in yyyy-MM-dd format. For versioning information refer to /platform/api/about.
2023-01-01
The variable to create
Show optional properties
{
"name": "my-name",
"value": "my-value"
}
{
"name": "my-name",
"description": "string",
"value": "my-value",
"projectIdsToAdd": [
"string"
],
"orgScoped": false
}
A human-friendly name used as an identifier for a secret. Secret name should not contain special characters.
A human-friendly description.
The value of secret.
A list of project IDs to add this secret to.
This boolean checks if the secret is org scope or project scope
'Created' with the newly created secret
"Secret Object"
The id of organization the secret belongs to. Can not be modified, only available in response.
The id of project the secret belongs to. Provided during create, can not be updated.
IDs of projects, associated with the secret. This is not a full list and is limited to 10 projects.
The name of project the secret belongs to.
The unique identifier of a secret.
A human-friendly name used as an identifier for a secret.
A human-friendly description.
The value of secret.
To check if the secret is a org scope or project scope
The user that created this secret. Can not be modified. only available in response.
The user that last updated this secret. Can not be modified. only available in response.
Date when the secret was created. The date is in ISO 8601 with time zone Can not be modified. only available in response.
Date when the secret was last updated. The date is in ISO 8601 with time zone. Can not be modified. only available in response.
Unauthorized, the user is not authenticated
Forbidden, the user lacks permissions
'Conflict' if secret already exists
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name:"string","value:"string"}' https://{api_host}/platform/api/secrets