Python
import os
from datetime import datetime
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
response = client.fastedge.statistics.get_duration_series(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
step=0,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.stats)package main
import (
"context"
"fmt"
"time"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/fastedge"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Fastedge.Statistics.GetDurationSeries(context.TODO(), fastedge.StatisticGetDurationSeriesParams{
From: time.Now(),
Step: 0,
To: time.Now(),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Stats)
}
curl --request GET \
--url https://api.gcore.com/fastedge/v1/stats/app_duration \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/fastedge/v1/stats/app_duration', 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/stats/app_duration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/fastedge/v1/stats/app_duration")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/stats/app_duration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"stats": [
{
"time": "2023-11-07T05:31:56Z",
"min": 123,
"max": 123,
"avg": 123,
"median": 123,
"perc75": 123,
"perc90": 123
}
]
}{
"error": "<string>"
}Stats
Execution duration statistics
Retrieve execution time statistics showing how long applications took to process requests. Results are aggregated by the specified time interval and can be filtered by app and network.
GET
/
fastedge
/
v1
/
stats
/
app_duration
Python
import os
from datetime import datetime
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
response = client.fastedge.statistics.get_duration_series(
from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
step=0,
to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.stats)package main
import (
"context"
"fmt"
"time"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/fastedge"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Fastedge.Statistics.GetDurationSeries(context.TODO(), fastedge.StatisticGetDurationSeriesParams{
From: time.Now(),
Step: 0,
To: time.Now(),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Stats)
}
curl --request GET \
--url https://api.gcore.com/fastedge/v1/stats/app_duration \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/fastedge/v1/stats/app_duration', 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/stats/app_duration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/fastedge/v1/stats/app_duration")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/stats/app_duration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"stats": [
{
"time": "2023-11-07T05:31:56Z",
"min": 123,
"max": 123,
"avg": 123,
"median": 123,
"perc75": 123,
"perc90": 123
}
]
}{
"error": "<string>"
}Authorizations
Query Parameters
Was this page helpful?