API Reference
Variables API
CRUD operations for pipeline variables with encrypted secret storage.
CRUD operations for pipeline variables. Secret variables are encrypted at rest.
List variables
curl http://localhost:8080/api/variables[
{
"key": "api_base_url",
"value": "https://api.example.com",
"type": "string",
"created_at": "2024-01-10T12:00:00Z",
"updated_at": "2024-01-15T08:30:00Z"
},
{
"key": "api_token",
"value": "********",
"type": "secret",
"created_at": "2024-01-10T12:00:00Z",
"updated_at": "2024-01-15T08:30:00Z"
}
]Secret values are always masked as ********.
Pagination
curl "http://localhost:8080/api/variables?page=1&per_page=20"Get variable
curl http://localhost:8080/api/variables/{key}Set variable (create or update)
curl -X POST http://localhost:8080/api/variables \
-H "Content-Type: application/json" \
-d '{
"key": "api_base_url",
"value": "https://api.example.com",
"type": "string"
}'Secret variables
curl -X POST http://localhost:8080/api/variables \
-H "Content-Type: application/json" \
-d '{
"key": "db_password",
"value": "super-secret-value",
"type": "secret"
}'Secret values are encrypted with AES-256-GCM before storage.
Update existing variable
curl -X PUT http://localhost:8080/api/variables/{key} \
-H "Content-Type: application/json" \
-d '{
"key": "api_base_url",
"value": "https://api-v2.example.com",
"type": "string"
}'To keep an existing secret value, send "value": "********".
Delete variable
curl -X DELETE http://localhost:8080/api/variables/{key}Returns 204 No Content.
Variable types
| Type | Storage | API response |
|---|---|---|
string | Plaintext | Full value shown |
secret | AES-256-GCM encrypted | ******** |
Using variables in pipelines
Reference variables in any node config value:
{
"url": "${var.api_base_url}/users",
"headers": {
"Authorization": "Bearer ${var.api_token}"
}
}The engine resolves ${var.key} at runtime by fetching and decrypting the stored value.
Usage tracking
Find which pipelines reference a variable:
curl http://localhost:8080/api/variables/{key}/used-by