PUT
/
fastedge
/
v1
/
apps
/
{id}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
app_short = client.fastedge.apps.replace(
    id=0,
)
print(app_short.id)
{
  "id": 123,
  "name": "<string>",
  "url": "<string>",
  "status": 123,
  "binary": 123,
  "comment": "<string>",
  "api_type": "<string>",
  "debug_until": "2023-11-07T05:31:56Z",
  "template": 123,
  "template_name": "<string>",
  "networks": [
    "<string>"
  ],
  "upgradeable_to": 123,
  "plan_id": 123,
  "plan": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

id
integer
required

ID of the app

Body

application/json

App details

binary
integer
required

Binary ID

status
integer
required

Status code:
0 - draft (inactive)
1 - enabled
2 - disabled
3 - hourly call limit exceeded
4 - daily call limit exceeded
5 - suspended

name
string

App name

template
integer

Template ID

env
object

Environment variables

Example:
{ "var1": "value1", "var2": "value2" }
rsp_headers
object

Extra headers to add to the response

Example:
{ "header1": "value1", "header2": "value2" }
log
enum<string> | null

Logging channel (by default - kafka, which allows exploring logs with API)

Available options:
kafka,
none
debug
boolean
default:false

Switch on logging for 30 minutes (switched off by default)

comment
string

App description

secrets
object

Application secrets

stores
object

KV stores for the app

Example:
{ "country_allow": 1, "ip_block": 2 }

Response

Ok

id
integer
required

App ID

name
string
required

App name

status
integer
required

Status code:
0 - draft (inactive)
1 - enabled
2 - disabled
3 - hourly call limit exceeded
4 - daily call limit exceeded
5 - suspended

binary
integer
required

Binary ID

api_type
string
required

Wasm API type

plan_id
integer
required

Application plan ID

url
string

App URL

comment
string

Description of the binary

debug_until
string<date-time>

When debugging finishes

template
integer

Template ID

template_name
string

Template name

networks
string[]

Networks

upgradeable_to
integer

ID of the binary the app can be upgraded to

plan
string

Application plan name