GET
/
cdn
/
statistics
/
shield_usage
/
aggregated
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
shield_aggregated_stats = client.cdn.statistics.get_shield_usage_aggregated(
    from_="from",
    to="to",
)
print(shield_aggregated_stats._1_example)
{
  "resource": {
    "1": {
      "metrics": {
        "shield_usage": 1
      }
    }
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

from
string
required

Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)

to
string
required

End of the requested time period (ISO 8601/RFC 3339 format, UTC.)

group_by
string

Output data grouping.

Possible value:

  • resource - Data is grouped by CDN resource.
resource
integer

CDN resources IDs by that statistics data is grouped.

To request multiple values, use: * &resource=1&resource=2

flat
boolean

The waу parameters are arranged in the response.

Possible values:

  • true – Flat structure is used.
  • false – Embedded structure is used (default.)

Response

Successful.

resource
object

Resources IDs by which statistics data is grouped.

1 (example)
object

CDN resource ID for which statistics data is shown.

metrics
object

Statistics parameters.

shield_usage
string

Number of CDN resources that used origin shielding.