API

AppConfigVariable

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{app_id}/config_variables/{id}/disable create Updated app configuration variable
POST /api/v1/hosting/apps/{app_id}/config_variables/{id}/rotate create Updated app configuration variable
POST /api/v1/hosting/apps/{app_id}/config_variables create App configuration variable created
GET /api/v1/hosting/apps/{app_id}/config_variables/{id} load Success
GET /api/v1/hosting/apps/{app_id}/config_variables load Success
PATCH /api/v1/hosting/apps/{app_id}/config_variables/{id} patch Success
DELETE /api/v1/hosting/apps/{app_id}/config_variables/{id} remove Success
PUT /api/v1/hosting/apps/{app_id}/config_variables/{id} update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

app_config_variable, err := client.AppConfigVariable(nil).Load(map[string]any{"app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(app_config_variable)
created, err := client.AppConfigVariable(nil).Create(map[string]any{"app_id": "example", "exposed_to_build": true, "key": "example", "scope_kind": "example", "value_kind": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.AppConfigVariable(nil).Update(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.AppConfigVariable(nil).Patch(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.AppConfigVariable(nil).Remove(map[string]any{"app_id": "example", "id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local app_config_variable, err = client:AppConfigVariable():load({ app_id = "example" })
local created, err = client:AppConfigVariable():create({ app_id = "example", exposed_to_build = true, key = "example", scope_kind = "example", value_kind = "example" })
local updated, err = client:AppConfigVariable():update({ id = "example_id", app_id = "example" })
local patched, err = client:AppConfigVariable():patch({ id = "example_id", app_id = "example" })
local removed, err = client:AppConfigVariable():remove({ app_id = "example", id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$app_config_variable = $client->AppConfigVariable()->load(["app_id" => "example"]);
$created = $client->AppConfigVariable()->create(["app_id" => "example", "exposed_to_build" => true, "key" => "example", "scope_kind" => "example", "value_kind" => "example"]);
$updated = $client->AppConfigVariable()->update(["id" => "example_id", "app_id" => "example"]);
$patched = $client->AppConfigVariable()->patch(["id" => "example_id", "app_id" => "example"]);
$client->AppConfigVariable()->remove(["app_id" => "example", "id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

app_config_variable = client.AppConfigVariable().load({"app_id": "example"})
created = client.AppConfigVariable().create({ "app_id": "example", "exposed_to_build": True, "key": "example", "scope_kind": "example", "value_kind": "example" })
updated = client.AppConfigVariable().update({"id": "example_id", "app_id": "example"})
patched = client.AppConfigVariable().patch({"id": "example_id", "app_id": "example"})
client.AppConfigVariable().remove({"app_id": "example", "id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

app_config_variable = client.AppConfigVariable.load({ "app_id" => "example" })
created = client.AppConfigVariable.create({ "app_id" => "example", "exposed_to_build" => true, "key" => "example", "scope_kind" => "example", "value_kind" => "example" })
updated = client.AppConfigVariable.update({ "id" => "example_id", "app_id" => "example" })
patched = client.AppConfigVariable.patch({ "id" => "example_id", "app_id" => "example" })
client.AppConfigVariable.remove({ "app_id" => "example", "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const app_config_variable = await client.AppConfigVariable().load({ app_id: "example" })
const created = await client.AppConfigVariable().create({ app_id: "example", exposed_to_build: true, key: "example", scope_kind: "example", value_kind: "example" })
const updated = await client.AppConfigVariable().update({ id: "example_id", app_id: "example" })
const patched = await client.AppConfigVariable().patch({ id: "example_id", app_id: "example" })
await client.AppConfigVariable().remove({ app_id: "example", id: "example_id" })

Fields

Field Type Required Description
app_environment_id one,string,null Yes App Environment Id
app_service_id one,string,null Yes App Service Id
created_at string Yes Created At
description one,string,null Yes Description
exposed_to_build boolean Yes Exposed To Build
has_value boolean Yes Has Value
hosted_app_id string Yes Hosted App Id
id string Yes Id
key string Yes Key
scope_kind string Yes Scope Kind
updated_at string Yes Updated At
value one,string,null Yes Value
value_kind string Yes Value Kind

create

POST /api/v1/hosting/apps/{app_id}/config_variables/{id}/disable

Operation ID: disable_api_v1_app_config_variable.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Updated app configuration variable

application/json

Property Type Required Description
config_variable object Yes
config_variable.app_environment_id string Yes
config_variable.app_service_id string Yes
config_variable.created_at string (date-time) Yes
config_variable.description string Yes
config_variable.exposed_to_build boolean Yes
config_variable.has_value boolean Yes
config_variable.hosted_app_id string Yes
config_variable.id string Yes
config_variable.key string Yes
config_variable.scope_kind enum: app, environment, service Yes
config_variable.updated_at string (date-time) Yes
config_variable.value string Yes
config_variable.value_kind enum: plain, secret, reference Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/hosting/apps/{app_id}/config_variables/{id}/rotate

Operation ID: rotate_api_v1_app_config_variable.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
value string Yes
value_kind enum: plain, secret, reference No

Responses

200: Updated app configuration variable

application/json

Property Type Required Description
config_variable object Yes
config_variable.app_environment_id string Yes
config_variable.app_service_id string Yes
config_variable.created_at string (date-time) Yes
config_variable.description string Yes
config_variable.exposed_to_build boolean Yes
config_variable.has_value boolean Yes
config_variable.hosted_app_id string Yes
config_variable.id string Yes
config_variable.key string Yes
config_variable.scope_kind enum: app, environment, service Yes
config_variable.updated_at string (date-time) Yes
config_variable.value string Yes
config_variable.value_kind enum: plain, secret, reference Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Hosting delivery request failed validation

application/json

Property Type Required Description
details array of string No
error string Yes
502: Bad gateway

POST /api/v1/hosting/apps/{app_id}/config_variables

Operation ID: post_api_v1_hosting_apps_app_id_config_variables.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
app_environment_id string No
app_service_id string No
description string No
exposed_to_build boolean Yes
key string Yes
scope_kind enum: app, environment, service Yes
value string No
value_kind enum: plain, secret, reference Yes

Responses

200: App configuration variable created

application/json

Property Type Required Description
config_variable object Yes
config_variable.app_environment_id string Yes
config_variable.app_service_id string Yes
config_variable.created_at string (date-time) Yes
config_variable.description string Yes
config_variable.exposed_to_build boolean Yes
config_variable.has_value boolean Yes
config_variable.hosted_app_id string Yes
config_variable.id string Yes
config_variable.key string Yes
config_variable.scope_kind enum: app, environment, service Yes
config_variable.updated_at string (date-time) Yes
config_variable.value string Yes
config_variable.value_kind enum: plain, secret, reference Yes
201: App configuration variable created

application/json

Property Type Required Description
config_variable object Yes
config_variable.app_environment_id string Yes
config_variable.app_service_id string Yes
config_variable.created_at string (date-time) Yes
config_variable.description string Yes
config_variable.exposed_to_build boolean Yes
config_variable.has_value boolean Yes
config_variable.hosted_app_id string Yes
config_variable.id string Yes
config_variable.key string Yes
config_variable.scope_kind enum: app, environment, service Yes
config_variable.updated_at string (date-time) Yes
config_variable.value string Yes
config_variable.value_kind enum: plain, secret, reference Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Hosting delivery request failed validation

application/json

Property Type Required Description
details array of string No
error string Yes
502: Bad gateway

load

GET /api/v1/hosting/apps/{app_id}/config_variables/{id}

Operation ID: api_v1_app_config_variable.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/hosting/apps/{app_id}/config_variables

Operation ID: api_v1_app_config_variables.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
app_environment_id query string No Return only records scoped to this environment of the app, including archived previews.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/hosting/apps/{app_id}/config_variables/{id}

Operation ID: patch_api_v1_hosting_apps_app_id_config_variables_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/hosting/apps/{app_id}/config_variables/{id}

Operation ID: delete_api_v1_hosting_apps_app_id_config_variables_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/hosting/apps/{app_id}/config_variables/{id}

Operation ID: put_api_v1_hosting_apps_app_id_config_variables_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway