From ac8c1751a0a199ce9fb1e5d7b74c1dfcff642381 Mon Sep 17 00:00:00 2001
From: vermeul <swen@ethz.ch>
Date: Tue, 3 Dec 2019 16:50:46 +0100
Subject: [PATCH] started implementing get_dataset_files method

---
 pybis/src/python/pybis/dataset.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/pybis/src/python/pybis/dataset.py b/pybis/src/python/pybis/dataset.py
index 75c618b5af6..2b3009e986b 100644
--- a/pybis/src/python/pybis/dataset.py
+++ b/pybis/src/python/pybis/dataset.py
@@ -18,6 +18,7 @@ import time
 # needed for Data upload
 PYBIS_PLUGIN = "dataset-uploader-api"
 dataset_definitions = openbis_definitions('dataSet')
+dss_endpoint = '/datastore_server/rmi-data-store-server-v3.json'
 
 
 class DataSet(
@@ -202,6 +203,33 @@ class DataSet(
 
     set_props = set_properties
 
+    def get_dataset_files(self, **properties):
+
+
+        search_criteria = get_search_type_for_entity('datasetFiles')
+        search_criteria['criteria'] = sub_criteria
+        search_criteria['operator'] = 'AND'
+
+
+        request = {
+            "method": "searchFiles",
+            "params": [
+                self.token,
+                search_criteria,
+                fetchopts,
+            ],
+        }
+        resp = self._post_request(datastore.url dss_endpoint, request)
+
+        return self._dataset_list_for_response(
+            response=resp['objects'],
+            props=props,
+            start_with=start_with,
+            count=count,
+            totalCount=resp['totalCount'],
+        )
+
+
     def download(self, files=None, destination=None, wait_until_finished=True, workers=10,
         linked_dataset_fileservice_url=None, content_copy_index=0):
         """ download the actual files and put them by default in the following folder:
-- 
GitLab