Download System Log Files

Download one or multiple system log files.

Steps to download system log file(s)

Request URL

GET {base_url}/{api_path}/system_log/download?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
files Yes String The date-based file name(s) of the system log file(s).
Note:
  • You can query the file name using the Query System Log List interface.
  • Use a comma (,) to separate multiple file names.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
file String The unique name of the compressed system log file.
download_resource_url String The download URL of the compressed system log file.
Note: The download URL is only valid for 30 minutes.

Examples

Request example

Obtain the download URL of a system log (file name: 20240422).

GET /openapi/v1.0/system_log/download?access_token=aKKAw5bdgih4poMmbB8XSleFZc8JfrJs&files=20240422 HTTP/1.1 
Host: 192.168.5.150:8088
User-Agent: OpenAPI

Response example

HTTP/1.1 200 OK

{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "file": "PBX-SystemLog-x.15.0.x-download-20240422102614-RThAqlK33pk0d0Ya.tar",
    "download_resource_url": "/api/download/PBX-SystemLog-x.15.0.x-download-20240422102614-RThAqlK33pk0d0Ya.tar"
}

Download the system log file

After you get the download URL of the system log, you need to combine it with the {base_url} to compose a download request, and then send the request to download the system log.

Download link format

GET {base_url}/{download_resource_url}?access_token={access_token}

Download link example

GET https://192.168.5.150:8088/api/download/PBX-SystemLog-x.15.0.x-download-20240422102614-RThAqlK33pk0d0Ya.tar?access_token=MB1OklPar5hnDfhi4srZa8FrZ4znFSzr HTTP/1.1