DescribeCommandInvocations
1. API Description
This API is used to query the command execution list.
2. Input Parameters
The following request parameter list only provides API request parameters.
commandIds
No
Array of String
Query according to command ID.
invocationIds
No
Array of String
Query according to execution ID.
instanceIds
No
Array of String
Query according to instance ID.
pageSize
No
Integer
Number of items in the current page result.
Default value: 20;
Maximum value: 10000.
pageNum
No
Integer
Number of pages returned.
Default value: 1.
Value range: [1, +).
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
totalCount
Integer
Number of executions meeting the filtering conditions.
4. Code Example
Query the command execution list according to execution ID.
POST /api/v2/zos HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeCommandInvocations
<Common Request Params>
Request:
{
"invocationIds": ["<invocationId>"]
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"dataSet": [
{
"invocationId": "<invocationId>",
"commandId": "<commandId>",
"commandName": "Test Command",
"commandType": "SHELL",
"content": "echo 'hello world'",
"timeout": 0,
"createTime": "2025-10-17 14:31:25",
"invocationStatus": "Success",
"invocationInstances": [
{
"instanceId": "<instanceId>",
"instanceName": "Test",
"instanceExist": true,
"taskStatus": "Success",
"exitCode": 0,
"errorCode": null,
"output": "hello world",
"outputError": null,
"execStartTime": "2025-10-17 14:32:25",
"execEndTime": "2025-10-17 14:32:35"
}
]
}
],
"totalCount": 0
}
}5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
No error codes related to the API business logic. For other error codes, see Common Error Codes.
Last updated