List Log Files

This API is used to list logs and download URLs with 5 minutes data sample. It will set values array is empty if no logs in the 5 minutes slot.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v1.1/log/list
  • Request Method
POST
  • Request Header

Refer to HTTP Request Headers

  • Request Body

Request Body Data Format: JSON

Field Required Type Description
domains Mandatory string[] Array of domain names. The domains length should not be greater than 10.
startTime Mandatory string Start time. Format yyyy-MM-ddTHH:mm:ssZ UTC time.
endTime Mandatory string End time. Format yyyy-MM-ddTHH:mm:ssZ UTC time. Interval between start time and end time cannot be longer than 24 hours.
fillFixedTime Optional boolean Boolean value, true or false. Fill in empty list for Values Array if no logs exist when fillFixedTime set true value. Default value: false.
  • Request Body Example
{
    "domains": [
        "www.example1.com",
        "www.example2.com"
    ],
    "startTime": "2018-11-01T17:00:00Z",
    "endTime": "2018-11-01T19:00:00Z"
}


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
Field Type Description
domain string Name of domain.
logs Log[] List of log file URLs.
ReqNumber Definition
timestamp string Format yyyy-MM-ddTHH:mm:ssZ UTC time. E.g. 2018-03-29T17:35:00Z will return data from 2018-03-29T17:35:00Z to 2018-03-29T17:39:59Z.
values LogFile[] Array of log download URL.
LogFile Definition
name string Log file name.
url string Log file download url. with query string "expire" and "sign" for download authentication. the expire time for url is 7 days.
size long Log file size, unit is byte.
  • Response Body Example
[
    {
        "domain": "www.example1.com",
        "logs": [
            {
                "timestamp": "2018-11-01T17:55:00Z",
                "values": [
                    {
                        "name": "20181101175500.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101175500.log.gz?expire=1656493304&sign=b7a786e4bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    },
                    {
                        "name": "20181101175500-1.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101175500-1.log.gz?expire=1656493304&sign=523270e4bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    },
                    {
                        "name": "20181101175500-2.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101175500-2.log.gz?expire=1656493304&sign=a3521b4bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    }
                ]
            },
            {
                "timestamp": "2018-11-01T18:00:00Z",
                "value": [
                    {
                        "name": "20181101180000.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101180000.log.gz?expire=1656493304&sign=ab327814bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    },
                    {
                        "name": "20181101180000-1.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101180000-1.log.gz?expire=1656493304&sign=361b76e4bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    },
                    {
                        "name": "20181101180000-2.log.gz",
                        "url": "https://cdn-dl.swiftfederation.com/www.example1.com/20181101/20181101180000-2.log.gz?expire=1656493304&sign=eb3a26e4bae7b86ef75e7d59a64a9be4bd695c45",
                        "size": 123223
                    }
                ]
            }
        ]
    }
]
           Updated 2024-08-26 07:42:13

results matching ""

    No results matching ""