List folder contents

files/{folder_id}/list

Request

This call lists the contents of the specified folder.

https://api.sbgenomics.com/v2/files/{folder_id}/list
https://eu-api.sbgenomics.com/v2/files/{folder_id}/list

Example request

GET /v2/files/5fe5d580e4b01e2db0778182/list HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/json
curl -X GET -H "X-SBG-Auth-Token: c2e05946fb9a494ab5c19c72a94cb4ac" -H "Content-Type: application/json" "http://api.sbgenomics.com/v2/files/5fe5d580e4b01e2db0778182/list"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

folder = api.files.get(id='5fe5d580e4b01e2db0778182')

# send GET request to SB API
files = folder.list_files()

for file in files:
    print(file.name, file.type)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

Query parameters

limit

integer

The maximum number of collection items to return for a single request. Minimum value is 1. The maximum value is 100 and the default value is 50. This is a pagination-specific attribute.

offset

integer

The zero-based starting index in the entire collection of the first item to return. The default value is 0. This is a pagination-specific attribute.

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
  "href": "https://api.sbgenomics.com/v2/files/5fe5d580e4b01e2db0778182/list?offset=0&limit=5",
  "items": [
    {
      "href": "https://api.sbgenomics.com/v2/files/57fba0581c94d72f08ba054e",
      "id": "57fba0581c94d72f08ba054e",
      "name": "folder-name-1",
      "project": "rfranklin/my-project",
      "parent": "5fe5d580e4b01e2db0778182",
      "type": "FOLDER"
    },
    {
      "href": "https://api.sbgenomics.com/v2/files/57fba04c1c94d72f08ba054a",
      "id": "57fba04c1c94d72f08ba054a",
      "name": "file-name-1",
      "project": "rfranklin/my-project",
      "parent": "5fe5d580e4b01e2db0778182",
      "type": "FILE"
    },