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
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 |
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
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
Parameter |
Type |
Description |
---|---|---|
result |
Object |
Definition: Log record result of the deployment application. Range: N/A |
status |
String |
Definition: Log query result. Range: |
Parameter |
Type |
Description |
---|---|---|
has_more |
Boolean |
Definition: Whether there are more logs. Range: |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot