POST
/
cdn
/
advanced
/
v1
/
metrics
curl --request POST \
  --url https://api.gcore.com/cdn/advanced/v1/metrics \
  --header 'APIKey: <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
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Body

application/json

Response

200
application/json

Successful.

The response is of type object.