Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

...

Attribute name

Blob (File)

Bundle (Dataset)

id

A DRS id should be Synapse file id with version which makes it immutable e.g syn32132536.1 or a file handle ID prepended with the string “fh” (e.g., fh56789345)).

A DRS id should be Synapse dataset id with version which makes it immutable e.g syn32132349.1

name

Name of file e.g Test3.pages

Name of Dataset e.g Test Dataset

self_uri

A drs URI, as defined in the DRS documentation, that tells clients how to access this object.

e.g drs://repoprod.prod.sagebase.org/syn32132536.1

A drs URI, as defined in the DRS documentation, that tells clients how to access this object.

e.g drs://repoprod.prod.sagebase.org/syn32132349.1

size

File size in bytes eg 85.7 kb is 857000

For dataset the cumulative size, in bytes, of files it contains.

  • If the user has access on dataset then the size of dataset is sum of size of all the files under dataset.

created_time

Timestamp of file creation

Timestamp of dataset creation

updated_time

Timestamp of file updation

Timestamp of dataset updation

version

A string representing a version e.g 3

A string representing a version e.g 1

mime_type

FileHandle.contentType

Has no mime type

checksums

FileHandle.contentMd5

e.g d269b370219876bb6ace9a1ce190d730

The checksum is computed over a sorted concatenation of the checksums of its top-level contained objects(not recursive, names not included). The list of checksums is sorted alphabetically (hex-code) before concatenation and a further checksum is performed on the concatenated checksum value.

For example, if a dataset contains two files i.e file1 and file 2.

Then the checksum of the bundle is: md5( concat( sort( md5file1,md5file2 ) ) )

  • If the user has access on dataset then the checksum calculation will include md5 of all the files under dataset.

access_methods

access method will provide access id and the type will be https.

Has no access_method

contents

Has no contents.

List of object inside bundle.If the user has access on dataset then the content will contain list of all the files under dataset irrespective of access on each file level.

  • If the user has access on dataset then the contents will contain list of all the files under dataset irrespective of access on each file level.

description

Description of file.

Description of Dataset.

...

Attribute name

Description

type

Type of the access method e.g https

access_id

Access id should be generated by FileHandleAssociationType, syn_id and filehandle_id and concatenating them by '-'. FileHandleAssociationType_<syn_id> '_’ <filehandle_id>.

Where <syn_id> is syn123.1

.e.g FileEntity_syn123.1_56789345

or, if the DRS object is being retrieved with a file handle ID, the Access id will be the file handle ID prepended with the string “fh”.

e.g., fh56789345.

contents attribute description

...

The get information about a DRSObject API will provide information about the DrsObject which can be file or dataset as shown below in json example. DrsObject is fetched by drsId i.e Synapse Id plus version which makes it immutable, or the file handle ID prepended with the string “fh” (e.g., fh123)).

https://{serverURL}/ga4gh/drs/v1/objects/{object_id}

...

object_id: object id is drs object id i.e Synapse Id plus version which makes it immutable, or the file handle ID prepended with the string “fh” (e.g., fh123)).

Authorization :

Bearer Auth should be done on controller level as done for all other API’s.

...

Code Block
languagejson
{
   "id":"syn31538774.3",
   "name":"Test.pages",
   "self_uri":"drs://repo-prod.prod.sagebase.org/syn31538774.3",
   "size":85000,
   "created_time":"2022-06-24T14:08:22Z",
   "updated_time":"2022-06-24T14:08:22Z",
   "version":"3",
   "mime_type":"application/json",
   "checksums":{
      "checksum":"61a4460d8069359a577d65e7e94dd6d4",
      "type":"md5"
   },
   "access_methods":[
      {
         "type":"https",
         "access_id":"FileEntity_syn31538774.3_56789345"
      }
   ],
   "description":"file description"
}

Blob (file) example with file handle ID as Object ID:

Request Url: https://repo-prod.prod.sagebase.org/ga4gh/drs/v1/objects/fh56789345

RESPONSE BODY SCHEMA: application/json

Code Block
languagejson
{
   "id":"fh56789345",
   "name":Test.pages,
   "self_uri":"drs://repo-prod.prod.sagebase.org/fh56789345",
   "size":85000,
   "created_time":"2022-06-24T14:08:22Z",
   "updated_time":"2022-06-24T14:08:22Z",
   "version":null,
   "mime_type":"application/json",
   "checksums":{
      "checksum":"61a4460d8069359a577d65e7e94dd6d4",
      "type":"md5"
   },
   "access_methods":[
      {
         "type":"https",
         "access_id":"fh56789345"
      }
   ],
   "description":null
}

...

object_id: Object id is drs object id. i.e Synapse Id plus version which makes it immutable or the file handle ID prepended with the string “fh” (e.g., fh123)).

access_id: Access id from access methods list of drs object.

...

Code Block
languagejson
{
"url": "https://s3.amazonaws.com/proddata.sagebase.org/3449751/645bd567-5f63-46d0-92ee-0d58dbfb08e9"
}

Blob (file) example with file handle ID as Object ID:

https://repo-prod.prod.sagebase.org/ga4gh/drs/v1/objects/fh56789345/access/fh56789345

REQUEST BODY SCHEMA: None

RESPONSE BODY SCHEMA: application/json

The presigned url will be sent to the user and the file can be downloaded directly from the url without any authentication, as the presigned url has tokens included, which expires with time.

Code Block
languagejson
{
"url": "https://s3.amazonaws.com/proddata.sagebase.org/3449751/645bd567-5f63-46d0-92ee-0d58dbfb08e9"
}

...