Historical records
Updated at:2025-10-20
Query Execution History Details
API description
Query details of a specific command execution record or file uploading record.
Request structure
JSON
1GET /v1/ca/actionRun?id=r-KJoCY9kKa9******
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| id | String | Yes | Query | Execution ID |
| pageNo | int | No | Query | Response with the page No. of sub-execution records, and the default value is 1 |
| pageSize | int | No | Query | Response with the sub-execution record page size, the default value is 10, and the maximum is 100 |
| childRunState | String | No | Query | Filter records of sub-executions based on their statuses. Possible values: FAILED (execution failed), RUNNING (execution ongoing), SUCCESS (execution completed). |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| requestId | String | Execution details |
| code | String | Response state, where successful execution is indicated by success. |
| result | ActionRun | Execution details |
Request example
JSON
1GET /v1/ca/actionRun?id=r-N0UrpENajU******
Response example
JSON
1{
2 "requestId": "8b051243-0760-4776-b8b5-024309******",
3 "code": "success",
4 "result": {
5 "id": "r-N0UrpENajU******",
6 "state": "SUCCESS",
7 "action": {
8 "type": "COMMAND",
9 "name": "auto_run_1711100283",
10 "description": "",
11 "timeoutSecond": 300,
12 "command": {
13 "type": "SHELL",
14 "content": "echo 'hello world'",
15 "scope": "INDIVIDUAL",
16 "enableParameter": false,
17 "workDir": "/",
18 "execParams": {
19 "name": "value"
20 },
21 "user": "root"
22 },
23 "createdTimestamp": 1711100284000,
24 "updatedTimestamp": 1711100316000
25 },
26 "createdTimestamp": 1711100286000,
27 "finishedTimestamp": 1711100286000,
28 "children": [
29 {
30 "id": "d-vVnBql******",
31 "state": "SUCCESS",
32 "target": {
33 "instanceId": "i-mfIg****",
34 "instanceType": "BCC",
35 },
36 "createdTimestamp": 1711100286503,
37 "finishedTimestamp": 1711100286576,
38 "output": {
39 "exitCode": 0,
40 "stderr": "",
41 "stdout": "hello world\n",
42 "isTruncated": false
43 }
44 }
45 ],
46 "totalCount": 1
47 }
48}
Query execution record list
API description
Query list of command execution record or file uploading record.
Request structure
JSON
1POST /v1/ca/actionRun/list
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| action | RunFilter | Yes | RequestBody | Execution record filter |
| pageNo | int | Yes | RequestBody | Page No. |
| pageSize | int | Yes | RequestBody | Page size |
| ascending | bool | No | RequestBody | Is it sorted by execution start time in ascending order? It is false by default. |
| state | string | No | RequestBody | Filter records by execution status. Possible values: FAILED (execution failed), RUNNING (execution ongoing), SUCCESS (execution completed). |
| runId | string | No | RequestBody | Filter by execution ID |
| startTime | long | No | RequestBody | Filter records using timestamps in Unix format (milliseconds). Execution start time should be greater than or equal to endTime (Unix timestamp, milliseconds). |
| endTime | long | No | RequestBody | Filter records using timestamps in Unix format (milliseconds). Execution start time should be greater than or equal to endTime (Unix timestamp, milliseconds). |
RunFilter
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| type | string | Yes | RequestBody | Type of execution record. Possible values: COMMAND (command execution records), FILE_UPLOAD (file upload records). |
| id | string | No | RequestBody | Filter by command ID, valid only for command execution records |
| name | string | No | RequestBody | Filter by command name, valid only for command execution records |
| fileUpload | FileUploadFilter | No | RequestBody | Filter command uploading records |
FileUploadFilter
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| filename | string | Yes | RequestBody | Filter by uploaded file name |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| requestId | String | Execution details |
| code | String | Response state, where successful execution is indicated by success. |
| result | List<ActionRun> | Execution details |
Request example
JSON
1POST /v1/ca/actionRun/list
2Host:
3{
4 "ascending": false,
5 "pageNo": 1,
6 "pageSize": 10,
7 "action": {
8 "name": "test",
9 "type": "COMMAND"
10 },
11 "startTime": "1710777600000",
12 "endTime": "1711382399999"
13}
Response example
JSON
1{
2 "requestId": "f5c8cbf2-b66b-4894-b98d-dae6cb******",
3 "code": "success",
4 "result": {
5 "pageNo": 1,
6 "pageSize": 10,
7 "totalCount": 2,
8 "data": [
9 {
10 "id": "r-QWR6CCMVj0******",
11 "state": "SUCCESS",
12 "action": {
13 "type": "COMMAND",
14 "timeoutSecond": 60,
15 "command": {
16 "type": "SHELL",
17 "content": "ls",
18 "scope": "INDIVIDUAL",
19 "enableParameter": false,
20 "workDir": "/home",
21 "user": "root"
22 }
23 },
24 "createdTimestamp": 1710837417000,
25 "finishedTimestamp": 1710837419000,
26 "statistics": {
27 "totalTargetCount": 1,
28 "failedTargetCount": 0
29 }
30 },
31 {
32 "id": "r-vufYpbTTyd******",
33 "state": "SUCCESS",
34 "action": {
35 "id": "c-5iEoMgGqXL******",
36 "type": "COMMAND",
37 "name": "auto_test_1709896691",
38 "description": "",
39 "timeoutSecond": 300,
40 "command": {
41 "type": "SHELL",
42 "content": "echo 'hello world'",
43 "scope": "INDIVIDUAL",
44 "enableParameter": false,
45 "workDir": "/",
46 "user": "root"
47 }
48 },
49 "createdTimestamp": 1709896693000,
50 "finishedTimestamp": 1709896697000,
51 "statistics": {
52 "totalTargetCount": 1,
53 "failedTargetCount": 0
54 }
55 }
56 ]
57 }
58}
Appendix
ActionRun
| Parameter name | Types | Description |
|---|---|---|
| id | String | Execution ID |
| action | [Action](BCC/Cloud Assistant API Reference/Command Interface.md#Action) | Details of executed action |
| state | String | Execution status. Possible values: FAILED (execution failed), RUNNING (execution ongoing), SUCCESS (execution completed), PARTIAL_FAILED (partially failed). |
| createdTimestamp | long | Execution start time in Unix timestamp format, measured in milliseconds. |
| finishedTimestamp | long | Execution end time, available only after the execution is completed. Unix timestamp format, measured in milliseconds. |
| statistics | Statistics | Sub-execution state, responded only when querying the execution record list |
ChildRun
| Parameter name | Types | Description |
|---|---|---|
| id | String | Sub-execution ID |
| state | String | Execution status. Possible values: FAILED (execution failed), RUNNING (execution ongoing), SUCCESS (execution completed). |
| createdTimestamp | long | Start time for sub-execution, in Unix timestamp format (milliseconds). |
| finishedTimestamp | long | End time for sub-execution, available only after it is completed. Unix timestamp format (milliseconds). |
| failReason | String | Reasons for sub-execution failure |
| output | Output | Command output result |
| Target | [Target](BCC/Cloud Assistant API Reference/Command Interface.md#Target) | Instance information corresponding to sub-execution |
Output
| Parameter name | Types | Description |
|---|---|---|
| exitCode | int | Exit code |
| stdout | String | Standard output |
| stderr | String | Standard error |
| isTruncated | bool | The standard output or standard error is truncated due to excessive length (exceeding 4KB) |
Statistics
| Parameter name | Types | Description |
|---|---|---|
| totalTargetCount | int | Total count of executed instances |
| failedTargetCount | int | Total count of failed instances |
