Updated on 2025-11-17 GMT+08:00

Listing Redis Run Logs

Function

This API is used to query the Redis run logs.

URI

GET /v2/{project_id}/instances/{instance_id}/redislog

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

instance_id

Yes

String

Definition:

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition:

Offset, which indicates that the generated list is displayed from this offset. For example, if the offset is 3, the generated list is displayed from the fourth record.

Constraints:

N/A

Range:

≥ 0

Default Value:

0

limit

No

Integer

Definition:

Number of records displayed on each page.

Constraints:

N/A

Range:

1–1000

Default Value:

10

log_type

Yes

String

Definition:

Type of the return log.

Constraints:

N/A

Range:

run: Redis run logs.

Default Value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total_num

Integer

Definition:

Total number of logs.

Range:

N/A

file_list

Array of RunlogItem objects

Definition:

Run log list.

Table 4 RunlogItem

Parameter

Type

Description

id

String

Definition:

Unique ID of a run log.

Range:

N/A

file_name

String

Definition:

Run log file name.

Range:

N/A

group_name

String

Definition:

Shard name.

Range:

N/A

replication_ip

String

Definition:

IP address of the replica where the run logs are collected.

Range:

N/A

status

String

Definition:

Run log status.

Range:

N/A

time

String

Definition:

Date when run logs are collected. The format is yyyy-MM-dd.

Range:

N/A

backup_id

String

Definition:

Log file ID.

Range:

N/A

Status code: 204

Queried successfully and no log is found.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Example Requests

GET https://{dcs_endpoint}/v2/a4d31cb6-3d72-4fdc-8ec9-6e3a41e47f71/instances/5560df16-cebf-4473-95c4-d1b573c16e79/redislog?log_type=run&offset=1&limit=10&replication_id=50fa23b4-74d3-4d5c-98b9-39188a1f2daf

Example Responses

Status code: 200

Run logs queried successfully. If there is no log, 204 is returned.

{
  "total_num" : 1,
  "file_list" : [ {
    "id" : "e79f2d97-e972-41f2-b51c-d18f65f39a45",
    "file_name" : "redis_192.168.0.142_2021-04-16.log",
    "status" : "succeed",
    "time" : "2021-04-16",
    "replication_ip" : "192.168.0.142",
    "group_name" : "group-0",
    "backup_id" : "e79f2d97-e972-41f2-b51c-d18f65f39a45"
  } ]
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4800",
  "error_msg" : "Invalid logType."
}

Status Codes

Status Code

Description

200

Run logs queried successfully. If there is no log, 204 is returned.

204

Queried successfully and no log is found.

400

Invalid request.

401

Authentication failed.

403

Request rejected.

404

Incorrect path.

500

Internal error.

Error Codes

See Error Codes.