Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
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 | ||
---|---|---|
| ||
{ "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 | ||
---|---|---|
| ||
{ "id":"syn31538774.3fh56789345", "name":"Test.pages", "self_uri":"drs://repo-prod.prod.sagebase.org/syn31538774.3fh56789345", "size":85000, "created_time":"2022-06-24T14:08:22Z", "updated_time":"2022-06-24T14:08:22Z", "version":"3"null, "mime_type":"application/json", "checksums":{ "checksum":"61a4460d8069359a577d65e7e94dd6d4", "type":"md5" }, "access_methods":[ { "type":"https", "access_id":"fh56789345" } ], "description":"file description"null } |
HTTP Responses
HTTP Code | Description | Schema |
---|---|---|
200 | The DrsObject was found successfully. | DrsObject |
400 | The request is malformed. | Error |
401 | The request is unauthorized. | Error |
403 | The requester is not authorized to perform this action. | Error |
404 | The requested DrsObject wasn’t found. | Error |
500 | An unexpected error occurred. | Error |
...
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 | ||
---|---|---|
| ||
{ "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 | ||
---|---|---|
| ||
{ "url": "https://s3.amazonaws.com/proddata.sagebase.org/3449751/645bd567-5f63-46d0-92ee-0d58dbfb08e9" } |
...