Allow /api/tools post to define history for tool state

#193 Declined
Repository
kellrott
Branch
tool_api_submit
Repository
galaxy
Branch
default
Author
  1. Kyle Ellrott
Reviewers
Description

Failure when posting tool run request via the /apt/tool port

File "galaxy-central/lib/galaxy/tools/parameters/basic.py", line 1519, in get_initial_value_from_history_prevent_repeats assert history is not None, "DataToolParameter requires a history" AssertionError: DataToolParameter requires a history

This patch passes the history listed in the payload to be used for the 'get_initial_value' calls, some of which require a selected history.

Comments (2)

  1. Kyle Ellrott author

    In addition, the 'from_html' method for 'DataToolParameter' now checks if the input value is a dictionary, which can define an encoded id. A valid /api/tool/<tool_name> payload would be

    {
        'tool_id': 'gtf2bedgraph',
        'history_id': '964b37715ec9bd22',
        'inputs': {
            'input': {
                'src': 'hda',
                'id': 'c8990a1b374598b0'
            },
            'attribute_name': 'exon_id'
        }
    }