GET
/
cdn
/
advanced
/
v1
/
logs
/
download
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
response = client.cdn.logs.download(
    format="format",
    from_="from",
    to="to",
)
print(response)
content = response.read()
print(content)
This response does not have an example.

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

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

Difference between "from" and "to" cannot exceed 6 hours.

Examples: * &from=2021-06-14T00:00:00Z * &from=2021-06-14T00:00:00.000Z

to
string
required

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

Difference between "from" and "to" cannot exceed 6 hours.

Examples: * &to=2021-06-15T00:00:00Z * &to=2021-06-15T00:00:00.000Z

offset
integer
default:0

Number of log records to skip starting from the beginning of the requested period.

limit
integer
default:10000

Maximum number of log records in the response.

Required range: x <= 10000
method__eq
string

Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.

method__ne
string

Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.

method__in
string

Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a comma.

method__not_in
string

Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a comma.

client_ip__eq
string

IP address of the client who sent the request.

client_ip__ne
string

IP address of the client who did not send the request.

client_ip__in
string

List of IP addresses of the clients who sent the request.

client_ip__not_in
string

List of IP addresses of the clients who did not send the request.

status__gt
integer

Status code in the response greater than the specified value.

status__gte
integer

Status code in the response greater than or equal to the specified value.

status__lt
integer

Status code in the response less than the specified value.

status__lte
integer

Status code in the response less than or equal to the specified value.

status__eq
integer

Status code in the response equal to the specified value.

status__ne
integer

Status code in the response not equal to the specified value.

status__in
string

List of status codes in the response. Values should be separated by a comma.

status__not_in
string

List of status codes not in the response. Values should be separated by a comma.

size__gt
integer

Response size in bytes greater than the specified value.

size__gte
integer

Response size in bytes greater than or equal to the specified value.

size__lt
integer

Response size in bytes less than the specified value.

size__lte
integer

Response size in bytes less than or equal to the specified value.

size__eq
integer

Response size in bytes equal to the specified value.

size__ne
integer

Response size in bytes not equal to the specified value.

size__in
string

List of response sizes in bytes. Values should be separated by a comma.

size__not_in
string

List of response sizes in bytes not equal to the specified values. Values should be separated by

cname__eq
string

Custom domain of the requested CDN resource.

cname__ne
string

Custom domain of the requested CDN resource not equal to the specified value.

cname__in
string

List of custom domains of the requested CDN resource. Values should be separated by a comma.

cname__not_in
string

List of custom domains of the requested CDN resource not equal to the specified values. Values should be separated by a comma.

cname__contains
string

Part of the custom domain of the requested CDN resource. Minimum length is 3 characters.

resource_id__gt
integer

ID of the requested CDN resource greater than the specified value.

resource_id__gte
integer

ID of the requested CDN resource greater than or equal to the specified value.

resource_id__lt
integer

ID of the requested CDN resource less than the specified value.

resource_id__lte
integer

ID of the requested CDN resource less than or equal to the specified value.

resource_id__eq
integer

ID of the requested CDN resource equal to the specified value.

resource_id__ne
integer

ID of the requested CDN resource not equal to the specified value.

resource_id__in
string

List of IDs of the requested CDN resource. Values should be separated by a comma.

resource_id__not_in
string

List of IDs of the requested CDN resource not equal to the specified values. Values should be separated by a comma.

cache_status__eq
string

Caching status. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.

cache_status__ne
string

Caching status not equal to the specified value. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.

cache_status__in
string

List of caching statuses. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by a comma.

cache_status__not_in
string

List of caching statuses not equal to the specified values. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by a comma.

datacenter__eq
string

Data center where request was processed.

datacenter__ne
string

Data center where request was not processed.

datacenter__in
string

List of data centers where request was processed. Values should be separated by a comma.

datacenter__not_in
string

List of data centers where request was not processed. Values should be separated by a comma.

sort
string

Sorting rules.

Possible values:

  • method - Request HTTP method.
  • client_ip - IP address of the client who sent the request.
  • status - Status code in the response.
  • size - Response size in bytes.
  • cname - Custom domain of the requested resource.
  • resource_id - ID of the requested CDN resource.
  • cache_status - Caching status.
  • datacenter - Data center where request was processed.
  • timestamp - Date and time when the request was made.

May include multiple values separated by a comma.

Example: * &sort=-timestamp,status

fields
string
default:timestamp,path,method,referer,user_agent,client_ip,status,size,cname,resource_id,cache_status,datacenter

A comma-separated list of returned fields.

Supported fields are presented in the responses section.

Example: * &fields=timestamp,path,status

format
string
required

Output format.

Possible values:

  • csv
  • tsv

Response

200 - application/zip

Successful.

The response is of type file.