EdgeNext
Documentation home

EdgeNext Documentation

Product guides, setup instructions, and technical references.

CDN

Log Download

Endpoint

Request URL: stat/log/getList (GET)

API Host: cdn.api.edgenext.com

API Version: v2

Description

Retrieves download URLs for raw access logs of a specified domain.

Note: Log data is retained for 14 days. Rate limits are specified in the response headers.

Request Parameters

The following list only includes API-specific request parameters. Common request parameters must also be included for production calls. Common parameters: Tokens can be obtained from the on-call team.

GET Parameters

Parameters are appended to the URL query string, e.g. ?key1=value1&key2=value2.

Parameter Data Type Required Description
domain string Yes Single domain name, e.g. aa.qingcdn.com
start_time string Yes Start time. Format: YYYY-mm-dd or YYYY-mm-dd HH:iiWhen 2017-04-26 is passed, the start time is 2017-04-26 00:00:00
end_time string Yes End time. Format: YYYY-mm-dd or YYYY-mm-dd HH:iiWhen 2017-04-26 is passed, the end time is 2017-04-26 23:59:59
with_type string No Pass this parameter to query live streaming logs (video_log), e.g. with_type=video_log
need_md5 int No 0 (default): MD5 not returned1: Include MD5 checksum with log download data
need_size int No 0 (default): File size not returned1: Include file size with log download data

Example

curl -X GET "https://cdn.api.edgenext.com/v2/stat/log/getList?token=xxx&start_time=2018-02-03&end_time=2018-02-03&domain=aa.qingcdn.com&need_md5=1&need_size=1"

Response Example

JSON format:

{
    "code": 0, // 0 = success; non-zero = error
    "data": [
        {
            "domain": "aa.qingcdn.com",
            "date": "2018-02-03 00:00",
            "type": "1", // 1 = standard log, 2 = live streaming log
            "url": "http://xxxxx/cdnlog/aa.qingcdn.com/201802030000.gz?AWSAccessKeyId=v0l8ci2mrxowhnbz6e1q&Expires=1518197410&Signature=NvmPNmztJHO9C4ZIYZScH2wJO7s%3D"
            "md5": "12ee210scb41cfd6311ec22c2c9ssf64",
            "size": 4235  // Returns "size": "" when log size cannot be determined
        }
    ]
}

Note: Returns an empty data array when the domain has no traffic.

{
    "code": 0,
    "data": []
}

Response Headers

HTTP/1.0 200 OK
Api-Id:               63832415
Content-Type:          application/json; charset=utf-8
X-Ratelimit-Grad:      minute  // Rate limit granularity (minute/hour/day)
X-Ratelimit-Limit:     300  // Requests per minute limit
X-Ratelimit-Remaining: 299   // Remaining requests this minute
X-Retry-After:         50  // Seconds until the current rate limit window resets

HTTP Status Codes

Status Code Description
404 The requested URL is invalid
401 Authentication error — invalid token or API access not enabled
400 Invalid request parameters
200 Request succeeded, data returned
5xx Please contact the on-call team

Need help? Contact our support team at support@edgenext.com.

Back to documentation home