View a Summary of Children Events
/api/v2/jobs/{id}/job_events/children_summary/
Special view to facilitate processing job output in the UI. In order to collapse events and their children, the UI needs to know how many children exist for a given event. The UI also needs to know the order of the event (0 based index), which usually matches the counter, but not always. This view returns a JSON object where the key is the event counter, and the value includes the number of children (and grandchildren) events. Only events with children are included in the output.
Example
e.g. Demo Job Template job tuple(event counter, uuid, parent_uuid)
(1, '00000000-0000-0000-0000-000000000000', '')
(2, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(3, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(4, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(5, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(6, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(7, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(8, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
(9, '00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000')
output
{
"1": {
"rowNumber": 0,
"numChildren": 8
},
"2": {
"rowNumber": 1,
"numChildren": 6
},
"3": {
"rowNumber": 2,
"numChildren": 2
},
"6": {
"rowNumber": 5,
"numChildren": 2
}
}
"meta_event_nested_parent_uuid": {}
}
counter 1 is event 0, and has 8 children counter 2 is event 1, and has 6 children etc.
The UI also needs to be able to collapse over "meta" events -- events that show up due to verbosity or warnings from the system while the play is running. These events have a 0 level event, with no parent uuid.
playbook_on_start
verbose
playbook_on_play_start
playbook_on_task_start
runner_on_start <- level 3
verbose <- jump to level 0
verbose
runner_on_ok <- jump back to level 3
playbook_on_task_start
runner_on_start
runner_on_ok
verbose
verbose
playbook_on_stats
These verbose statements that fall in the middle of a series of children events are problematic for the UI. To help, this view will attempt to place the events into the hierarchy, without the event level jumps.
playbook_on_start
verbose
playbook_on_play_start
playbook_on_task_start
runner_on_start <- A
verbose <- this maps to the uuid of A
verbose
runner_on_ok
playbook_on_task_start <- B
runner_on_start
runner_on_ok
verbose <- this maps to the uuid of B
verbose
playbook_on_stats
The output will include a JSON object where the key is the event counter, and the value is the assigned nested uuid.
Request
- application/json
Response
- application/json