Skip to main content
PUT
/
fastedge
/
v1
/
template
/
{template_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
template_short = client.fastedge.templates.replace(
    template_id=0,
    binary_id=12345,
    name="api-gateway-template",
    owned=True,
    params=[{
        "data_type": "string",
        "mandatory": True,
        "name": "api_key",
    }],
)
print(template_short.id)
{
  "id": 123,
  "name": "<string>",
  "api_type": "<string>",
  "owned": true,
  "short_descr": "<string>",
  "long_descr": "<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

template_id
integer<int64>
required

Unique identifier of the template to update

Body

application/json

Complete template configuration (replaces existing)

binary_id
integer<int64>
required

ID of the WebAssembly binary to use for this template

Example:

12345

name
string
required

Unique name for the template (used for identification and searching)

Required string length: 1 - 128
Pattern: ^[a-zA-Z0-9_ -]*$
Example:

"api-gateway-template"

owned
boolean
required

Is the template owned by user?

params
object[]
required

Parameters

short_descr
string

Brief one-line description displayed in template listings

Maximum string length: 255
Example:

"HTTP API gateway with authentication"

long_descr
string

Detailed markdown description explaining template features and usage

Maximum string length: 4096
Example:

"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."

Response

Template updated successfully, returns updated metadata

id
integer<int64>
required

Template ID

name
string
required

Name of the template

api_type
string
required

Wasm API type

owned
boolean
required

Is the template owned by user?

short_descr
string

Short description of the template

long_descr
string

Long description of the template