From a6eae3915001d9112ee4705a1ab99e4cf6705dd7 Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Fri, 18 Sep 2026 18:54:28 +0100 Subject: [PATCH] Document the query parameter of the live/logs/read endpoint Co-Authored-By: Claude Opus 5 (1M context) --- .../02 Read Live Algorithm/07 Logs/02 Request.html | 6 +++++- .../02 Read Live Algorithm/07 Logs/03 Responses.html | 4 ++-- QuantConnect-Platform-2.0.0.yaml | 9 +++++++-- Resources/qc-api/examples/read-live-algorithm.php | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/02 Request.html b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/02 Request.html index b6123989d1..ddca265e3a 100644 --- a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/02 Request.html +++ b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/02 Request.html @@ -27,6 +27,9 @@ deploymentLogs boolean
Indicates if only the given deployment logs should be included in the response. +query string
example: error

Case-insensitive keyword to filter the log lines. The startLine and endLine index the lines that contain the keyword. To read all the lines, omit it or set it to null or an empty string. + + Example
@@ -36,7 +39,8 @@
   "algorithmId": "L-6e9d8a78f5af89d401f630585be90e43",
   "startLine": 0,
   "endLine": 0,
-  "deploymentLogs": true
+  "deploymentLogs": true,
+  "query": "error"
 }
diff --git a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/03 Responses.html b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/03 Responses.html index 84486a46dc..cb2c43dd78 100644 --- a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/07 Logs/03 Responses.html @@ -14,10 +14,10 @@

200 Success

logs string Array
List of logs from the live algorithm. -length integer
Total amount of rows in the logs across all live deployments for this project. +length integer
Total amount of rows in the logs across all live deployments for this project that match the query. -deploymentOffset integer
Number of log rows before the given deployment (the `algorithmId` in the request). +deploymentOffset integer
Number of log rows before the given deployment (the `algorithmId` in the request). It counts all the rows, even if you provide a query. success boolean
Indicate if the API request was successful. diff --git a/QuantConnect-Platform-2.0.0.yaml b/QuantConnect-Platform-2.0.0.yaml index fe172e76d5..d92de2a695 100644 --- a/QuantConnect-Platform-2.0.0.yaml +++ b/QuantConnect-Platform-2.0.0.yaml @@ -6765,6 +6765,11 @@ components: deploymentLogs: type: boolean description: Indicates if only the given deployment logs should be included in the response. + query: + type: string + examples: + - error + description: Case-insensitive keyword to filter the log lines. The startLine and endLine index the lines that contain the keyword. To read all the lines, omit it or set it to null or an empty string. description: Request to read the logs of a specific algorithm. ReadLiveLogsResponse: type: object @@ -6776,10 +6781,10 @@ components: type: string length: type: integer - description: Total amount of rows in the logs across all live deployments for this project. + description: Total amount of rows in the logs across all live deployments for this project that match the query. deploymentOffset: type: integer - description: Number of log rows before the given deployment (the `algorithmId` in the request). + description: Number of log rows before the given deployment (the `algorithmId` in the request). It counts all the rows, even if you provide a query. success: type: boolean description: Indicate if the API request was successful. diff --git a/Resources/qc-api/examples/read-live-algorithm.php b/Resources/qc-api/examples/read-live-algorithm.php index 5455d25c37..1272c37b29 100644 --- a/Resources/qc-api/examples/read-live-algorithm.php +++ b/Resources/qc-api/examples/read-live-algorithm.php @@ -95,7 +95,8 @@ "algorithmId": deploy_id, # ID of the deployed algorithm (same as deploy_id) "format": "json", # Format of the logs (JSON in this case) "startLine": 0, # Starting line for logs - "endLine": 100 # Ending line for logs + "endLine": 100, # Ending line for logs + "query": None # Keyword to filter the lines, or None to read all of them } # Send a POST request to the /live/logs/read endpoint to get logs response = post(f'{BASE_URL}/live/logs/read', headers=get_headers(), json=payload)