Listing VM guest OS commands
GET /v2.1/servers/{server_id}/guest-agent/commands
List guest OS commands executed for the specified virtual machine.
Request
Parameters
| Name | In | Type | Description |
|---|---|---|---|
server_id
|
path | string | The UUID of the server. |
Example
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \ https://<node_IP_addr>:8774/v2.1/servers/<server_id>/guest-agent/commands
Response
Parameters
| Name | In | Type | Description |
|---|---|---|---|
commands
|
body | array | A list of guest OS command objects. |
uuid
|
body | string | The UUID of the command. |
type
|
body | string | Command type (exec, file-read, file-write). |
instance_uuid
|
body | string | The UUID of the server. |
status
|
body | string | Command execution status at the API level. |
created_at
|
body | string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm For example, The |
updated_at
|
body | string |
The date and time when the resource was updated. If the resource has not been updated, this field will be The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm For example, The |
error
|
body | string | Error description if the command failed. If the command succeeded, this field will be null. |
result
|
body | object |
Command execution result. The result is
|
pid
|
body | integer | Process ID of the command executed inside the guest operating system. |
exitcode
|
body | integer | Exit code returned by the executed process. A value of 0 indicates successful execution. Non-zero values indicate an error condition defined by the executed program. |
out_truncated
|
body | boolean | Indicates whether the captured standard output (stdout) was truncated due to the maximum output size limit. |
err_truncated
|
body | boolean | Indicates whether the captured standard error (stderr) was truncated due to the maximum output size limit. |
Status codes
Success
| Code | Reason |
|---|---|
200 - OK
|
Request was successful. |
Error
| Code | Reason |
|---|---|
401 - Unauthorized
|
User must authenticate before making a request. |
403 - Forbidden
|
Policy does not allow current user to do this operation. |
404 - Not Found
|
The requested resource could not be found. |
Example
{
"commands": [
{
"created_at": "2026-03-09T12:10:43Z",
"updated_at": "2026-03-09T12:10:43Z",
"uuid": "66d35df3-f112-4b38-9425-33e50b4500e7",
"type": "exec",
"instance_uuid": "5a124ea0-36a0-49b8-9bd0-e937d958ca8f",
"status": "SUCCESS",
"error": null,
"result": {
"pid": 5416,
"exitcode": 0,
"out_truncated": false,
"err_truncated": false
}
},
{
"created_at": "2026-03-09T12:11:48Z",
"updated_at": "2026-03-09T12:11:49Z",
"uuid": "9e2ba763-2540-4b77-9e0e-ee0274a1976e",
"type": "file-write",
"instance_uuid": "5a124ea0-36a0-49b8-9bd0-e937d958ca8f",
"status": "SUCCESS",
"error": null,
"result": {}
}
]
}