Environment variable
Returns all environment variables in the account scope (decrypted).
Variables returned successfully
Authentication error
GET /v2/env/account HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"vars": {
"API_KEY": "sk_live_123",
"NODE_ENV": "production"
}
}
}Replaces the entire set of environment variables in the account scope.
Variables saved successfully
Invalid variables
Authentication error
PUT /v2/env/account HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58
{
"vars": {
"API_KEY": "sk_live_123",
"NODE_ENV": "production"
}
}{
"status": "ok",
"data": {
"vars": {
"API_KEY": "sk_live_123",
"NODE_ENV": "production"
}
}
}Removes all environment variables in the account scope.
Variables removed successfully
Authentication error
DELETE /v2/env/account HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"removed": 2
}
}Returns the environment variables of a project (decrypted). Requires project management permission.
Project ID
Variables returned successfully
Authentication error
No permission to access the project
Project not found
GET /v2/env/project/{projectID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"vars": {
"DATABASE_URL": "postgres://..."
}
}
}Replaces the entire set of environment variables of a project.
Project ID
Variables saved successfully
Invalid variables
Authentication error
No permission to manage the project
Project not found
PUT /v2/env/project/{projectID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"vars": {
"DATABASE_URL": "postgres://..."
}
}{
"status": "ok",
"data": {
"vars": {
"DATABASE_URL": "postgres://..."
}
}
}Removes all environment variables of a project.
Project ID
Variables removed successfully
Authentication error
No permission to manage the project
Project not found
DELETE /v2/env/project/{projectID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"removed": 1
}
}Returns the environment variables of an app (decrypted). Requires config_app permission.
Application ID
Variables returned successfully
Authentication error
No permission to access the app
Application not found
GET /v2/env/app/{appID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"vars": {
"TOKEN": "abc123"
}
}
}Replaces the entire set of environment variables of an app.
Application ID
Variables saved successfully
Invalid variables
Authentication error
No permission to manage the app
Application not found
PUT /v2/env/app/{appID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"vars": {
"TOKEN": "abc123"
}
}{
"status": "ok",
"data": {
"vars": {
"TOKEN": "abc123"
}
}
}Removes all environment variables of an app.
Application ID
Variables removed successfully
Authentication error
No permission to manage the app
Application not found
DELETE /v2/env/app/{appID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"removed": 1
}
}Last updated