openapi: 3.2.0 info: title: Seven Bridges Projects API version: unknown description: 'Operations tagged Projects across 2 of this provider''s published API definitions: seven-bridges-cgc-openapi.json, seven-bridges-platform-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://cgc-api.sbgenomics.com/v2 - url: https://api.sbgenomics.com/v2 security: - {} tags: - name: Projects paths: /projects/{owner}/{id}/files: get: summary: Get the list of files in a project description: /projects/{owner}/{id}/files operationId: get-the-list-of-files-in-a-project responses: '200': description: '200' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false tags: - Projects servers: - url: https://cgc-api.sbgenomics.com/v2 /projects/{project_owner}/{project}: get: summary: Get details of a project description: This call returns the details of a specified project. operationId: get-project-details parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](#section-project-short-names) of the project you are querying. schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\":\"http://api.sbgenomics.com/v2/projects/rfranklin/my-project\",\n \"id\":\"rfranklin/my-project\",\n \"name\":\"My Project\",\n \"type\":\"v2\",\n \"description\":\"This project contains data, completed analyses, and results.\\n\\\\Contains WGS, WES, and two different RNA-Seq read alignments - STAR and TopHat, fusion transcript detection analysis using ChimeraScan, FASTQ quality control and more.\\n\\n Open it up and take a look.\",\n \"tags\":[\n \"tag1\",\n \"tag2\"\n ],\n \"settings\":{\n \"locked\":false,\n \"use_interruptible_instances\":false,\n \"use_memoization\":true,\n \"intermediate_files\":{\n \"retention\":\"LIMITED\",\n \"duration\":24\n }\n },\n \"permissions\":{\n \"write\":true,\n \"read\":true,\n \"copy\":true,\n \"execute\":true,\n \"admin\":true\n },\n \"root_folder\":\"567890abc9b0307bc0414164\",\n \"billing_group\":\"ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7\",\n \"created_by\":\"rfranklin\",\n \"category\":\"PRIVATE\",\n \"created_on\":\"2017-07-04T12:40:00Z\",\n \"modified_on\":\"2019-05-20T12:49:34Z\"\n}" schema: type: object properties: href: type: string example: http://api.sbgenomics.com/v2/projects/rfranklin/my-project id: type: string example: rfranklin/my-project name: type: string example: My Project type: type: string example: v2 description: type: string example: "This project contains data, completed analyses, and results.\n\\Contains WGS, WES, and two different RNA-Seq read alignments - STAR and TopHat, fusion transcript detection analysis using ChimeraScan, FASTQ quality control and more.\n\n Open it up and take a look." tags: type: array items: type: string example: tag1 settings: type: object properties: locked: type: boolean example: false default: true use_interruptible_instances: type: boolean example: false default: true use_memoization: type: boolean example: true default: true intermediate_files: type: object properties: retention: type: string example: LIMITED duration: type: integer example: 24 default: 0 permissions: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: true default: true execute: type: boolean example: true default: true admin: type: boolean example: true default: true root_folder: type: string example: 567890abc9b0307bc0414164 billing_group: type: string example: ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7 created_by: type: string example: rfranklin category: type: string example: PRIVATE created_on: type: string example: '2017-07-04T12:40:00Z' modified_on: type: string example: '2019-05-20T12:49:34Z' deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send GET request to SB API\nproject = api.projects.get('rfranklin/my-project')\n\nprint(project.name)" samples-languages: - python tags: - Projects delete: summary: Delete a project description: This call deletes a project from the Seven Bridges Platform. It can only be successfully made if you have admin status for the project. operationId: delete-a-project parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](#section-project-short-names) of the project you are about to delete. schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: '' deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='RFranklin/my-project')\n\n# send DELETE request to SB API\nproject.delete()" samples-languages: - python tags: - Projects patch: summary: Edit a project description: 'This call edits a project on the Seven Bridges Platform. As a project Admin you can use it to change the name, settings, tags or billing group of the project. Users with `write` permissions in the project can change the project description.' operationId: edit-a-project parameters: - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](#section-project-short-names) of the project you are editing. schema: type: string required: true - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: name: type: string description: The name of the project you are creating. description: type: string description: Description of the project. billing_group: type: string description: The ID of the billing group for the project. [List all billing groups](ref:list-your-billing-groups) to find your billing group ID settings: type: object description: Contains detailed project settings. Expand for more details. properties: locked: type: boolean description: Set this field to `true` to lock down a project. Locking down a project prevents any Seven Bridges team member from viewing any information about the task. use_interruptible_instances: type: boolean description: Defines the use of [spot instances](doc:about-spot-instances). If not included in the request, spot instances are enabled by default. default: true use_memoization: type: boolean description: Set to `false` by default. Set to `true` to enable [memoization](doc:about-memoization). default: false use_elastic_disk: type: boolean description: Set to `true` to enable [Elastic disk](page:elastic-disk). intermediate_files: type: object properties: retention: type: string description: Specifies that intermediate files should be retained for a limited amount of time. The value is always `LIMITED`. default: LIMITED duration: type: integer description: Specifies [intermediate files](doc:about-memoization#section-intermediate-files) retention period in hours. The minimum value is 1. The maximum value is 120 and the default value is 24. default: 24 format: int32 tags: type: array description: The list of project tags. items: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"name\": \"my project\",\n \"description\": \"Updated with the results of the latest experiments\",\n \"settings\": {\n \"locked\": true,\n \"use_interruptible_instances\": false,\n \"use_memoization\": true,\n \"intermediate_files\": {\n \"retention\":\"LIMITED\",\n \"duration\":24\n }\n },\n \"tags\": [\"tag1\", \"tag2\"]\n}" schema: type: object properties: name: type: string example: my project description: type: string example: Updated with the results of the latest experiments settings: type: object properties: locked: type: boolean example: true default: true use_interruptible_instances: type: boolean example: false default: true use_memoization: type: boolean example: true default: true intermediate_files: type: object properties: retention: type: string example: LIMITED duration: type: integer example: 24 default: 0 tags: type: array items: type: string example: tag1 deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get('rfranklin/my-project')\n\n# change the attributes\nproject.name = 'my project'\nproject.description = 'Updated with the results of the latest experiments'\nproject.settings.locked = True\nproject.settings.use_interruptible_instances = False\nproject.settings.use_memoization = True\nproject.settings.intermediate_files = {\n 'retention': 'LIMITED',\n 'duration': 24\n}\nproject.tags = ['tag1', 'tag2']\n\n# send PATCH request to SB API\nproject.save()\n\nprint(project.description)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects: get: summary: List all your projects description: '' operationId: list-all-your-projects parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: name in: query description: Filter projects by the project name. The search is partial and case-insensitive. schema: type: string - name: offset in: query description: 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. schema: type: string default: '0' - name: limit in: query description: 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. schema: type: string default: '50' - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: tags in: query description: Filter project by project tags. Specify a comma-separated list of tags to return projects that have all of the specified tags. schema: type: array items: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\":\"https://api.sbgenomics.com/v2/projects?offset=0&limit=50\",\n \"items\":[\n {\n \"href\":\"https://api.sbgenomics.com/v2/projects/RFranklin/test\",\n \"id\":\"RFranklin/test\",\n \"name\":\"test\",\n \"created_by\":\"rfranklin\",\n \"category\":\"PRIVATE\",\n \"created_on\":\"2019-04-24T11:51:20Z\",\n \"modified_on\":\"2019-04-24T11:51:20Z\"\n },\n {\n \"href\":\"https://api.sbgenomics.com/v2/projects/RFranklin/sandbox\",\n \"id\":\"RFranklin/sandbox\",\n \"name\":\"sandbox\",\n \"created_by\":\"rfranklin\",\n \"category\":\"PRIVATE\",\n \"created_on\":\"2019-04-24T11:51:20Z\",\n \"modified_on\":\"2019-04-24T11:51:20Z\"\n },\n {\n \"href\":\"https://api.sbgenomics.com/v2/projects/RFranklin/my-project\",\n \"id\":\"RFranklin/my-project\",\n \"name\":\"my project\",\n \"created_by\":\"rfranklin\",\n \"category\":\"PRIVATE\",\n \"created_on\":\"2019-04-24T11:51:20Z\",\n \"modified_on\":\"2019-04-24T11:51:20Z\"\n }\n ],\n \"links\":[\n \n ]\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects?offset=0&limit=50 items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/RFranklin/test id: type: string example: RFranklin/test name: type: string example: test created_by: type: string example: rfranklin category: type: string example: PRIVATE created_on: type: string example: '2019-04-24T11:51:20Z' modified_on: type: string example: '2019-04-24T11:51:20Z' links: type: array deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send GET request to SB API\nall_projects = api.projects.query()\n\nfor project in all_projects:\n print(project.name)" samples-languages: - python tags: - Projects post: summary: Create a new project description: List the projects owned by and accessible to a particular user. Each project's ID and URL will be returned. Please keep in mind that you will only be able to list projects you are a member of. operationId: create-a-new-project parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: Content-Type in: header required: true schema: type: string default: application/json requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: The name of the project you are creating. description: type: string description: Description of the project. billing_group: type: string description: The ID of the billing group for the project. [List all billing groups](ref:list-your-billing-groups) to find your billing group ID. If not specified, the first billing group from the list of billing groups available to you available to you will be used. settings: type: object description: Contains detailed project settings. Expand for more details. properties: locked: type: boolean description: Set this field to `true` to lock down a project. Locking down a *project* prevents any Seven Bridges team member from viewing any information about the task. controlled: type: boolean description: Set this field to `true` to define this project as controlled i.e. one which will contain controlled data. Set `false` to define the project as open i.e. one which will contain open data. location: type: string description: 'Specify the location for this project: `aws:us-east-1` or `aws:us-west-2`' use_interruptible_instances: type: boolean description: Defines the use of [spot instances](doc:about-spot-instances). If not included in the request, spot instances are enabled by default. default: true use_memoization: type: string description: Set to `false` by default. Set to `true` to enable [memoization](doc:about-memoization). default: 'false' use_elastic_disk: type: string description: Set to `true` to enable [Elastic disk](page:elastic-disk). intermediate_files: type: object description: Defines the retention period for intermediate files. properties: retention: type: string description: Specifies that intermediate files should be retained for a limited amount of time. The value is always `LIMITED`. default: LIMITED duration: type: integer description: Specifies [intermediate files](doc:about-memoization#section-intermediate-files) retention period in hours. The minimum value is 1. The maximum value is 120 and the default value is 24. default: 24 format: int32 responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-new-project\",\n \"id\": \"rfranklin/my-new-project\",\n \"name\": \"My new project\",\n \"type\": \"v2\",\n \"description\": \"This is my new project\",\n \"tags\": [],\n \"category\": \"PRIVATE\",\n \"settings\": {\n \"locked\": false,\n \"controlled\": true,\n \"location\": \"aws:us-west-2\",\n \"use_interruptible_instances\": false,\n \"use_memoization\": true,\n \"intermediate_files\": {\n \"duration\": 24,\n \"retention\": \"LIMITED\"\n }\n },\n \"root_folder\": \"567890abc9b0307bc0414164\",\n \"billing_group\": \"ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7\"\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/my-new-project id: type: string example: rfranklin/my-new-project name: type: string example: My new project type: type: string example: v2 description: type: string example: This is my new project tags: type: array category: type: string example: PRIVATE settings: type: object properties: locked: type: boolean example: false default: true controlled: type: boolean example: true default: true location: type: string example: aws:us-west-2 use_interruptible_instances: type: boolean example: false default: true use_memoization: type: boolean example: true default: true intermediate_files: type: object properties: duration: type: integer example: 24 default: 0 retention: type: string example: LIMITED root_folder: type: string example: 567890abc9b0307bc0414164 billing_group: type: string example: ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7 deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send POST request to SB API\nnew_project = api.projects.create(\n name='My new project',\n description='This is my new project',\n billing_group='ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7',\n settings={\n 'locked': False,\n 'controlled': False,\n 'location': 'aws:us-west-2',\n 'use_interruptible_instances': False,\n 'use_memoization': True,\n 'intermediate_files': {\n 'retention': 'LIMITED',\n 'duration': 24\n }\n }\n)\n\nprint(new_project.name)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{project_owner}/{project}/members: get: summary: List members of a project description: "This call returns a list of the members of the specified project. For each member, the response lists:\n\n * The member's username on the Seven Bridges Platform\n * The member's permissions in the project specified" operationId: list-members-of-a-project parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The short name of the project you are querying. schema: type: string required: true - name: offset in: query description: 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. schema: type: integer format: int32 default: 0 - name: limit in: query description: 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. schema: type: integer format: int32 default: 50 responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members?offset=0&limit=50\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/jdoe\",\n \"id\": \"jdoe\",\n \"username\": \"jdoe\",\n \"email\": \"johndoe@email.com\",\n \"type\": \"USER\",\n \"permissions\": {\n \"write\": true,\n \"read\": true,\n \"copy\": true,\n \"execute\": true,\n \"admin\": true\n }\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/john.smith\",\n \"id\": \"john.smith\",\n \"username\": \"john.smith\",\n \"email\": \"john.smith@email.com\",\n \"type\": \"USER\",\n \"permissions\": {\n \"write\": true,\n \"read\": true,\n \"copy\": true,\n \"execute\": true,\n \"admin\": false\n }\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/francis.crick\",\n \"id\": \"fcrick\",\n \"username\": \"fcrick\",\n \"email\": \"fcrick@email.com\",\n \"type\": \"USER\",\n \"permissions\": {\n \"write\": true,\n \"read\": true,\n \"copy\": true,\n \"execute\": true,\n \"admin\": false\n }\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members?offset=0&limit=50 items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/jdoe id: type: string example: jdoe username: type: string example: jdoe email: type: string example: johndoe@email.com type: type: string example: USER permissions: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: true default: true execute: type: boolean example: true default: true admin: type: boolean example: true default: true links: type: array deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='1e43fEXampLEa5523dfd14exAMPle3e5')\n\nproject = api.projects.get(id='rfranklin/my-project')\n\n# send GET request to SB API\nmembers = project.get_members()\n\nfor member in members:\n print(member.username, member.permissions)" samples-languages: - python tags: - Projects post: summary: Add a member to a project description: "This call adds a new user to a specified project. It can only be successfully made by a user who has admin permissions in the project.\n\nUsers may have the following permissions on the Platform:\n * Read\n * Write\n * Copy\n * Execute\n * Admin\n\nFor more information, see the documentation on [setting project member permissions](ref:modify-a-project-members-permissions). Note that some user permissions imply others: for example, if you give a user admin permission, then they automatically receive read, write, copy and execute permissions." operationId: add-a-member-to-a-project parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The short name of the project you are adding someone to. schema: type: string required: true requestBody: content: application/json: schema: type: object required: - permissions properties: username: type: string description: The Seven Bridges Platform username of the person you want to add to the project. You should use either `username` (recommended) or `email`. email: type: string description: The email address of the person you want to add to the project. This has to be the email address that the person used when registering for an account on the Seven Bridges Platform. You should use either `username` (recommended) or `email`. permissions: type: object description: Array of key-value pairs. The keys are strings, and the values are Booleans. All members of a project have `read` permissions by default. Even if you try setting the `read` permission to `false`, it will still default to `true`. properties: write: type: boolean description: Whether the user should have the write permission. read: type: boolean description: Whether the user should have the read permission. copy: type: boolean description: Whether the user should have the copy permission. execute: type: boolean description: Whether the user should have the execute permission. admin: type: boolean description: Whether the user should have the admin permission. responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\":\"https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/Jane_Doe\",\n \"username\":\"Jane_Doe\",\n \"email\":\"jane_doe@address.com\",\n \"permissions\":{\n \"write\":true,\n \"read\":true,\n \"copy\":false,\n \"execute\":true,\n \"admin\":false\n }\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/Jane_Doe username: type: string example: Jane_Doe email: type: string example: jane_doe@address.com permissions: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true execute: type: boolean example: true default: true admin: type: boolean example: false default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='rfranklin/my-project')\n\n# send POST request to SB API\nnew_member = project.add_member(\n user='Jane_Doe',\n permissions={\n 'read': True,\n 'write': True,\n 'execute': False\n }\n)\n\nprint(new_member.username)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{owner}: get: summary: List projects owned by a particular user description: List the projects owned by and accessible to a particular user. Each project's ID and URL will be returned. Please keep in mind that you will only be able to list projects you are a member of. operationId: list-projects-owned-by-a-particular-user parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: name in: query description: Filter projects by the project name. The search is partial and case-insensitive. schema: type: string - name: offset in: query description: 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. schema: type: integer format: int32 default: 0 - name: limit in: query description: 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. schema: type: integer format: int32 default: 50 - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: tags in: query description: Filter project by project tags. Specify a comma-separated list of tags to return projects that have all of the specified tags. schema: type: array items: type: string - name: owner in: path description: The username of the owner whose projects you want to query. schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/Quickstart\",\n \"id\": \"rfranklin/Quickstart\",\n \"name\": \"Quickstart\",\n \"created_by\": \"rfranklin\",\n \"category\": \"PRIVATE\",\n \"created_on\": \"2017-07-18T11:19:48Z\",\n \"modified_on\": \"2017-07-18T11:19:48Z\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/projects/RFranklin/my-project\",\n \"id\": \"rfranklin/my-project\",\n \"name\": \"My project\",\n \"description\": \"testing testing.\\n* one\\n* two\\n* three\",\n \"created_by\": \"rfranklin\",\n \"category\": \"PRIVATE\",\n \"created_on\": \"2017-07-18T11:19:48Z\",\n \"modified_on\": \"2017-07-18T11:19:48Z\"\n }\n ]\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/Quickstart id: type: string example: rfranklin/Quickstart name: type: string example: Quickstart created_by: type: string example: rfranklin category: type: string example: PRIVATE created_on: type: string example: '2017-07-18T11:19:48Z' modified_on: type: string example: '2017-07-18T11:19:48Z' deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send GET request to SB API\nmy_projects = api.projects.query(owner='rfranklin')\n\nfor project in my_projects:\n print(project.name)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{project_owner}/{project}/members/{username}: delete: summary: Remove a project member description: 'This call removes a project member from a project. It can only be successfully run by a user who has admin privileges in the project. For more information on permissions on the Seven Bridges Platform, see the documentation on [setting permissions](ref:modify-a-project-members-permissions).' operationId: remove-a-project-member parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The short name of the project to access. schema: type: string required: true - name: username in: path description: The Seven Bridges Platform username of the user you are removing. schema: type: string required: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='rfranklin/my-project')\n\n# send DELETE request to SB API\nproject.remove_member(user='jane_doe')" samples-languages: - python tags: - Projects get: summary: Get a project member's permissions description: "This returns the permissions of a specified user within a specified project.\n\nUsers may have the following permissions on the Seven Bridges Platform:\n * Read\n * Write\n * Copy\n * Execute\n * Admin\n\nPermissions are granted at the project-level. You may, for instance, have admin permission in one project, execute permission in another, and read-only permission in a third.\n\nFor more information on permissions on the Seven Bridges Platform, see the documentation on [setting permissions](ref:modify-a-project-members-permissions)." operationId: get-a-project-members-permissions parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](ref:section-project-short-names) of the project to access. schema: type: string required: true - name: username in: path description: The Seven Bridges Platform username of the user whose permissions you are enquiring about. schema: type: string required: true - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/projects/rfranklin/my-project1/members/Jane_Doe\",\n \"username\": \"Jane_Doe\",\n \"email\": \"janedoe@address.com\",\n \"permissions\": {\n \"write\": true,\n \"read\": true,\n \"copy\": false,\n \"execute\": true,\n \"admin\": false\n }\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/projects/rfranklin/my-project1/members/Jane_Doe username: type: string example: Jane_Doe email: type: string example: janedoe@address.com permissions: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true execute: type: boolean example: true default: true admin: type: boolean example: false default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='rfranklin/my-project')\n\n# send GET request to SB API\nmember = project.get_member(username='jane_doe')\n\nprint(member.username, member.permissions)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{project_owner}/{project}/members/{username}/permissions: patch: summary: Modify a project member's permissions description: This call edits a user's permissions in a specified project. It can only be successfully made by a user who has admin permissions in the project. operationId: modify-a-project-members-permissions parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](ref:section-project-short-names) of the project containing the project member. schema: type: string required: true - name: username in: path description: The project member whose permissions you are editing. schema: type: string required: true - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: string requestBody: content: application/json: schema: type: object properties: read: type: boolean description: User can view file names, metadata, and workflows. They cannot view file contents. All members of a project have `read` permissions by default. Even if you try setting `read` permissions to `false`, they will still default to `true`. write: type: boolean description: User can add, modify, and remove files and workflows in a project. Set value to `true` to assign the user write permission. Set to `false` to remove write permission. copy: type: boolean description: User can view file content, copy, and download files from a project. Set value to `true` to assign the user copy permission. Set to `false` to remove copy permission. execute: type: boolean description: User can execute workflows and abort tasks in a project. Set value to `true` to assign the user execute permission. Set to `false` to remove execute permission. admin: type: boolean description: User can modify another user's permissions on a project, add or remove people from the project and manage funding sources. They also have all of the above permissions. Set value to `true` to assign the user admin permission. Set to `false` to remove admin permission. responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"write\": true,\n \"read\": true,\n \"copy\": false,\n \"execute\": false,\n \"admin\": false\n}" schema: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true execute: type: boolean example: false default: true admin: type: boolean example: false default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='RFranklin/test')\nmember = project.get_member(username='crick')\n\n# change permissions\nmember.permissions['write'] = True\n\n# send PATCH request to SB API\nmember.save()\n\nprint(member.username, member.permissions)" samples-languages: - python tags: - Projects put: summary: Overwrite a project member's permissions description: "This call changes a project member's permissions for a specified project.\n\nUsers may have the following permissions on the Seven Bridges Platform:\n * Read\n * Write\n * Copy\n * Execute\n * Admin\n\nFor more information, see the documentation on [setting project member permissions](ref:modify-a-project-members-permissions). Note that some user permissions imply others: for example, if you give a user admin permission, then they automatically receive read, write, copy and execute permissions." operationId: overwrite-a-project-members-permissions parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: project_owner in: path description: If you are using [Enterprise](doc:about-the-enterprise-feature), use the name of the Division that owns the project; otherwise, enter the project owner's Platform username. schema: type: string required: true - name: project in: path description: The [short name](ref:section-project-short-names) of the project containing the project member. schema: type: string required: true - name: username in: path description: The Seven Bridges Platform username of the user whose permissions you are overwriting. schema: type: string required: true - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string requestBody: content: application/json: schema: type: object required: - read - write - copy - execute - admin properties: read: type: boolean description: User can view file names, metadata, and workflows. They cannot view file contents. All members of a project have `read` permissions by default. Even if you try setting `read` permissions to `false`, they will still default to `true`. write: type: boolean description: User can add, modify, and remove files and workflows in a project. Set value to `true` to assign the user write permission. Set to `false` to remove write permission. copy: type: boolean description: User can view file content, copy, and download files from a project. Set value to `true` to assign the user copy permission. Set to `false` to remove copy permission. execute: type: boolean description: User can execute workflows and abort tasks in a project. Set value to `true` to assign the user execute permission. Set to `false` to remove execute permission. admin: type: boolean description: User can modify another user's permissions on a project, add or remove people from the project and manage funding sources. They also have all of the above permissions. Set value to `true` to assign the user admin permission. Set to `false` to remove admin permission. responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"write\": true,\n \"read\": true,\n \"copy\": false,\n \"execute\": false,\n \"admin\": false\n}" schema: type: object properties: write: type: boolean example: true default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true execute: type: boolean example: false default: true admin: type: boolean example: false default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='RFranklin/test')\nmember = project.get_member(username='crick')\n\n# set permissions\nmember.permissions = {\n 'read': True,\n 'write': True,\n 'copy': True,\n 'execute': True,\n 'admin': False\n}\n\n# send PATCH request to SB API; only modified fields will be sent\nmember.save()\n\nprint(member.username, member.permissions)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{project_owner}/{project}/files: get: summary: List files (secondary method) description: This call lists the files in the specified project. It is an alias for the call [list files](ref:list-files-primary-method) and redirects to that path. operationId: list-files-secondary-method-1 parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: project_owner in: path description: The owner of the project you are querying. schema: type: string required: true - name: project in: path description: The short name of the project you are querying. schema: type: string required: true - name: offset in: query description: 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. schema: type: integer format: int32 default: 0 - name: limit in: query description: 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. schema: type: integer format: int32 default: 50 responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/files/?offset=0&limit=25&project=rfranklin/my-project\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/files/567890abc9b0307bc0414164\",\n \"id\": \"568cf5dce4b0307bc0462060\",\n \"name\": \"my_reference.vcf\",\n \"project\": \"rfranklin/my-project\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/files/567890abc1e5339df0414123\",\n \"id\": \"566aad1de4b0c560b469ea80\",\n \"name\": \"_1_unsorted.bam\",\n \"project\": \"rfranklin/my-project\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/files/567890abc4f3066bc3750174\",\n \"id\": \"568cf5f4e4b0307bc0462062\",\n \"name\": \"unsorted.bam\",\n \"project\": \"rfranklin/my-project\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/files/?offset=0&limit=25&project=rfranklin/my-project items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/files/567890abc9b0307bc0414164 id: type: string example: 568cf5dce4b0307bc0462060 name: type: string example: my_reference.vcf project: type: string example: rfranklin/my-project links: type: array deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='rfranklin/my-project')\n\n# send GET request to SB API\nfiles = project.get_files()\n\nfor file in files:\n print(file.id, file.name)" name: Python samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 /projects/{project_owner}/{project}/tasks: get: summary: List tasks in a project (secondary method) description: This call lists the tasks in the specified project. It is an alias for the call to [get tasks](ref:list-tasks-you-can-access) and redirects to that path. operationId: list-tasks-in-a-project-secondary-method parameters: - name: X-SBG-Auth-Token in: header description: Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `` with your token before executing this call. required: true schema: type: string - name: fields in: query description: Selector specifying a subset of fields to include in the response. schema: type: array items: type: string - name: project in: path description: The [short name](the-api#section-project-short-names) of the project you are querying. schema: type: string required: true - name: project_owner in: path description: The owner of the project you are querying. schema: type: string required: true requestBody: content: application/json: schema: type: object properties: origin_id: type: string description: Enter an automation run ID to list all tasks created from the specified automation run. responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/tasks/?offset=0&limit=25&project=RFranklin/my-project\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/tasks/1fd125fa-789c-45b6-12b3-2a3ab3bedcba\",\n \"id\": \"1fd125fa-789c-45b6-12b3-2a3ab3bedcba\",\n \"name\": \"test run - 12-11-15 11:02:03\",\n \"project\": \"RFranklin/my-project\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/tasks/f0b89de2-45b6-789c-12b3-05b832c576c6\",\n \"id\": \"f0b89de2-45b6-789c-12b3-05b832c576c6\",\n \"name\": \"test run - 12-11-15 11:52:45\",\n \"project\": \"RFranklin/my-project\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/tasks/?offset=0&limit=25&project=RFranklin/my-project items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/tasks/1fd125fa-789c-45b6-12b3-2a3ab3bedcba id: type: string example: 1fd125fa-789c-45b6-12b3-2a3ab3bedcba name: type: string example: test run - 12-11-15 11:02:03 project: type: string example: RFranklin/my-project links: type: array deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\nproject = api.projects.get(id='RFranklin/my-project')\n\n# send GET request to SB API\ntasks = project.get_tasks()\n\nfor task in tasks:\n print(task.name, task.status, task.id)" samples-languages: - python tags: - Projects servers: - url: https://api.sbgenomics.com/v2 x-refined-from: - seven-bridges-cgc-openapi.json - seven-bridges-platform-openapi.json x-readme: headers: [] x-readme-fauxas: true