How can I push down actions to nla strips with python? I'm trying to write a script that push down all actions in NLA-Editor. No matter how many actions exist, it should work.

This is the code I currently have:

bpy.context.area.type = "NLA_EDITOR"
bpy.ops.nla.action_pushdown(channel_index = 1)


My problem is that I don't know what channel_index each action has. How can I get this index? Or is there a way to iterate through all actions in in the nla editor?
I have the answer:

I don't Need to go to nla-editor, I just add a new track and a new Strip with the Action, which I get from my object.

for obj in bpy.context.scene.object:
    if obj.animation_data is not None:
        action = obj.animation_data.action
        if action is not None:
            track = obj.animation_data.nla_tracks.new()
            track.strips.new(action.name, action.frame_range[0], action)
            obj.animation_data.action = None