Use post method instead of get method when invoking the unsetup method from the api...
[arvados.git] / apps / workbench / app / models / collection.rb
index cfbb6405041a41f5efb0de50f11ab6dbbf179835..6bc55bde3d21199fda4c31fa3143800d9b03c026 100644 (file)
@@ -1,4 +1,5 @@
 class Collection < ArvadosBase
+
   def total_bytes
     if files
       tot = 0
@@ -12,4 +13,17 @@ class Collection < ArvadosBase
   def attribute_editable?(attr)
     false
   end
+
+  def self.creatable?
+    false
+  end
+
+  def provenance
+    $arvados_api_client.api "collections/#{self.uuid}/", "provenance"
+  end
+
+  def used_by
+    $arvados_api_client.api "collections/#{self.uuid}/", "used_by"
+  end
+
 end