curl --request PUT \
--url https://api.gcore.com/fastedge/v1/admin/plans/{plan_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"max_duration": 50,
"mem_limit": 10485760,
"max_subrequests": 123,
"reseller_id": 0,
"name": "enterprise-tier",
"id": 123,
"billing_plan_id": 0,
"cache_mode": 0
}
'import requests
url = "https://api.gcore.com/fastedge/v1/admin/plans/{plan_id}"
payload = {
"max_duration": 50,
"mem_limit": 10485760,
"max_subrequests": 123,
"reseller_id": 0,
"name": "enterprise-tier",
"id": 123,
"billing_plan_id": 0,
"cache_mode": 0
}
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({
max_duration: 50,
mem_limit: 10485760,
max_subrequests: 123,
reseller_id: 0,
name: 'enterprise-tier',
id: 123,
billing_plan_id: 0,
cache_mode: 0
})
};
fetch('https://api.gcore.com/fastedge/v1/admin/plans/{plan_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/admin/plans/{plan_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([
'max_duration' => 50,
'mem_limit' => 10485760,
'max_subrequests' => 123,
'reseller_id' => 0,
'name' => 'enterprise-tier',
'id' => 123,
'billing_plan_id' => 0,
'cache_mode' => 0
]),
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/admin/plans/{plan_id}"
payload := strings.NewReader("{\n \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\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/admin/plans/{plan_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/admin/plans/{plan_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 \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>"
}{
"error": "<string>"
}Update a plan
Modify an existing subscription plan’s configuration. Changes affect all clients using this plan; use with caution.
curl --request PUT \
--url https://api.gcore.com/fastedge/v1/admin/plans/{plan_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"max_duration": 50,
"mem_limit": 10485760,
"max_subrequests": 123,
"reseller_id": 0,
"name": "enterprise-tier",
"id": 123,
"billing_plan_id": 0,
"cache_mode": 0
}
'import requests
url = "https://api.gcore.com/fastedge/v1/admin/plans/{plan_id}"
payload = {
"max_duration": 50,
"mem_limit": 10485760,
"max_subrequests": 123,
"reseller_id": 0,
"name": "enterprise-tier",
"id": 123,
"billing_plan_id": 0,
"cache_mode": 0
}
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({
max_duration: 50,
mem_limit: 10485760,
max_subrequests: 123,
reseller_id: 0,
name: 'enterprise-tier',
id: 123,
billing_plan_id: 0,
cache_mode: 0
})
};
fetch('https://api.gcore.com/fastedge/v1/admin/plans/{plan_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/admin/plans/{plan_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([
'max_duration' => 50,
'mem_limit' => 10485760,
'max_subrequests' => 123,
'reseller_id' => 0,
'name' => 'enterprise-tier',
'id' => 123,
'billing_plan_id' => 0,
'cache_mode' => 0
]),
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/admin/plans/{plan_id}"
payload := strings.NewReader("{\n \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\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/admin/plans/{plan_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/admin/plans/{plan_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 \"max_duration\": 50,\n \"mem_limit\": 10485760,\n \"max_subrequests\": 123,\n \"reseller_id\": 0,\n \"name\": \"enterprise-tier\",\n \"id\": 123,\n \"billing_plan_id\": 0,\n \"cache_mode\": 0\n}"
response = http.request(request)
puts response.read_body{
"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 plan to update
Body
Complete plan configuration (replaces existing)
Maximum execution time per request in milliseconds. Requests exceeding this limit are terminated.
x >= 150
Maximum memory allocation per instance in bytes. Prevents runaway memory usage.
10485760
Maximum number of outgoing HTTP requests allowed per invocation (0 disables external requests)
Reseller plan ID
Unique plan identifier (alphanumeric and hyphens)
1 - 64^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$"enterprise-tier"
Plan ID
Billing plan ID
Caching mode:
0 - no caching
1 - client-scoped caching
2 - app-scoped caching
0, 1, 2 Response
Plan updated successfully
Was this page helpful?