openapi: 3.2.0 info: title: Seven Bridges Storage API version: unknown description: 'Operations tagged Storage 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: Storage paths: /storage/exports/{export_id}: get: summary: Get details of an export job description: '' operationId: get-details-of-an-export-job-v2 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: - Storage servers: - url: https://cgc-api.sbgenomics.com/v2 /storage/volumes/{volume_id}/list: get: summary: List the contents of a volume description: '' operationId: list-the-contents-of-a-volume 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: - Storage servers: - url: https://cgc-api.sbgenomics.com/v2 /v2/storage/volumes/{volume_id}/{object_id}: get: summary: Get details of a file within a volume description: '' operationId: get-details-of-a-file-within-a-volume 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: - Storage servers: - url: https://cgc-api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}/{object_id}: get: summary: Get details of a file within a volume description: This call lists the details of a file (object) in a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). operationId: get-details-of-a-file-within-a-volume parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true - name: object_id in: path description: This is the `href` from the request to [list the contents of a volume](ref:list-the-contents-of-a-volume). schema: type: string required: true - 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: Content-type in: header schema: type: string default: application/json responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://gcp-api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/object?location=20.intervals\",\n \"location\": \"20.intervals\",\n \"volume\": \"rfranklin/my-first-volume\",\n \"type\": \"gcs\",\n \"metadata\": {\n \"bucket\": \"example-bucket\",\n \"contentType\": \"binary/octet-stream\",\n \"crc32c\": \"D5ETaQ==\",\n \"etag\": \"CNrand0Mvc0CEAE=\",\n \"generation\": 1466668676135000,\n \"id\": \"example-bucket/input-files/20.intervals/12345678676135000\",\n \"kind\": \"storage#object\",\n \"md5Hash\": \"0SevLZ/y5a/TiHXpzkfX0A==\",\n \"mediaLink\": \"https://www.googleapis.com/download/storage/*********\",\n \"metageneration\": 1,\n \"name\": \"input-files/20.intervals\",\n \"selfLink\": \"https://www.googleapis.com/storage/v1/b/example-bucket/o/input-files%2F20.intervals\",\n \"size\": 9,\n \"storageClass\": \"STANDARD\",\n \"timeCreated\": {\n \"value\": 1466668676132,\n \"dateOnly\": false,\n \"timeZoneShift\": 0\n },\n \"updated\": {\n \"value\": 1466668676132,\n \"dateOnly\": false,\n \"timeZoneShift\": 0\n },\n \"timeStorageClassUpdated\": \"2016-06-23T07:57:56.132Z\"\n }\n}" schema: type: object properties: href: type: string example: https://gcp-api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/object?location=20.intervals location: type: string example: 20.intervals volume: type: string example: rfranklin/my-first-volume type: type: string example: gcs metadata: type: object properties: bucket: type: string example: example-bucket contentType: type: string example: binary/octet-stream crc32c: type: string example: D5ETaQ== etag: type: string example: CNrand0Mvc0CEAE= generation: type: integer example: 1466668676135000 default: 0 id: type: string example: example-bucket/input-files/20.intervals/12345678676135000 kind: type: string example: storage#object md5Hash: type: string example: 0SevLZ/y5a/TiHXpzkfX0A== mediaLink: type: string example: https://www.googleapis.com/download/storage/********* metageneration: type: integer example: 1 default: 0 name: type: string example: input-files/20.intervals selfLink: type: string example: https://www.googleapis.com/storage/v1/b/example-bucket/o/input-files%2F20.intervals size: type: integer example: 9 default: 0 storageClass: type: string example: STANDARD timeCreated: type: object properties: value: type: integer example: 1466668676132 default: 0 dateOnly: type: boolean example: false default: true timeZoneShift: type: integer example: 0 default: 0 updated: type: object properties: value: type: integer example: 1466668676132 default: 0 dateOnly: type: boolean example: false default: true timeZoneShift: type: integer example: 0 default: 0 timeStorageClassUpdated: type: string example: '2016-06-23T07:57:56.132Z' 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\n\n# send GET request to SB API\nvolume_object = volume.get_volume_object_info(location='20.intervals')\n\nprint(volume_object.location)" samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes: post: summary: Create a volume description: "This call creates a new volume. Volumes authorize the Platform to access and query objects on a specified cloud storage (Amazon Web Services or Google Cloud Storage) on your behalf. \n\nLearn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial). These tutorials also detail how to configure your bucket." operationId: create-a-volume-v2 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: Content-Type in: header schema: type: string default: application/json requestBody: content: application/json: schema: type: object required: - name - service properties: name: type: string description: The name of the volume. It must be unique from all other volumes for this user. access_mode: type: string description: Signifies whether this volume should be used for read-write (`RW`) or read-only (`RO`) operations. The access mode is consulted independently of the credentials granted to Seven Bridges when the volume was created, so it is possible to use a read-write credentials to register both read-write and read-only volumes using it. _default:_ `"RW"` description: type: string description: An optional description of this volume. service: type: object description: This object should contain the information about the cloud service that this volume represents. required: - bucket properties: type: type: string description: The type of cloud service. Use `s3` for Amazon Web Services or `gcs` for Google Cloud Storage. prefix: type: string description: A service-specific prefix to prepend to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file. bucket: type: string description: The name of the AWS S3 or GCS bucket you wish to register as a volume. endpoint: type: string description: '**AWS only!** AWS API endpoint to use when accessing this bucket. For a list of AWS-supported endpoints, see AWS Regions and Endpoints. Default: `s3.amazonaws.com`' root_url: type: string description: '**GCS only!** Google Cloud Storage API endpoint for accessing this bucket. Default: `https://www.googleapis.com`.' credentials: type: object description: 'Contains credentials for the underlying cloud provider. AWS IAM user: * `access-key-id` * `secret_access-key`' properties: access_key_id: type: string description: '**AWS only!** AWS access key ID of the IAM user shared with Seven Bridges to access this bucket.' secret_access_key: type: string description: '**AWS only!** AWS secret access key of the IAM user shared with Seven Bridges to access this bucket.' client_email: type: string description: '**GCS only!** The client email address for the Google Cloud service account to use for operations on this bucket. This can be found in the JSON containing your service account credentials.' private_key: type: string description: '**GCS only!** Google Cloud Platform private key.' properties: type: object description: Contains the properties of a specific service. These values set the defaults for operations performed with this volume. **Individual** operations can override these defaults by providing a custom `properties` object. properties: sse_algorithm: type: string description: 'S3 server-side encryption to use when exporting to this bucket. Supported values: * `AES256` (SSE-S3 encryption) * ''aws:kms` * null (no server-side encryption). _default: `AES256`_' sse_aws_kms_key_Id: type: string description: 'Applies to type: `s3`. If AWS KMS encryption is used, this should be set to the required KMS key. If not set and `aws:kms` is set as `sse_algorithm`, default KMS key is used.' aws_canned_acl: type: string description: 'S3 canned ACL to apply on the object on during export. Supported values: * any one of [S3 canned ACLs](http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl); * `null` (do not apply canned ACLs). _default: `null`_' responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/my_volume\",\n \"id\": \"rfranklin/my_volume\",\n \"name\": \"my_volume\",\n \"access_mode\": \"RO\",\n \"service\": {\n \"type\": \"S3\",\n \"bucket\": \"sb-demo-rfranklin-ro\",\n \"prefix\": \"input-files\",\n \"endpoint\": \"s3.amazonaws.com\",\n \"credentials\": {\n \"access_key_id\": \"REDACTED_AWS_ACCESS_KEY_ID\"\n },\n \"properties\": {\n \"sse_algorithm\": \"aws:kms\",\n \t\t\t\t\t\"sse_aws_kms_key_id\": \"test_kms_key_id\"\n }\n },\n \"created_on\": \"2017-07-21T08:23:39Z\",\n \"modified_on\": \"2017-07-21T08:23:39Z\",\n \"active\": true\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/my_volume id: type: string example: rfranklin/my_volume name: type: string example: my_volume access_mode: type: string example: RO service: type: object properties: type: type: string example: S3 bucket: type: string example: sb-demo-rfranklin-ro prefix: type: string example: input-files endpoint: type: string example: s3.amazonaws.com credentials: type: object properties: access_key_id: type: string example: REDACTED_AWS_ACCESS_KEY_ID properties: type: object properties: sse_algorithm: type: string example: aws:kms sse_aws_kms_key_id: type: string example: test_kms_key_id created_on: type: string example: '2017-07-21T08:23:39Z' modified_on: type: string example: '2017-07-21T08:23:39Z' active: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api, VolumeAccessMode\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send POST request to SB API\nnew_volume = api.volumes.create_s3_volume(\n name='my_s3_volume',\n bucket='input_files',\n access_key_id='REDACTED_AWS_ACCESS_KEY_ID',\n secret_access_key='wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',\n access_mode=VolumeAccessMode.READ_ONLY,\n properties={\n 'sse_algorithm': 'aws:kms',\n 'sse_aws_kms_key_id': 'test_kms_key_id'\n }\n)\n\nprint(new_volume.name, new_volume.id)" name: Python (AWS IAM user) - language: python code: "from sevenbridges import Api, VolumeAccessMode\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send POST request to SB API\nnew_volume = api.volumes.create_google_volume(\n name='my_gcs_volume',\n bucket='output_files',\n client_email='user@service.iam.gserviceaccount.com',\n private_key='REDACTED_PRIVATE_KEY_EXAMPLE',\n access_mode=VolumeAccessMode.READ_WRITE,\n description='New google volume'\n)\n\nprint(new_volume.name, new_volume.id)" name: Python (Google Cloud) samples-languages: - python tags: - Storage get: summary: List volumes description: 'This call lists all the volumes you''ve registered. See also [get details of a volume](ref:get-details-of-a-volume-v2) for a detailed explanation of the fields in the response. Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial).' operationId: list-volumes-v2 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: Content-Type in: header schema: type: string default: application/json responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes?offset=0&limit=3\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/gcs_ro\",\n \"id\": \"rfranklin/gcs_ro\",\n \"name\": \"gcs_ro\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/gcs_rw\",\n \"id\": \"rfranklin/gcs_rw\",\n \"name\": \"gcs_rw\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/my_s3_volume\",\n \"id\": \"rfranklin/my_s3_volume\",\n \"name\": \"my_s3_volume\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes?offset=0&limit=3 items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/gcs_ro id: type: string example: rfranklin/gcs_ro name: type: string example: gcs_ro 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\nvolumes = api.volumes.query()\n\nfor volume in volumes:\n print(volume.id, volume.name, volume.active)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}: get: summary: Get details of a volume description: This call returns details of the specified volume. The volume is referred to by its ID, which you can obtain by making the call to [list all the volumes you've registered](ref:list-volumes-v2). operationId: get-details-of-a-volume-v2 parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - 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: Content-type in: header schema: type: string default: application/json - name: volume_name in: path description: The name of the volume 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/storage/volumes/rfranklin/output\",\n \"active\":true,\n \"description\":\"task outputs bucket\",\n \"id\":\"rfranklin/output\",\n \"name\":\"output\",\n \"access_mode\":\"RW\",\n \"service\":{\n \"type\":\"s3\",\n \"bucket\":\"sbg-test-output\",\n \"hostname\":\"s3.amazonaws.com\",\n \"credentials\":{\n \"access_key_id\":\"REDACTED_AWS_ACCESS_KEY_ID\"\n },\n \"prefix\":\"\",\n \"sse_enabled\":true\n },\n \"created_on\":\"2016-06-29T11:13:10+02:00\",\n \"updated_on\":\"2016-06-29T12:15:10+02:00\"\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/output active: type: boolean example: true default: true description: type: string example: task outputs bucket id: type: string example: rfranklin/output name: type: string example: output access_mode: type: string example: RW service: type: object properties: type: type: string example: s3 bucket: type: string example: sbg-test-output hostname: type: string example: s3.amazonaws.com credentials: type: object properties: access_key_id: type: string example: REDACTED_AWS_ACCESS_KEY_ID prefix: type: string example: '' sse_enabled: type: boolean example: true default: true created_on: type: string example: '2016-06-29T11:13:10+02:00' updated_on: type: string example: '2016-06-29T12:15:10+02:00' 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\nvolume = api.volumes.get(id='rfranklin/output')\n\nprint(volume.name, volume.active, volume.access_mode)" samples-languages: - python tags: - Storage patch: summary: Update a volume description: 'This call updates the details of a specific volume. Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial).' operationId: update-a-volume-v2 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: Content-Type in: header schema: type: string default: application/json - name: volume_owner in: path description: Username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to update. schema: type: string required: true requestBody: content: application/json: schema: type: object properties: access_mode: type: string description: Signifies whether this volume should be used for read-write (`"RW"`) or read-only (`"RO"`) operations. The access mode is consulted independently of the credentials granted to Seven Bridges when the volume was created, so it is possible to use a read-write credentials to register both read-write and read-only volumes using it. _default:_ `"RW"` default: RW description: type: string description: An optional description of this volume. service: type: object description: This object should contain the information about the cloud service that this volume represents. required: - bucket properties: type: type: string description: The type of cloud service. Use `s3` for Amazon Web Services or `gcs` for Google Cloud Storage. prefix: type: string description: A service-specific prefix to prepend to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file. bucket: type: string description: The name of the AWS S3 or GCS bucket you wish to register as a volume. endpoint: type: string description: '**AWS only!** AWS API endpoint to use when accessing this bucket. For a list of AWS-supported endpoints, see AWS Regions and Endpoints. Default: `s3.amazonaws.com`' root_url: type: string description: '**GCS only!** Google Cloud Storage API endpoint for accessing this bucket. Default: `https://www.googleapis.com`.' credentials: type: object description: 'Contains credentials for the underlying cloud provider. AWS IAM user: * `access-key-id` * `secret_access-key`' properties: access_key_id: type: string description: '**AWS only!** AWS access key ID of the IAM user shared with Seven Bridges to access this bucket.' secret_access_key: type: string description: '**AWS only!** AWS secret access key of the IAM user shared with Seven Bridges to access this bucket.' client_email: type: string description: '**GCS only!** The client email address for the Google Cloud service account to use for operations on this bucket. This can be found in the JSON containing your service account credentials.' private_key: type: string description: '**GCS only!** Google Cloud Platform private key.' properties: type: object description: Contains the properties of a specific service. These values set the defaults for operations performed with this volume. **Individual** operations can override these defaults by providing a custom `properties` object. properties: sse_algorithm: type: string description: 'S3 server-side encryption to use when exporting to this bucket. Supported values: * `AES256` (SSE-S3 encryption) * ''aws:kms` * null (no server-side encryption). _default: `AES256`_' sse_aws_kms_key_Id: type: string description: 'Applies to type: `s3`. If AWS KMS encryption is used, this should be set to the required KMS key. If not set and `aws:kms` is set as `sse_algorithm`, default KMS key is used.' aws_canned_acl: type: string description: 'S3 canned ACL to apply on the object on during export. Supported values: * any one of [S3 canned ACLs](http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl); * `null` (do not apply canned ACLs). _default: `null`_' responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/output\",\n \"id\": \"rfranklin/output\",\n \"name\": \"output\",\n \"access_mode\": \"RW\",\n \"service\": {\n \"type\": \"S3\",\n \"bucket\": \"output_bucket\",\n \"prefix\": \"outfiles\",\n \"endpoint\": \"s3.amazonaws.com\",\n \"credentials\": {\n \"access_key_id\": \"REDACTED_AWS_ACCESS_KEY_ID\"\n },\n \"properties\": {\n \"sse_algorithm\": \"AES256\"\n }\n },\n \"created_on\": \"2016-06-30T08:14:02Z\",\n \"modified_on\": \"2016-06-30T08:14:02Z\",\n \"active\": true\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/output id: type: string example: rfranklin/output name: type: string example: output access_mode: type: string example: RW service: type: object properties: type: type: string example: S3 bucket: type: string example: output_bucket prefix: type: string example: outfiles endpoint: type: string example: s3.amazonaws.com credentials: type: object properties: access_key_id: type: string example: REDACTED_AWS_ACCESS_KEY_ID properties: type: object properties: sse_algorithm: type: string example: AES256 created_on: type: string example: '2016-06-30T08:14:02Z' modified_on: type: string example: '2016-06-30T08:14:02Z' active: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api\n\napi = Api(url=API_URL, token=API_TOKEN)\n\nvolume = api.volumes.get(id='my-division/export-volume')\nif volume:\n volume.service['credentials']['access_key_id'] = 'REDACTED_AWS_ACCESS_KEY_ID'\n volume.service['credentials']['secret_access_key'] = 'wJelrXUtnFEMI/K1MDENG/bPxRfiCYEXAMPLEKEY'\n volume.service['properties']['sse_algorithm'] = 'AES256'\n volume.save()" name: Python samples-languages: - python tags: - Storage delete: summary: Delete a volume description: "This call deletes a [volume you've created\uFEFF\uFEFF](ref:create-a-volume-v2) to refer to storage on Amazon Web Services or Google Cloud Storage.\n\nTo be able to delete a volume, you first need to [deactivate](doc:deactivate-a-volume) it and then delete all files on the Platform that were previously imported from the volume.\n\nLearn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial)." operationId: delete-a-volume-v2 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: Content-Type in: header schema: type: string default: application/json - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. 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\nvolume = api.volumes.get(id='rfranklin/output')\n\n# send DELETE request to SB API\nvolume.delete()" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner_username}/{volume_name}: patch: summary: Deactivate a volume description: 'This call deactivates a volume. Note that this request is based off of the `PATCH` request to [update a volume](ref:update-a-volume-v2). Once deactivated, you cannot import from, export to, or browse within a volume. As such, the content of the files imported from this volume will no longer be accessible on the Platform. However, you can update the volume and manage members. Note that you cannot deactivate the volume if you have running imports or exports unless you force the operation using the query parameter `force=true`, as described below. Note that to delete a volume, first you must deactivate it and delete all files which have been imported from the volume to the Platform. If you want to reactivate the volume at a later time, make this call again with the key "active" set to "true" in the request body.' operationId: deactivate-a-volume-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: Content-Type in: header schema: type: string default: application/json - name: volume_owner_username in: path description: The username of the volume owner. schema: type: string required: true - name: force in: query description: Set this to `true` to force-quit ongoing import or export operations on a volume you intend to deactivate schema: type: boolean - name: volume_name in: path description: The name of the volume you want to deactivate. schema: type: string required: true requestBody: content: application/json: schema: type: object properties: active: type: boolean description: Set this to `false` to deactivate the volume. Note that if there are ongoing import or export operations on the volume, you must force-quit the operations using the query parameter `force=true`. To reactivate a volume, set this back to `true` again. responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/output\",\n \"id\": \"rfranklin/my-volume\",\n \"name\": \"my-volume\",\n \"access_mode\": \"RW\",\n \"service\": {\n \"type\": \"S3\",\n \"bucket\": \"my_bucket\",\n \"prefix\": \"input-files\",\n \"endpoint\": \"s3.amazonaws.com\",\n \"credentials\": {\n \"access_key_id\": \"REDACTED_AWS_ACCESS_KEY_ID\"\n },\n \"properties\": {\n \"sse_algorithm\": \"AES256\"\n }\n },\n \"created_on\": \"2017-05-09T16:19:10Z\",\n \"modified_on\": \"2017-05-24T09:27:41Z\",\n \"active\": false\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/output id: type: string example: rfranklin/my-volume name: type: string example: my-volume access_mode: type: string example: RW service: type: object properties: type: type: string example: S3 bucket: type: string example: my_bucket prefix: type: string example: input-files endpoint: type: string example: s3.amazonaws.com credentials: type: object properties: access_key_id: type: string example: REDACTED_AWS_ACCESS_KEY_ID properties: type: object properties: sse_algorithm: type: string example: AES256 created_on: type: string example: '2017-05-09T16:19:10Z' modified_on: type: string example: '2017-05-24T09:27:41Z' active: 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\nvolume = api.volumes.get(id='rfranklin/output')\n\n# set 'active' field to False\nvolume.active = False\n\n# send PATCH request to SB API\nvolume.save()\n\nprint(volume.active)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}/list: get: summary: List the contents of a volume description: This call lists the contents of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). operationId: list-the-contents-of-a-volume parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - 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: Content-type in: header schema: type: string default: application/json - name: prefix in: query description: The name of the folder in case you want to list the contents of a folder. 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: volume_name in: path description: The name of the volume 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/storage/volumes/rfranklin/sb_test/list?prefix=my-folder&limit=3\",\n \"prefix\": \"my-folder\",\n \"limit\": 3,\n \"truncated\": false,\n \"items\": [],\n \"prefixes\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/\",\n \"prefix\": \"my-folder/\",\n \"volume\": \"rfranklin/sb_test\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/preserve-structure\",\n \"prefix\": \"my-folder/preserve-structure\",\n \"volume\": \"rfranklin/sb_test\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/security\",\n \"prefix\": \"my-folder/security\",\n \"volume\": \"rfranklin/sb_test\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder&limit=3 prefix: type: string example: my-folder limit: type: integer example: 3 default: 0 truncated: type: boolean example: false default: true items: type: array prefixes: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/ prefix: type: string example: my-folder/ volume: type: string example: rfranklin/sb_test 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\nvolume = api.volumes.get(id='rfranklin/sb_test')\n\n# send GET request to SB API\nvolume_items = volume.list(prefix='my-folder')\n\nfor volume_object in volume_items:\n print(volume_object.location)\nprint(volume_items.prefixes)" samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/imports: post: summary: Start an import job description: 'This call lets you queue a job to import a file or folder from a volume into a project on the Platform. Essentially, you are importing an item from your cloud storage provider (Amazon Web Services or Google Cloud Storage) via the volume onto the Platform. If successful, an alias will be created on the Platform. Aliases appear on the Platform and can be copied, executed, and modified as such. They refer back to the respective item on the given volume. If you want to import multiple files, the recommended way is to do it in bulk considering the API rate limit ([learn more](doc:api-rate-limit)). Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial).' operationId: start-an-import-job-v2 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: Content-Type in: header schema: type: string default: application/json requestBody: content: application/json: schema: type: object required: - source - destination properties: source: type: object description: This object should describe the source from which the item should be imported. required: - volume - location properties: volume: type: string description: Volume ID from which to import the item. location: type: string description: Volume-specific location pointing to the file or folder to import. This location should be recognizable to the underlying cloud service as a valid key or path to the item. If the item being imported is a folder, its path should end with a `/`. Please note that if this volume was configured with a `prefix` parameter when it was created, the value of prefix will be prepended to location before attempting to locate the item on the volume. destination: type: object description: This object should describe the Platform destination for the imported file or folder. properties: project: type: string description: The project in which to create the alias. parent: type: string description: The ID of the target folder to which the item should be imported. Should not be used together with `project`. If `parent` is used, the import will take place into the specified folder, within the project to which the folder belongs. If `project` is used, the items will be imported to the root of the project's files. name: type: string description: The name of the alias to create. This name should be unique to the project. If the name is already in use in the project, you should use the `overwrite` query parameter in this call to force any item with that name to be deleted before the alias is created. If `name` is omitted, the alias name will default to the last segment of the complete location (including the `prefix`) on the volume. Segments are considered to be separated with forward slashes `/`. Allowed characters in file names are all alphanumerics and special characters except forward slash `/`, while folder names can contain alphanumerics and special characters `_`, `-` and `.`. overwrite: type: boolean description: Whether to overwrite the item if another one with the same name already exists at the destination. autorename: type: boolean description: Whether to automatically rename the item (by prefixing its name with an underscore and number) if another one with the same name already exists at the destination. preserve_folder_structure: type: boolean description: Whether to keep the exact source folder structure. The default value is `true` if the item being imported is a folder. Should not be used if you are importing a file. responses: '200': description: '200' content: application/json: examples: File import: value: "{\n \"href\":\"https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"id\":\"Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"state\":\"COMPLETED\",\n \"overwrite\":false,\n \"autorename\":false,\n \"source\":{\n \"volume\":\"rfranklin/my_volume\",\n \"location\":\"my-samples/november/sample1.bam\"\n },\n \"destination\":{\n \"project\":\"rfranklin/my-project\",\n \"name\":\"sample1.bam\",\n \"parent\":\"5babc233e4b0cb3d7a82e7cc\"\n },\n \"result\":{\n \"href\":\"https://api.sbgenomics.com/v2/files/567890abc1e5339df0414123\",\n \"id\":\"567890abc1e5339df0414123\",\n \"name\":\"sample1.bam\",\n \"size\":1804,\n \"project\":\"rfranklin/my-project\",\n \"created_on\":\"2018-10-22T12:25:53Z\",\n \"modified_on\":\"2018-10-22T12:25:53Z\",\n \"storage\":{\n \"type\":\"VOLUME\",\n \"volume\":\"rfranklin/my_volume\",\n \"location\":\"my-samples/november/sample1.bam\"\n },\n \"origin\":{\n \n },\n \"tags\":[\n \n ],\n \"metadata\":{\n \n }\n },\n \"started_on\":\"2018-10-22T12:25:53Z\",\n \"finished_on\":\"2018-10-22T12:25:54Z\"\n}" Folder import: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/imports/aNiKZPr4u1n7hOOE07lQQ2ql9cRDIcVB\",\n \"id\": \"aNiKZPr4u1n7hOOE07lQQ2ql9cRDIcVB\",\n \"state\": \"COMPLETED\",\n \"overwrite\": false,\n \"autorename\": false,\n \"preserve_folder_structure\": true,\n \"source\": {\n \"volume\": \"rfranklin/my_volume\",\n \"location\": \"my-samples/november\"\n },\n \"destination\": {\n \"project\": \"rfranklin/my-project\",\n \"name\": \"samples\",\n \"parent\": \"5bcdc233e4b0cbdd7a82e7cc\"\n },\n \"result\": {\n \"href\": \"https://api.sbgenomics.com/v2/files/5bcdc25ae4b0cbdd7a82e7cf\",\n \"id\": \"5bcdc25ae4b0cbdd7a82e7cf\",\n \"name\": \"samples\",\n \"project\": \"rfranklin/my-project\",\n \"created_on\": \"2018-10-22T12:28:10Z\",\n \"modified_on\": \"2018-10-22T12:28:10Z\"\n },\n \"started_on\": \"2018-10-22T12:28:10Z\",\n \"finished_on\": \"2018-10-22T12:28:10Z\"\n}" schema: oneOf: - title: File import type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap id: type: string example: Yrand0mERJY4F3grand0mzh5UuTdw2Ap state: type: string example: COMPLETED overwrite: type: boolean example: false default: true autorename: type: boolean example: false default: true source: type: object properties: volume: type: string example: rfranklin/my_volume location: type: string example: my-samples/november/sample1.bam destination: type: object properties: project: type: string example: rfranklin/my-project name: type: string example: sample1.bam parent: type: string example: 5babc233e4b0cb3d7a82e7cc result: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/files/567890abc1e5339df0414123 id: type: string example: 567890abc1e5339df0414123 name: type: string example: sample1.bam size: type: integer example: 1804 default: 0 project: type: string example: rfranklin/my-project created_on: type: string example: '2018-10-22T12:25:53Z' modified_on: type: string example: '2018-10-22T12:25:53Z' storage: type: object properties: type: type: string example: VOLUME volume: type: string example: rfranklin/my_volume location: type: string example: my-samples/november/sample1.bam origin: type: object properties: {} tags: type: array metadata: type: object properties: {} started_on: type: string example: '2018-10-22T12:25:53Z' finished_on: type: string example: '2018-10-22T12:25:54Z' - title: Folder import type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/imports/aNiKZPr4u1n7hOOE07lQQ2ql9cRDIcVB id: type: string example: aNiKZPr4u1n7hOOE07lQQ2ql9cRDIcVB state: type: string example: COMPLETED overwrite: type: boolean example: false default: true autorename: type: boolean example: false default: true preserve_folder_structure: type: boolean example: true default: true source: type: object properties: volume: type: string example: rfranklin/my_volume location: type: string example: my-samples/november destination: type: object properties: project: type: string example: rfranklin/my-project name: type: string example: samples parent: type: string example: 5bcdc233e4b0cbdd7a82e7cc result: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/files/5bcdc25ae4b0cbdd7a82e7cf id: type: string example: 5bcdc25ae4b0cbdd7a82e7cf name: type: string example: samples project: type: string example: rfranklin/my-project created_on: type: string example: '2018-10-22T12:28:10Z' modified_on: type: string example: '2018-10-22T12:28:10Z' started_on: type: string example: '2018-10-22T12:28:10Z' finished_on: type: string example: '2018-10-22T12:28:10Z' deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api, ImportExportState\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send POST request to SB API\nimport_to_project = api.imports.submit_import(\n volume='rfranklin/input',\n location='example_human_Illumina.pe_1.fastq',\n project='rfranklin/my_project',\n name='my_uploaded_example_human_Illumina.pe_1.fastq',\n overwrite=True\n)\n\n# send POST request to SB API\nimport_to_folder = api.imports.submit_import(\n volume='rfranklin/my_volume',\n location='samples/november/',\n parent='567890abc8a5639cc6722063'\n)\n\nprint(import_to_project.id, import_to_project.state)\nif import_to_project.state == ImportExportState.COMPLETED:\n print(import_to_project.result.id, import_to_project.result.name)\n\nprint(import_to_folder.id, import_to_folder.state)\nif import_to_folder.state == ImportExportState.COMPLETED:\n print(import_to_folder.result.id, import_to_folder.result.name)" name: Python samples-languages: - python tags: - Storage get: summary: List import jobs description: 'This call lists import jobs initiated by particular user. Note that when you import a file from your volume on your cloud storage provider (Amazon Web Services or Google Cloud Storage), you are creating an alias on the Platform which points to the file in your cloud storage bucket. Aliases appear as files on the Platform and can be copied, executed, and modified as such. They refer back to the respective file on the given volume. Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial).' operationId: list-import-jobs 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: Content-Type in: header schema: type: string default: application/json responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports?offset=0&limit=25\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"id\": \"Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"state\": \"FAILED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN\",\n \"id\": \"5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm\",\n \"id\": \"yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/trand0mgPWZbeXxtADETWtFkrE87JBSd\",\n \"id\": \"trand0mgPWZbeXxtADETWtFkrE87JBSd\",\n \"state\": \"FAILED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/prand0mBrcK8tVRZJeQXs87mh6sH43tM\",\n \"id\": \"prand0mBrcK8tVRZJeQXs87mh6sH43tM\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/erand0md6gMeuLlhWTNVj192RsnOMgdB\",\n \"id\": \"erand0md6gMeuLlhWTNVj192RsnOMgdB\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/Urand0mpTzbRnFvf1X7AtTYgQgky9029\",\n \"id\": \"Urand0mpTzbRnFvf1X7AtTYgQgky9029\",\n \"state\": \"COMPLETED\"\n }\n ],\n \"links\": []\n} " schema: type: object properties: href: type: string example: https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports?offset=0&limit=25 items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap id: type: string example: Yrand0mERJY4F3grand0mzh5UuTdw2Ap state: type: string example: FAILED 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\nimports = api.imports.query()\n\nfor import_ in imports:\n print(import_.id, import_.state)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/imports/{import_id}: get: summary: Get details of an import job description: "This call will return the details of an import job. \n\nNote that when you import a file from your volume on your cloud storage provider (Amazon Web Services or Google Cloud Storage), you are creating an alias on the Platform which points to the file in your cloud storage bucket. Aliases appear as files on the Platform and can be copied, executed, and modified as such. They refer back to the respective file on the given volume.\n\nLearn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial) and for [Google Cloud Storage](doc:google-cloud-storage-tutorial)." operationId: get-details-of-an-import-job-v2 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: Content-Type in: header schema: type: string default: application/json - name: import_id in: path description: The ID of the import job as returned by the call to [start an import job](ref:start-an-import-job-v2). schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Successfully completed import: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"id\": \"Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"state\": \"COMPLETED\",\n \"overwrite\": true,\n \"autorename\": false,\n \"source\": {\n \"volume\": \"rfrankin/input\",\n \"location\": \"1234851233d176941a8355.bam\"\n },\n \"destination\": {\n \"project\": \"rfranklin/my-project\",\n \"name\": \"sample1.bam\"\n },\n \"result\": {\n \"href\": \"https://api.sbgenomics.com/v2/files/567890abc9b0307bc0414164\",\n \"id\": \"567890abc9b0307bc0414164\",\n \"name\": \"sample1.bam\",\n \"size\": 10718145,\n \"project\": \"rfranklin/my-project\",\n \"created_on\": \"2018-10-26T12:47:46Z\",\n \"modified_on\": \"2018-10-26T12:47:46Z\",\n \"storage\": {\n \"type\": \"VOLUME\",\n \"volume\": \"rfrankin/input\",\n \"location\": \"1234851233d176941a8355.bam\"\n },\n \"origin\": {},\n \"tags\": [],\n \"metadata\": {}\n },\n \"started_on\": \"2018-10-26T12:47:46Z\",\n \"finished_on\": \"2018-10-26T12:47:46Z\"\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap id: type: string example: Yrand0mERJY4F3grand0mzh5UuTdw2Ap state: type: string example: COMPLETED overwrite: type: boolean example: true default: true autorename: type: boolean example: false default: true source: type: object properties: volume: type: string example: rfrankin/input location: type: string example: 1234851233d176941a8355.bam destination: type: object properties: project: type: string example: rfranklin/my-project name: type: string example: sample1.bam result: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/files/567890abc9b0307bc0414164 id: type: string example: 567890abc9b0307bc0414164 name: type: string example: sample1.bam size: type: integer example: 10718145 default: 0 project: type: string example: rfranklin/my-project created_on: type: string example: '2018-10-26T12:47:46Z' modified_on: type: string example: '2018-10-26T12:47:46Z' storage: type: object properties: type: type: string example: VOLUME volume: type: string example: rfrankin/input location: type: string example: 1234851233d176941a8355.bam origin: type: object properties: {} tags: type: array metadata: type: object properties: {} started_on: type: string example: '2018-10-26T12:47:46Z' finished_on: type: string example: '2018-10-26T12:47:46Z' '404': description: '404' content: application/json: examples: Failed import job: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"id\": \"Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"state\": \"FAILED\",\n \"overwrite\": true,\n \"autorename\": false,\n \"source\": {\n \"volume\": \"rfranklin/input\",\n \"location\": \"1234851233d176941a8355.bam\"\n },\n \"destination\": {\n \"project\": \"rfranklin/my-project\",\n \"name\": \"sample1.bam\"\n },\n \"error\": {\n \"status\": 404,\n \"code\": 9105,\n \"message\": \"Location on volume not found.\",\n \"more_info\": \"http://docs.sevenbridges.com/docs/api-status-codes#9105\"\n },\n \"started_on\": \"2018-10-26T13:10:24Z\",\n \"finished_on\": \"2018-10-26T13:10:25Z\"\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap id: type: string example: Yrand0mERJY4F3grand0mzh5UuTdw2Ap state: type: string example: FAILED overwrite: type: boolean example: true default: true autorename: type: boolean example: false default: true source: type: object properties: volume: type: string example: rfranklin/input location: type: string example: 1234851233d176941a8355.bam destination: type: object properties: project: type: string example: rfranklin/my-project name: type: string example: sample1.bam error: type: object properties: status: type: integer example: 404 default: 0 code: type: integer example: 9105 default: 0 message: type: string example: Location on volume not found. more_info: type: string example: http://docs.sevenbridges.com/docs/api-status-codes#9105 started_on: type: string example: '2018-10-26T13:10:24Z' finished_on: type: string example: '2018-10-26T13:10:25Z' deprecated: false x-readme: code-samples: - language: python code: "from sevenbridges import Api, ImportExportState\n\napi = Api(url='https://api.sbgenomics.com/v2',\n token='3210a98c1db9318fa9d9273156740f74')\n\n# send GET request to SB API\nimport_ = api.imports.get(id='Yrand0mERJY4F3grand0mzh5UuTdw2Ap')\n\nprint(import_.id, import_.state)\nif import_.state == ImportExportState.FAILED:\n print(import_.error)\nif import_.state == ImportExportState.COMPLETED:\n file = import_.result\n print(file.id, file.name)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/exports: post: summary: Start an export job description: 'This call lets you queue a job to export a file from a project on the Platform into a volume. The file selected for export must not be a public file or an alias. Aliases are objects stored in your cloud storage bucket which have been made available on the Platform. The volume you are exporting to must be configured for read-write access. To do this, set the `access_mode` parameter to `RW` when [creating](doc:create-a-volume-v2) or [modifying](doc:update-a-volume-v2) a volume. Essentially, the call writes to your cloud storage bucket via the volume. If this call is successful, the original project file will become an alias to the newly exported object on the volume. The source file will be deleted from the Platform and, if no more copies of this file exist, it will no longer count towards your total storage price on the Platform. In summary, once you export a file from the Platform to a volume, it is no longer part of the storage on the Platform and cannot be exported again. If you want to export multiple files, the recommended way is to do it in bulk considering the API rate limit ([learn more](doc:api-rate-limit)). Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial).' operationId: start-an-export-job-v2 parameters: - name: copy_only in: query description: If `true`, file will be copied to a volume but source file will remain on the Platform. schema: type: boolean - 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: Content-Type in: header schema: type: string default: application/json requestBody: content: application/json: schema: type: object required: - source - destination properties: source: type: object description: This object should describe the source from which the file should be exported. required: - file properties: file: type: string description: The ID of the file for export. destination: type: object description: This object should describe the destination to which the file will be exported. required: - volume - location properties: volume: type: string description: The ID of the volume to which the file will be exported. The ID must be in the `{volume_owner_username}/{volume_name}` format. location: type: string description: Volume-specific location to which the file will be exported. This location should be recognizable to the underlying cloud service as a valid key or path to a new file. Please note that if this volume has been configured with a `prefix` parameter, the value of `prefix` will be prepended to `location` before attempting to create the file on the volume. overwrite: type: boolean description: 'If true and a file exists in the given location on the volume (respecting volume prefix if given), the API will attempt to delete the existing file on the volume before exporting. _default_: `false`' properties: type: object description: Service-specific properties of the export. These values override the defaults from the volume. properties: sse_algorithm: type: string description: 'S3 server-side encryption to use when exporting to this bucket. Supported values: * `AES256` (SSE-S3 encryption) * ''aws:kms` * null (no server-side encryption). _default: `AES256`_' sse_aws_kms_key_Id: type: string description: 'Applies to type: `s3`. If AWS KMS encryption is used, this should be set to the required KMS key. If not set and `aws:kms` is set as `sse_algorithm`, default KMS key is used.' aws_canned_acl: type: string description: 'S3 canned ACL to apply on the object on during export. Supported values: * any one of [S3 canned ACLs](http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl); * `null` (do not apply canned ACLs). _default: `null`_' responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/crand0mKvetGpxIjo088DnMXEg0t6srX\",\n \"id\": \"crand0mKvetGpxIjo088DnMXEg0t6srX\",\n \"state\": \"PENDING\",\n \"source\": {\n \"file\": \"567890abc1e5339df0414123\"\n },\n \"destination\": {\n \"volume\": \"rfranklin/output\",\n \"location\": \"output.vcf\"\n },\n \"started_on\": \"2016-06-15T19:17:39Z\",\n \"properties\": {\n \"sse_algorithm\": \"AES256\"\n },\n \"overwrite\": false\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/exports/crand0mKvetGpxIjo088DnMXEg0t6srX id: type: string example: crand0mKvetGpxIjo088DnMXEg0t6srX state: type: string example: PENDING source: type: object properties: file: type: string example: 567890abc1e5339df0414123 destination: type: object properties: volume: type: string example: rfranklin/output location: type: string example: output.vcf started_on: type: string example: '2016-06-15T19:17:39Z' properties: type: object properties: sse_algorithm: type: string example: AES256 overwrite: 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\n# send POST request to SB API\nexport = api.exports.submit_export(\n file='567890abc9b0307bc0414164',\n volume='rfranklin/output',\n location='output.vcf'\n)\n\nprint(export.id, export.state)" name: Python samples-languages: - python tags: - Storage get: summary: List export jobs description: 'This call lists export jobs initiated by particular user. Note that when you export a file from a project on the Platform into a volume, you write to your cloud storage bucket. Learn more about using the Volumes API for [Amazon S3](doc:aws-cloud-storage-tutorial).' operationId: list-export-jobs-v2 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: Content-Type in: header schema: type: string default: application/json responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports?offset=0&limit=50\",\n \"items\": [\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"id\": \"Yrand0mERJY4F3grand0mzh5UuTdw2Ap\",\n \"state\": \"FAILED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN\",\n \"id\": \"5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm\",\n \"id\": \"yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/trand0mgPWZbeXxtADETWtFkrE87JBSd\",\n \"id\": \"trand0mgPWZbeXxtADETWtFkrE87JBSd\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/prand0mBrcK8tVRZJeQXs87mh6sH43tM\",\n \"id\": \"prand0mBrcK8tVRZJeQXs87mh6sH43tM\",\n \"state\": \"COMPLETED\"\n },\n {\n \"href\": \"https://api.sbgenomics.com/v2/storage/exports/crand0mKvetGpxIjo088DnMXEg0t6srX\",\n \"id\": \"crand0mKvetGpxIjo088DnMXEg0t6srX\",\n \"state\": \"FAILED\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/exports?offset=0&limit=50 items: type: array items: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/exports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap id: type: string example: Yrand0mERJY4F3grand0mzh5UuTdw2Ap state: type: string example: FAILED 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\nexports = api.exports.query()\n\nfor export in exports:\n print(export.id, export.state)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}/members/{username}/permissions: put: summary: Overwrite a volume member's permissions description: 'This call overwrites the permissions for a member of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). Note that this **overwrites** all previously set permissions for the member. Refer to the request to [modify a volume member''s permissions](ref:modify-a-volume-members-permissions)to update rather than overwrite permissions.' operationId: overwrite-a-volume-members-permissions parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true - name: username in: path description: Enter the username of the collaborator whose permissions you'd like to overwrite. schema: type: string required: true - 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: Content-Type in: header schema: type: string default: application/json requestBody: content: application/json: schema: type: object properties: RAW_BODY: type: object properties: read: type: boolean description: Set this to `true` to grant `read` permissions or `false` to remove them. `read` permissions allow a volume member to browse the contents of the volume. copy: type: boolean description: Set this to `true` to grant `copy` permissions or `false` to remove them. `copy` permissions allow a volume member to import the contents of the volume to the Platform. write: type: boolean description: Set this to `true` to grant `write` permissions or `false` to remove them. `write` permissions allow a volume member to export files from the Platform to the volume. admin: type: boolean description: Set this to `true` to grant admin permissions or `false` to remove them. responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"write\": false,\n \"read\": true,\n \"copy\": false,\n \"admin\": true\n}" schema: type: object properties: write: type: boolean example: false default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true admin: type: boolean example: true 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\nmember = volume.get_member(username='crickandwatson')\n\n# overwrite permissions\nmember.permissions = {\n 'write': False,\n 'read': True,\n 'copy': False,\n 'admin': True\n}\n\n# send PATCH request to SB API; only changed permissions will be sent\nmember.save()\n\nprint(member.permissions)" name: Python samples-languages: - python tags: - Storage patch: summary: Modify a volume member's permissions description: 'This call modifies the permissions for a member of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). Note that this **does not overwrite** all previously set permissions for the member. Refer to the request to [overwrite a volume members'' permissions](ref:overwrite-a-volume-members-permissions) to overwrite rather than update permissions.' operationId: modify-a-volume-members-permissions parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true - name: username in: path description: Enter the username of the collaborator whose permissions you'd like to modify. schema: type: string required: true - 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: Content-Type in: header schema: type: string default: application/json requestBody: content: application/json: schema: type: object properties: RAW_BODY: type: object properties: read: type: boolean description: Set this to `true` to grant `read` permissions or `false` to remove them. `read` permissions allow a volume member to browse the contents of the volume. copy: type: boolean description: Set this to `true` to grant `copy` permissions or `false` to remove them. `copy` permissions allow a volume member to import the contents of the volume to the Platform. write: type: boolean description: Set this to `true` to grant `write` permissions or `false` to remove them. `write` permissions allow a volume member to export files from the Platform to the volume. admin: type: boolean description: Set this to `true` to grant admin permissions or `false` to remove them. responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"write\": false,\n \"read\": true,\n \"copy\": false,\n \"admin\": true\n}" schema: type: object properties: write: type: boolean example: false default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true admin: type: boolean example: true 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\nmember = volume.get_member(username='crickandwatson')\n\n# modify permissions\nmember.permissions['admin'] = False\n\n# send PATCH request to SB API\nmember.save()\n\nprint(member.permissions)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}/members: get: summary: List members of a volume description: This call returns the members of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). operationId: list-members-of-a-volume 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: Content-Type in: header schema: type: string default: application/json - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_rfranklin/members?offset=0&limit=50\",\n \"items\": [\n {\n \"username\": \"rfranklin\",\n \"email\": \"rosalind.franklin@sbgenomics.com\",\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_rfranklin/members/rfranklin\",\n \"permissions\": {\n \"write\": true,\n \"read\": true,\n \"copy\": true,\n \"admin\": true\n },\n \"type\": \"USER\",\n \"id\": \"rfranklin\"\n }\n ],\n \"links\": []\n}" schema: type: object properties: href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_rfranklin/members?offset=0&limit=50 items: type: array items: type: object properties: username: type: string example: rfranklin email: type: string example: rosalind.franklin@sbgenomics.com href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_rfranklin/members/rfranklin 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 admin: type: boolean example: true default: true type: type: string example: USER id: type: string example: rfranklin 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='3210a98c1db9304ea9d9873156740f74')\n\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\n\n# send GET request to SB API\nmembers = volume.get_members()\n\nfor member in members:\n print(member.username)" name: Python samples-languages: - python tags: - Storage post: summary: Add members to a volume description: This call adds members to the specified volume. operationId: add-members-to-a-volume 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: Content-Type in: header schema: type: string default: application/json - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true requestBody: content: application/json: schema: type: object required: - username - permissions properties: username: type: string description: The Seven Bridges Platform username of the collaborator you wish to invite to your volume. permissions: type: object description: This object contains information about the permissions granted to the user being added. Permissions include listing the contents of a volume, importing files from the volume to the Platform, exporting files from the Platform to the volume, and admin privileges. properties: read: type: boolean description: Set this to `true` to grant `read` permissions or `false` to remove them. `read` permissions allow a volume member to browse the contents of the volume. copy: type: boolean description: Set this to `true` to grant `copy` permissions or `false` to remove them. `copy` permissions allow a volume member to import the contents of the volume to the Platform. write: type: boolean description: Set this to `true` to grant `write` permissions or `false` to remove them. `write` permissions allow a volume member to export files from the Platform to the volume. admin: type: boolean description: Set this to `true` to grant admin permissions or `false` to remove them. responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"username\": \"crickandwatson\",\n \"email\": \"crickandwatson@sbgenomics.com\",\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/members/members/67f68072-45b6-12b3-789c-37be8b0f2f04\",\n \"permissions\": {\n \"write\": false,\n \"read\": true,\n \"copy\": false,\n \"admin\": false\n },\n \"type\": \"TEAM\",\n \"id\": \"67f68072-45b6-12b3-789c-37be8b0f2f04\"\n}" schema: type: object properties: username: type: string example: crickandwatson email: type: string example: crickandwatson@sbgenomics.com href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/members/members/67f68072-45b6-12b3-789c-37be8b0f2f04 permissions: type: object properties: write: type: boolean example: false default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true admin: type: boolean example: false default: true type: type: string example: TEAM id: type: string example: 67f68072-45b6-12b3-789c-37be8b0f2f04 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\n\n# send POST request to SB API\nmember = volume.add_member(\n user='crickandwatson',\n permissions={\n 'read': True,\n 'copy': True,\n 'write': False,\n 'admin': False\n }\n)\n\nprint(member.username, member.permissions)" name: Python samples-languages: - python tags: - Storage servers: - url: https://api.sbgenomics.com/v2 /storage/volumes/{volume_owner}/{volume_name}/members/{username}: delete: summary: Remove members from a volume description: This call removes members from a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). operationId: remove-members-from-a-volume parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true - name: username in: path description: Enter the username of the project member you'd like to remove from a volume. schema: type: string required: true - 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: Content-Type in: header schema: type: string default: application/json 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\n\n# send DELETE request to SB API\nvolume.remove_member(user='crickandwatson')" name: Python samples-languages: - python tags: - Storage get: summary: Get a volume member's permissions description: This call returns the permissions for a member of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`). operationId: get-a-volume-members-permissions parameters: - name: volume_owner in: path description: The username of the volume owner. schema: type: string required: true - name: volume_name in: path description: The name of the volume you want to query. schema: type: string required: true - name: username in: path description: Enter the username of the volume member whose permissions you'd like to get. schema: type: string required: true - 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: Content-Type in: header schema: type: string default: application/json responses: '200': description: '200' content: application/json: examples: OK: value: "{\n \"username\": \"jsmith\",\n \"email\": \"john.smith@sbgenomics.com\",\n \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_volume/members/jsmith\",\n \"permissions\": {\n \"write\": false,\n \"read\": true,\n \"copy\": false,\n \"admin\": false\n },\n \"type\": \"USER\",\n \"id\": \"jsmith\"\n}" schema: type: object properties: username: type: string example: jsmith email: type: string example: john.smith@sbgenomics.com href: type: string example: https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test_volume/members/jsmith permissions: type: object properties: write: type: boolean example: false default: true read: type: boolean example: true default: true copy: type: boolean example: false default: true admin: type: boolean example: false default: true type: type: string example: USER id: type: string example: jsmith 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\nvolume = api.volumes.get(id='rfranklin/my-first-volume')\n\n# send GET request to SB API\nmember = volume.get_member(username='crickandwatson')\n\nprint(member.permissions)" name: Python samples-languages: - python tags: - Storage 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