curl --request PUT \
--url https://api.gcore.com/fastedge/v1/template/{template_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"binary_id": 12345,
"name": "api-gateway-template",
"owned": true,
"params": [
{
"name": "api_key",
"data_type": "string",
"mandatory": true,
"descr": "API key for external service authentication",
"metadata": "<string>"
}
],
"short_descr": "HTTP API gateway with authentication",
"long_descr": "Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."
}
'import requests
url = "https://api.gcore.com/fastedge/v1/template/{template_id}"
payload = {
"binary_id": 12345,
"name": "api-gateway-template",
"owned": True,
"params": [
{
"name": "api_key",
"data_type": "string",
"mandatory": True,
"descr": "API key for external service authentication",
"metadata": "<string>"
}
],
"short_descr": "HTTP API gateway with authentication",
"long_descr": "Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
binary_id: 12345,
name: 'api-gateway-template',
owned: true,
params: [
{
name: 'api_key',
data_type: 'string',
mandatory: true,
descr: 'API key for external service authentication',
metadata: '<string>'
}
],
short_descr: 'HTTP API gateway with authentication',
long_descr: 'Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.'
})
};
fetch('https://api.gcore.com/fastedge/v1/template/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/fastedge/v1/template/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'binary_id' => 12345,
'name' => 'api-gateway-template',
'owned' => true,
'params' => [
[
'name' => 'api_key',
'data_type' => 'string',
'mandatory' => true,
'descr' => 'API key for external service authentication',
'metadata' => '<string>'
]
],
'short_descr' => 'HTTP API gateway with authentication',
'long_descr' => 'Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/fastedge/v1/template/{template_id}"
payload := strings.NewReader("{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/fastedge/v1/template/{template_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/template/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"api_type": "<string>",
"owned": true,
"short_descr": "<string>",
"long_descr": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update template
Modify an existing template’s configuration. Updates affect future applications created from this template; existing apps are not changed.
curl --request PUT \
--url https://api.gcore.com/fastedge/v1/template/{template_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"binary_id": 12345,
"name": "api-gateway-template",
"owned": true,
"params": [
{
"name": "api_key",
"data_type": "string",
"mandatory": true,
"descr": "API key for external service authentication",
"metadata": "<string>"
}
],
"short_descr": "HTTP API gateway with authentication",
"long_descr": "Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."
}
'import requests
url = "https://api.gcore.com/fastedge/v1/template/{template_id}"
payload = {
"binary_id": 12345,
"name": "api-gateway-template",
"owned": True,
"params": [
{
"name": "api_key",
"data_type": "string",
"mandatory": True,
"descr": "API key for external service authentication",
"metadata": "<string>"
}
],
"short_descr": "HTTP API gateway with authentication",
"long_descr": "Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
binary_id: 12345,
name: 'api-gateway-template',
owned: true,
params: [
{
name: 'api_key',
data_type: 'string',
mandatory: true,
descr: 'API key for external service authentication',
metadata: '<string>'
}
],
short_descr: 'HTTP API gateway with authentication',
long_descr: 'Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.'
})
};
fetch('https://api.gcore.com/fastedge/v1/template/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/fastedge/v1/template/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'binary_id' => 12345,
'name' => 'api-gateway-template',
'owned' => true,
'params' => [
[
'name' => 'api_key',
'data_type' => 'string',
'mandatory' => true,
'descr' => 'API key for external service authentication',
'metadata' => '<string>'
]
],
'short_descr' => 'HTTP API gateway with authentication',
'long_descr' => 'Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/fastedge/v1/template/{template_id}"
payload := strings.NewReader("{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/fastedge/v1/template/{template_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/template/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"binary_id\": 12345,\n \"name\": \"api-gateway-template\",\n \"owned\": true,\n \"params\": [\n {\n \"name\": \"api_key\",\n \"data_type\": \"string\",\n \"mandatory\": true,\n \"descr\": \"API key for external service authentication\",\n \"metadata\": \"<string>\"\n }\n ],\n \"short_descr\": \"HTTP API gateway with authentication\",\n \"long_descr\": \"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"api_type": "<string>",
"owned": true,
"short_descr": "<string>",
"long_descr": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
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
Unique identifier of the template to update
Body
Complete template configuration (replaces existing)
ID of the WebAssembly binary to use for this template
12345
Unique name for the template (used for identification and searching)
1 - 128^[a-zA-Z0-9_ -]*$"api-gateway-template"
Is the template owned by user?
Parameters
Show child attributes
Show child attributes
Brief one-line description displayed in template listings
255"HTTP API gateway with authentication"
Detailed markdown description explaining template features and usage
4096"Complete API gateway solution with JWT authentication, rate limiting, and request transformation capabilities."
Response
Template updated successfully, returns updated metadata
Was this page helpful?