POST
/
fastedge
/
v1
/
apps
Add a new app
curl --request POST \
  --url https://api.gcore.com/fastedge/v1/apps \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "binary": 123,
  "template": 123,
  "status": 123,
  "env": {
    "var1": "value1",
    "var2": "value2"
  },
  "rsp_headers": {
    "header1": "value1",
    "header2": "value2"
  },
  "log": "kafka",
  "debug": false,
  "comment": "<string>",
  "secrets": {}
}'
{
  "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

Body

application/json

App details

name
string

App name

binary
integer

Binary ID

template
integer

Template ID

status
integer

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

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

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