curl --request POST \
--url https://api.gcore.com/cdn/advanced/v1/metrics \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"metrics": [
"edge_status_2xx",
"edge_status_3xx",
"edge_status_4xx",
"edge_status_5xx"
],
"from": "2021-06-14 00:00:00+00:00",
"to": "2021-06-15 00:00:00+00:00",
"group_by": [
"cname"
],
"granularity": "P1D",
"filter_by": [
{
"field": "resource",
"op": "eq",
"values": [
1234
]
}
]
}'
{
"data": [
{
"edge_status_2xx": 21095299,
"timestamp": 1623159320
},
{
"edge_download_speed": {
"0_250k": "0",
"250k_500k": "0",
"500k_750k": "0",
"750k_1M": "0",
"1M_2M": "0.09091",
"2M_3M": "0.1818",
"3M_4M": "0.1818",
"4M+": "0.5455"
},
"timestamp": 1623159380
}
]
}
curl --request POST \
--url https://api.gcore.com/cdn/advanced/v1/metrics \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"metrics": [
"edge_status_2xx",
"edge_status_3xx",
"edge_status_4xx",
"edge_status_5xx"
],
"from": "2021-06-14 00:00:00+00:00",
"to": "2021-06-15 00:00:00+00:00",
"group_by": [
"cname"
],
"granularity": "P1D",
"filter_by": [
{
"field": "resource",
"op": "eq",
"values": [
1234
]
}
]
}'
{
"data": [
{
"edge_status_2xx": 21095299,
"timestamp": 1623159320
},
{
"edge_download_speed": {
"0_250k": "0",
"250k_500k": "0",
"500k_750k": "0",
"750k_1M": "0",
"1M_2M": "0.09091",
"2M_3M": "0.1818",
"3M_4M": "0.1818",
"4M+": "0.5455"
},
"timestamp": 1623159380
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Successful.
The response is of type object
.
Was this page helpful?