Query Streaming Task Logs
View streaming task logs. (This interface requires HTTP/2; otherwise, stuttering or reconnection issues may occur).
GET
https://api.alayanew.com/api/serverless-train/v1/task/{id}/logsStream
Authorizations
Authorizations:StringHeaderRequired
用户可通过已获取Open API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。
Path Parameters
id:StringRequired
Task ID.
Query Parameters
worker:Int
The index of the worker, starting from 0.
from:Int
The starting line number, default is 1.
tail:Int
The number of lines to show from the end, default is 1000.
cURL
Python
JavaScript
Go
Java
curl --http2 -X GET 'https://api.alayanew.com/api/serverless-train/v1/task/506927a1-1883-4413-abad-0de1ff309023/logsStream?tail=1000'
-H 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'
200
400
401
403
404
500
2025-02-25 19:22:51.064 [ERROR] 117447
2025-02-25 19:22:52.064 [ERROR] 117448
2025-02-25 19:22:53.064 [ERROR] 117449
2025-02-25 19:22:54.064 [ERROR] 117450
2025-02-25 19:22:55.064 [ERROR] 117451
2025-02-25 19:22:56.065 [ERROR] 117452
2025-02-25 19:22:57.070 [ERROR] 117453
2025-02-25 19:22:58.066 [ERROR] 117454
2025-02-25 19:22:59.066 [ERROR] 117455
2025-02-25 19:23:00.067 [ERROR] 117456
2025-02-25 19:23:01.067 [ERROR] 117457
tip
如果from和tail都没有指定,日志将从第一行开始打印。