Updated on 2025-10-16 GMT+08:00

Querying All Logs

Function

This API is used to query all logs according to the deployment record ID.

Calling Method

For details, see Calling APIs.

URI

GET /v1/applications/{app_id}/records/{record_id}/logs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

app_id

Yes

String

Definition:

Application ID. Obtain the application list by calling the API forobtaining the application list. In the response body, result[0].id is the desired application list.

Constraints:

N/A

Range:

32 characters, including letters and digits.

Default Value:

N/A

record_id

Yes

String

Definition:

Deployment record ID. Obtain the historical deployment record list by calling the API forquerying the historical deployment record list of the specified application under a project according to the start time and end time. In the response body, result[0].execution_id is the desired historical deployment record list.

Constraints:

N/A

Range:

32 characters, including letters and digits.

Default Value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

Yes

String

Definition:

Log start offset.

Constraints:

N/A

Range:

1–19 digits.

Default Value:

N/A

end_offset

Yes

String

Definition:

Log end offset.

Constraints:

N/A

Range:

1–19 digits.

Default Value:

N/A

step_id

No

String

Definition:

Deployment action ID. Obtain the application details by calling the API fordeploying the application. In the response body, result.arrange_infos[0].steps.step1.id is the desired application list.

Constraints:

N/A

Range:

1 to 32 characters, including letters and digits.

Default Value:

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API used forObtaining a User Token.

Constraints:

N/A.

Value range:

String. Max. 20,000 characters.

Default value:

N/A.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

Object

Definition:

Log record result of the deployment application.

Range:

N/A

status

String

Definition:

Log query result.

Range:

  • success: Logs are queried successfully.

  • error: Query logs failed.

Table 5 QueryAppLogResult

Parameter

Type

Description

has_more

Boolean

Definition:

Whether there are more logs.

Range:

  • true: More logs are available. You can call this API again to query more logs.

  • false: No more logs. The log information remains unchanged when this API is called again.

text

String

Definition:

Log information.

Range:

N/A

offset

String

Definition:

Log start offset.

Range:

Digits only.

end_offset

String

Definition:

Log end offset, which is used as the offset parameter for querying subsequent logs.

Range:

Digits only.

Example Requests

Query all logs according to the deployment record ID.

https://{endpoint}/v1/applications/00105ecca9d142148f9807cf0cdebfef/records/03e60d39434648a2bb60cb8eb2817dde/logs?offset=0&end_offset=0

Example Responses

Status code: 200

OK indicates that full logs are successfully queried.

{
  "result" : {
    "has_more" : true,
    "text" : "[2024/09/26 10:57:37.290 GMT+08:00] [INFO]...",
    "offset" : "0",
    "end_offset" : "3354"
  },
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK indicates that full logs are successfully queried.

Error Codes

See Error Codes.