zhangshenghang commented on code in PR #7818:
URL: https://github.com/apache/seatunnel/pull/7818#discussion_r1807552984
##########
docs/en/seatunnel-engine/rest-api-v2.md:
##########
@@ -740,3 +740,69 @@ If the parameter is an empty `Map` object, it means that
the tags of the current
```
</details>
+------------------------------------------------------------------------------------------
+
+### Get Logs from All Nodes
+
+<details>
+ <summary><code>GET</code> <code><b>/logs/:jobId</b></code> <code>(Returns a
list of logs.)</code></summary>
+
+#### Request Parameters
+
+#### Parameters (to be added in the `params` field of the request body)
+
+> | Parameter Name | Required | Type | Description
|
+>
|-----------------------|--------------|---------|------------------------------------|
+> | jobId | optional | string | job id
|
+
+If `jobId` is empty, the request will return logs from all nodes. Otherwise,
it will return the list of logs for the specified `jobId` from all nodes.
+
+#### Response
+
+Returns a list of logs from the requested nodes along with their content.
+
+#### Return List of All Log Files
+
+If you want to view the log list first, you can retrieve it via a `GET`
request: `http://localhost:8080/seatunnel/logs?format=json`
+
+```json
+[
+ {
+ "node": "localhost:8080",
+ "logLink":
"http://localhost:8080/seatunnel/logs/job-899485770241277953.log",
+ "logName": "job-899485770241277953.log"
+ },
+ {
+ "node": "localhost:8080",
+ "logLink":
"http://localhost:8080/seatunnel/logs/job-899470314109468673.log",
+ "logName": "job-899470314109468673.log"
+ }
+]
+```
+
+Supported formats are `json` and `html`, with `html` as the default.
+
+#### Examples
+
+Retrieve logs for `jobId` `733584788375666689` across all nodes:
`http://localhost:8080/logs/733584788375666689`
+Retrieve the list of logs from all nodes: `http://localhost:8080/logs`
+Retrieve the list of logs in JSON format:
`http://localhost:8080/logs?format=json`
+Retrieve the content of a specific log file:
`http://localhost:8080/logs/job-898380162133917698.log`
+
+</details>
+
+### Get Log Content from a Single Node
+
+<details>
+ <summary><code>GET</code> <code><b>/hazelcast/rest/maps/log</b></code>
<code>(Returns a list of logs.)</code></summary>
+
+#### Response
+
+Returns a list of logs from the requested node.
+
+#### Examples
Review Comment:
> Can I use `http://localhost:5801/log/12345` to get `job 12345`'s logs in
current node?
Currently not supported, /log can only be matched accurately
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]