Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<td width="20%">deploymentLogs</td> <td> <code>boolean</code> <br/> Indicates if only the given deployment logs should be included in the response.</td>
</tr>
<tr>
<td width="20%">query</td> <td> <code>string<br/><i><sub>example: error</sub></i></code> <br/> 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.</td>
</tr>
<tr>
<td width="20%">Example</td>
<td>
<div class="cli section-example-container"><pre>
Expand All @@ -36,7 +39,8 @@
"algorithmId": "L-6e9d8a78f5af89d401f630585be90e43",
"startLine": 0,
"endLine": 0,
"deploymentLogs": true
"deploymentLogs": true,
"query": "error"
}</pre>
</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ <h4>200 Success</h4>
<td width="20%">logs</td> <td> <code>string Array</code> <br/> List of logs from the live algorithm.</td>
</tr>
<tr>
<td width="20%">length</td> <td> <code>integer</code> <br/> Total amount of rows in the logs across all live deployments for this project.</td>
<td width="20%">length</td> <td> <code>integer</code> <br/> Total amount of rows in the logs across all live deployments for this project that match the query.</td>
</tr>
<tr>
<td width="20%">deploymentOffset</td> <td> <code>integer</code> <br/> Number of log rows before the given deployment (the `algorithmId` in the request).</td>
<td width="20%">deploymentOffset</td> <td> <code>integer</code> <br/> Number of log rows before the given deployment (the `algorithmId` in the request). It counts all the rows, even if you provide a query.</td>
</tr>
<tr>
<td width="20%">success</td> <td> <code>boolean</code> <br/> Indicate if the API request was successful.</td>
Expand Down
9 changes: 7 additions & 2 deletions QuantConnect-Platform-2.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion Resources/qc-api/examples/read-live-algorithm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading