commit/galaxy-central: jmchilton: API endpoint for reloading tool data tables (from Bjoern).
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/bcaffc4a0a61/ Changeset: bcaffc4a0a61 User: jmchilton Date: 2015-02-03 17:44:39+00:00 Summary: API endpoint for reloading tool data tables (from Bjoern). The endpoint isn't "RESTful" IMO - but it does match what we are doing for tools - so it is consistent which is more important. Affected #: 2 files diff -r 944074958b72d49757455a07a503024e631d15a6 -r bcaffc4a0a61d3d803cee45435548d0db0e59e54 lib/galaxy/webapps/galaxy/api/tool_data.py --- a/lib/galaxy/webapps/galaxy/api/tool_data.py +++ b/lib/galaxy/webapps/galaxy/api/tool_data.py @@ -28,6 +28,19 @@ @web.require_admin @expose_api + def reload( self, trans, id, **kwd ): + """ + GET /api/tool_data/{id}/reload + + Reloads a tool_data table. + """ + decoded_tool_data_id = id + data_table = trans.app.tool_data_tables.data_tables.get(decoded_tool_data_id) + return data_table.reload_from_files() + + + @web.require_admin + @expose_api def delete( self, trans, id, **kwd ): """ DELETE /api/tool_data/{id} diff -r 944074958b72d49757455a07a503024e631d15a6 -r bcaffc4a0a61d3d803cee45435548d0db0e59e54 lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -174,6 +174,7 @@ webapp.mapper.resource( 'tool_data', 'tool_data', path_prefix='/api' ) webapp.mapper.connect( '/api/tool_data/{id:.+?}/fields/{value:.+?}/files/{path:.+?}', action='download_field_file', controller="tool_data" ) webapp.mapper.connect( '/api/tool_data/{id:.+?}/fields/{value:.+?}', action='show_field', controller="tool_data" ) + webapp.mapper.connect( '/api/tool_data/{id:.+?}/reload', action='reload', controller="tool_data" ) webapp.mapper.resource( 'dataset_collection', 'dataset_collections', path_prefix='/api/') webapp.mapper.resource( 'sample', 'samples', path_prefix='/api' ) webapp.mapper.resource( 'request', 'requests', path_prefix='/api' ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org