Document toolboxDocument toolbox

Data Repository Service (DRS) Extension for File Handle ID

Introduction

The Data Repository Service (DRS) API provides a generic interface to data repositories so data consumers, including workflow systems, can access data objects in a single, standard way regardless of where they are stored and how they are managed. The primary functionality of DRS is to map a logical ID to a means for physically retrieving the data represented by the ID.

The current design for Synapse’s DRS service is defined here: https://sagebionetworks.jira.com/wiki/spaces/PLFM/pages/2651521031. Currently, only file entities (and bundles of entities) can be downloaded through this service using their Synapse IDs to retrieve a DRSObject. This document describes the changes to the service that will be needed to allow the use of a file handle ID to fetch a DRSObject for any file-based content.

Service Modifications

The get information about a DRSObject endpoint provides information about the DrsObject. A DrsObject is fetched by object_id, which as currently defined is the object’s Synapse ID plus version, which makes it immutable. To allow use of a file handle ID to fetch a DRSObject for any file-base object, the service will be modified so that a file handle ID prepended with the string “filehandle-” can be used as the object_id. The service will parse this object_id to determine the Synapse ID for creation of a DrsObject as shown in the example below.

Resource URL:

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

HTTP method :

GET

Path Parameters :

object_id: object id is drs object id (i.e. its Synapse ID, plus its version, which makes it immutable (e.g., syn123.1) OR the file handle ID prepended with the string “filehandle-” (e.g., filehandle-123)).

Example:

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

RESPONSE BODY SCHEMA: application/json

{ "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" }

HTTP Responses

HTTP Code

Description

Schema

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