Development Document

Log Download Download PDF Document


Request URL: stat/log/getList (GET)

Endpoint Domain Name:
Endpoint Version: v2

Endpoint Description

Get the download URL of raw logs for the specified domain name.

Note: Logs are reserved for 14 days. Please make sure to download before the expiration. Request frequency limit can be found the response header, X-Ratelimit-Limit.

API Parameters

Note:Please request an API token from your BaishanCloud account team.

Request Parameters (GET)

Specify request parameters in the URL query strings, i.e. ?key1=value1&key2=value2.

ParameterData TypeRequirementDescription
domainsstringRequiredA single domain name. E.g.
start_timestringRequiredStart time, format (YYYY-MM-DD and YYYY-MM-DD HH:ii). If 2017-04-26 is the value, the system will interpret the start time as 2017-04-26 00:00.
end_timestringRequiredEnd time, format (YYYY-MM-DD and YYYY-MM-DD-HH:ii). If 2017-04-26 is the value, the system will interpret the end time as 2017-04-26 23:59.
with_typestringOptionalUse the value Video_log to retrieve live streaming logs. E.g.with_type=video_log
need_md5intOptional0: Default. Does not return MD5 data.
1: Download log data with MD5 information.
need_sizeintOptional0: Default. Does not return size data.
1: Download log data with size information.

Sample Request:

curl -X GET

Sample Response

    "code": 0, //0 = Success. Other code is displayed if the request failed. 
    "data": [
            "domain": "",
            "date": "2018-02-03 00:00",
            "type": "1",//1=General log, 2=Live streaming log
            "url": "http://xxxxx/cdnlog/"
            "md5": "12ee210scb41cfd6311ec22c2c9ssf64",
            "size": 4235  
Note: When the domain name does not have traffic, the returned data is empty.


Response Header

HTTP/1.0 200 OK
Api-Id:               63832415
Content-Type:          application/json; charset=utf-8
X-Ratelimit-Grad:      minute  
X-Ratelimit-Limit:     300  
X-Ratelimit-Remaining: 299   
X-Retry-After:         50     

HTTP Status Codes

Error CodeDescription
404Bad request URLs.
401Authorization Error: Invalid token or lack of access.
400Bad request parameters.
5xxPlease contact your account team.
CopyRight © 2015-2022 BaishanCloud . All Rights Reserved.