查询训练任务事件
更新时间:2025-05-30
描述
获取一个任务系统事件。
请求结构
Bash
1POST ?action=DescribeJobEvents&resourcePoolId=xxxx
2Host:aihc.bj.baidubce.com
3Authorization:authorization string
4ContentType: application/json
5X-API-Version: v2
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 说明 |
---|---|---|---|---|
resourcePoolId | String | 是 | Query 参数 | 标识资源池的唯一标识符 |
jobId | String | 是 | Body 参数 | 训练任务ID |
startTime | String | 否 | Body 参数 | 获取任务事件的起始时间,默认为任务创建时间 |
endTime | String | 否 | Body 参数 | 获取任务事件的结束时间,默认为 now |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 说明 |
---|---|---|
requestId | String | 请求ID,用于标译每个请求的唯一性 |
events | List<Event> | 事件列表 |
total | Number | 事件的总数 |
返回示例
JSON
1{
2 "events": [
3 {
4 "reason": "SuccessfulCreatePod",
5 "message": "Created pod: test-training-job-0513-2-master-0",
6 "firstTimestamp": "2025-05-13 02:22:40 +0000 UTC",
7 "lastTimestamp": "2025-05-13 02:22:40 +0000 UTC",
8 "count": 1,
9 "type": "Normal"
10 },
11 {
12 "reason": "SuccessfulCreateService",
13 "message": "Created service: test-training-job-0513-2-worker-0",
14 "firstTimestamp": "2025-05-13 02:22:40 +0000 UTC",
15 "lastTimestamp": "2025-05-13 02:22:40 +0000 UTC",
16 "count": 1,
17 "type": "Normal"
18 },
19 {
20 "reason": "SuccessfulCreateService",
21 "message": "Created service: test-training-job-0513-2-master-0",
22 "firstTimestamp": "2025-05-13 02:22:40 +0000 UTC",
23 "lastTimestamp": "2025-05-13 02:22:40 +0000 UTC",
24 "count": 1,
25 "type": "Normal"
26 },
27 {
28 "reason": "SuccessfulCreatePod",
29 "message": "Created pod: test-training-job-0513-2-worker-0",
30 "firstTimestamp": "2025-05-13 02:22:40 +0000 UTC",
31 "lastTimestamp": "2025-05-13 02:22:40 +0000 UTC",
32 "count": 1,
33 "type": "Normal"
34 }
35 ],
36 "requestId": "570c5cf5-1c1f-4a7c-bc11-875bc757541f",
37 "total": 4
38}