Commits

Enis Afgan committed 87be4c8

Fix API history purge; a few documentation corrections

  • Participants
  • Parent commits aaf5c82

Comments (0)

Files changed (3)

File lib/galaxy/web/api/histories.py

 
         history.deleted = True
         if purge and trans.app.config.allow_user_dataset_purge:
+            # First purge all the datasets
             for hda in history.datasets:
                 if hda.purged:
                     continue
                     except:
                         pass
                     trans.sa_session.flush()
+            # Now mark the history as purged
+            history.purged = True
+            self.sa_session.add( history )
 
         trans.sa_session.flush()
         return 'OK'
     @web.expose_api
     def undelete( self, trans, id, **kwd ):
         """
-        POST /api/histories/deleted/{encoded_quota_id}/undelete
-        Undeletes a quota
+        POST /api/histories/deleted/{encoded_history_id}/undelete
+        Undeletes a history
         """
         history_id = id
         history = self.get_history( trans, history_id, check_ownership=True, check_accessible=False, deleted=True )

File lib/galaxy/web/api/users.py

     @web.expose_api
     def create( self, trans, payload, **kwd ):
         """
-        /api/users
+        POST /api/users
         Creates a new Galaxy user.
         """
         if not trans.app.config.allow_user_creation:

File scripts/api/library_upload_from_import_dir.py

 #!/usr/bin/env python
-
+"""
+Example usage:
+./library_upload_from_import_dir.py <key> http://127.0.0.1:8080/api/libraries/dda47097d9189f15/contents Fdda47097d9189f15 auto /Users/EnisAfgan/projects/pprojects/galaxy/lib_upload_dir ?
+"""
 import os, sys
 sys.path.insert( 0, os.path.dirname( __file__ ) )
 from common import submit