导出作业日志(DownloadTrainsPodLog)
更新时间:2025-05-08 07:50:27
仅限于未终止的作业。
基本信息
Action:/qai/aicp/trains/namespaces/{namespace}/endpoints/{endpoint}/download_logs
Method: GET
Content-Type:application/json
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
endpoint |
string |
任务类型,如 |
yes |
train_uuid |
string |
任务的 UUID |
yes |
namespace |
string |
命名空间名称。 |
yes |
query |
string |
查询关键字。 |
no |
pods_name |
array |
Pod 名称。 |
no |
start_time |
string |
开始时间。 |
no |
end_time |
string |
结束时间。 |
no |
container_name |
string |
容器名称。 |
no |
size |
integer |
返回日志条数。 |
no |
page |
integer |
页码,默认值为 1。 |
no |
reverse |
boolean |
是否按时间倒序排序。 |
no |
fuzzy |
boolean |
是否模糊查询,默认为 true,支持模糊查询。 |
no |
响应参数
此接口包含的公共响应参数,可参见前文内容,其他参数说明如下:
参数 | 类型 | 描述 |
---|---|---|
data |
string |
日志下载地址。 |
请求示例
curl -X 'GET' \
'https://ai.coreshub.cn/qai/aicp/trains/namespaces/usr-5HY8cxxx/endpoints/tfjobs/download_logs?train_uuid=tn-ehjysfi2my2o&size=100&page=1&reverse=true&fuzzy=true' \
-H 'accept: application/json'
响应示例
{
"message": "success",
"meta": {
"X_REQUEST_ID": "6642d088",
"X_REQUEST_USER": "usr-5HY8xxxx"
},
"data": "https://ai.coreshub.cn/aicp/download/d94c5165-199b-4b91-bf77-518f8f953d79?zone=xb3a&download_name=20250414151936.log",
"ret_code": 0
}