This call returns a list of files and subdirectories in a specified project or directory within a project, with specified properties that you can access. The project or directory whose contents you want to list is specified as a query parameter in the call. Further properties to filter by can also be specified as query parameters.
Note that this call lists both files and subdirectories in the specified project or directory within a project, but not the contents of the subdirectories. To list the contents of a subdirectory, make a new call and specify the subdirectory ID as the parent
parameter.
Don't forget that projects on the Platform are specified by their short names.
Further file properties to filter by can also be specified as query parameters.
If you are using Seven Bridges Platform EU, please use the following endpoint:
https://eu-api.sbgenomics.com/v2/files
File IDs
The file IDs returned by this call are useful for issuing further queries to get more information about a particular file.
Alias call
There is a second method for listing files in a project:
GET projects/{project_owner}/{project_name}/files
. The call listed here is the primary and preferred method for performing this operation.
Tips for filtering
When filtering on any resource, including the same field several times with different filtering criteria results in an implicit
OR
operation for that field and the different criteria.When filtering by different specified fields, an implicit
AND
is performed between those criteria. Thus, the call in Example 3 above would return files matching the specified project AND sample ID AND library.
List files in the Public Reference Files repository
The Seven Bridges Public Reference Files repository is specified in the same way as a project on the Platform by an id of
admin/sbg-public-data
. You can pass this query parameter usingproject=admin/sbg-public-data
.
Limit your results
Don't forget that you can use the pagination query parameter
limit
to restrict the number of files returned by this call.
Set the query parameter
fields
to_all
to display tags within the response body, since tags is not automatically displayed in the response body.