script_execution_output_get
Tech
Returns the stdout and stderr output of a script execution.
Params
| attribute |
description |
filter* Filter |
Filter defining what executions to retrieve |
pagination* Pagination |
Defines the subset to return |
Filter
| attribute |
description |
execution_id* unsigned int |
The ID of the script execution that produced the output |
Selection rules for extracting lines from total result set:
- If
id_exclusive is set, selection starts from the next higher ID.
- If
id_exclusive is missing, selection starts from the lowest available ID.
The records are always sorted by id in ascending order.
| attribute |
description |
limit* unsigned int; 1 – 1000 |
The maximum number of lines to return |
id_exclusive unsigned int |
The line immediately preceding the requested result set |
Example
{
"filter": {
"execution_id": 56
},
"pagination": {
"limit": 0,
"id_exclusive": 10324
}
}
Return
| attribute |
description |
execution Execution |
The script execution |
lines [Line] |
The output lines |
Execution
| attribute |
description |
id* unsigned int |
The ID of the script execution |
script_name* string |
The name of the script |
instance_name* string |
The name of the script instance |
start_timestamp* unsigned int |
The Unix timestamp of the start of the script instance |
start_trigger* Start Trigger |
The trigger that started the script instance |
state* "running"|"terminating"|"finished"|"killed" |
The state of the script instance |
arguments string |
The arguments passed to the script instance |
duration unsigned int |
The duration of the script instance in milliseconds. If the script is in state running or terminating this field must not be set. |
exit_code int |
The exit code of the script instance. If the script is in state running or terminating this field must not be set. |
stop_trigger Stop Trigger |
The trigger that stopped the script instance. If the script is in state running this field must not be set. |
is_outdated bool |
Indicates whether executed with a script source version that has been changed since. |
Line
| attribute |
description |
id* unsigned int |
The line unique ID; it corresponds to line number in the output |
content* string |
The line content |
Example
{
"execution": {
"id": 1234,
"script_name": "hello_world",
"instance_name": "verbose",
"start_timestamp": 1743335196,
"arguments": "-v --arg1 value1",
"start_trigger": {
"type": "xpath",
"setting": "/networking/eth0"
},
"stop_trigger": {
"type": "system"
},
"state": "killed",
"duration": 60,
"exit_code": -9
},
"lines": [
{
"id": 10325,
"content": "Script started"
},
{
"id": 10326,
"content": "Performing operation..."
},
{
"id": 10340,
"content": "Script aborted"
}
]
}