From cafae2754e2a2ad228f9be8c8482138cadfa8a12 Mon Sep 17 00:00:00 2001 From: Suhas Pete Date: Tue, 14 Nov 2023 23:16:42 +0530 Subject: [PATCH 1/2] Add POST endpoint for additional access methods to existing object --- ...ional.data_repository_service.swagger.yaml | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drs_filer/api/additional.data_repository_service.swagger.yaml b/drs_filer/api/additional.data_repository_service.swagger.yaml index a3548c9..1d9e10f 100644 --- a/drs_filer/api/additional.data_repository_service.swagger.yaml +++ b/drs_filer/api/additional.data_repository_service.swagger.yaml @@ -110,6 +110,43 @@ paths: tags: - DRS-Filer x-swagger-router-controller: ga4gh.drs.server +'/objects/{object_id}/access': + post: + summary: Add additional access method to an existing object. + operationId: PostObjectAccess + responses: + '201': + description: Successfully added access method. + '400': + description: The request is malformed. + schema: + $ref: '#/definitions/Error' + '401': + description: The request is unauthorized. + schema: + $ref: '#/definitions/Error' + '403': + description: The requester is not authorized to perform this action. + schema: + $ref: '#/definitions/Error' + '500': + description: An unexpected error occurred. + schema: + $ref: '#/definitions/Error' + parameters: + - name: object_id + in: path + required: true + type: string + - in: body + name: AdditionalAccessMethod + description: Additional access method details. + schema: + $ref: '#/definitions/AdditionalAccessMethod' + tags: + - DRS-Filer + x-swagger-router-controller: ga4gh.drs.server + delete: summary: Delete object. description: >- @@ -148,7 +185,7 @@ paths: tags: - DRS-Filer x-swagger-router-controller: ga4gh.drs.server - '/objects/{object_id}/access/{access_id}': +'/objects/{object_id}/access/{access_id}': delete: summary: Delete object's access method. description: >- From 4a19ccd245bad2163db9b4e4240337bde4dd973b Mon Sep 17 00:00:00 2001 From: Suhas Pete <99081809+suhaspete@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:46:17 +0530 Subject: [PATCH 2/2] Update additional.data_repository_service.swagger.yaml --- ...ional.data_repository_service.swagger.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drs_filer/api/additional.data_repository_service.swagger.yaml b/drs_filer/api/additional.data_repository_service.swagger.yaml index 1d9e10f..1a0220d 100644 --- a/drs_filer/api/additional.data_repository_service.swagger.yaml +++ b/drs_filer/api/additional.data_repository_service.swagger.yaml @@ -129,6 +129,10 @@ paths: description: The requester is not authorized to perform this action. schema: $ref: '#/definitions/Error' + '409': + description: Conflict - Object with the same ID already exists. + schema: + $ref: '#/definitions/Error' '500': description: An unexpected error occurred. schema: @@ -538,3 +542,20 @@ definitions: - name tags: - name: DataRepositoryService +AdditionalAccessMethod: + type: object + properties: + method_id: + type: string + description: ID of the access method. + method_type: + type: string + description: Type of the access method (e.g., S3, HTTPS). + method_url: + type: string + description: URL for the access method. + required: + - method_id + - method_type + - method_url +