From 0e4abfa39913a062bf53c52700e6b7509ee48393 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:21:13 -0700 Subject: [PATCH 01/40] first attempt to add bulk operations --- .../components/responses/200OkDrsObjects.yaml | 11 ++++++ openapi/data_repository_service.openapi.yaml | 6 ++- openapi/paths/bulkobjects@{object_id}.yaml | 39 +++++++++++++++++++ .../paths/bulkobjects@{object_id}@access.yaml | 29 ++++++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 openapi/components/responses/200OkDrsObjects.yaml create mode 100644 openapi/paths/bulkobjects@{object_id}.yaml create mode 100644 openapi/paths/bulkobjects@{object_id}@access.yaml diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml new file mode 100644 index 00000000..b7192316 --- /dev/null +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -0,0 +1,11 @@ +description: The `DrsObject` was found successfully +content: + application/json: + schema: + type: object + properties: + drsobjects: + type: array + items: + type: + $ref: '../schemas/DrsObject.yaml' diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index dc50b823..284d8952 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -17,7 +17,7 @@ servers: serverURL: default: drs.example.org description: > - DRS server endpoints MUST be prefixed by the '/ga4gh/drs/v1' endpoint + DRS server endpoints MUST be prefixed by the '/ga4gh/drs/v1' endpoint path security: - {} @@ -103,8 +103,12 @@ x-tagGroups: paths: /objects/{object_id}: $ref: ./paths/objects@{object_id}.yaml + /bulk/objects/{object_id}: + $ref: ./paths/bulkobjects@{object_id}.yaml /objects/{object_id}/access/{access_id}: $ref: ./paths/objects@{object_id}@access@{access_id}.yaml + /bulk/objects/{object_id}/access: + $ref: ./paths/objects@{object_id}@access.yaml components: securitySchemes: BasicAuth: diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml new file mode 100644 index 00000000..b023fd0d --- /dev/null +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -0,0 +1,39 @@ +post: + summary: Get info about multiple DrsObjects. + description: >- + Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. + operationId: GetObject + parameters: + - $ref: '../components/parameters/ObjectId.yaml' + - $ref: '../components/parameters/Expand.yaml' + responses: + 200: + $ref: '../components/responses/200OkDrsObject.yaml' + 202: + $ref: '../components/responses/202Accepted.yaml' + 400: + $ref: '../components/responses/400BadRequest.yaml' + 401: + $ref: '../components/responses/401Unauthorized.yaml' + 403: + $ref: '../components/responses/403Forbidden.yaml' + 404: + $ref: '../components/responses/404NotFoundDrsObject.yaml' + 500: + $ref: '../components/responses/500InternalServerError.yaml' + tags: + - Objects + x-swagger-router-controller: ga4gh.drs.server + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + objectids: + type: array + items: + type: + $ref: '../components/parameters/ObjectId.yaml' + description: An array of ObjectIds diff --git a/openapi/paths/bulkobjects@{object_id}@access.yaml b/openapi/paths/bulkobjects@{object_id}@access.yaml new file mode 100644 index 00000000..0fa88c16 --- /dev/null +++ b/openapi/paths/bulkobjects@{object_id}@access.yaml @@ -0,0 +1,29 @@ +get: + summary: Get a URL for fetching bytes + description: >- + Returns a URL that can be used to fetch the bytes of a `DrsObject`. + + This method only needs to be called when using an `AccessMethod` that contains an `access_id` + (e.g., for servers that use signed URLs for fetching object bytes). + operationId: GetAccessURL + parameters: + - $ref: '../components/parameters/ObjectId.yaml' + - $ref: '../components/parameters/AccessId.yaml' + responses: + 200: + $ref: '../components/responses/200OkAccess.yaml' + 202: + $ref: '../components/responses/202Accepted.yaml' + 400: + $ref: '../components/responses/400BadRequest.yaml' + 401: + $ref: '../components/responses/401Unauthorized.yaml' + 403: + $ref: '../components/responses/403Forbidden.yaml' + 404: + $ref: '../components/responses/404NotFoundAccess.yaml' + 500: + $ref: '../components/responses/500InternalServerError.yaml' + tags: + - Objects + x-swagger-router-controller: ga4gh.drs.server \ No newline at end of file From a35aedd512f090d41198bf09b896ba645b9efa34 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:28:51 -0700 Subject: [PATCH 02/40] bulk operations prototyping --- openapi/components/responses/200OkDrsObjects.yaml | 2 +- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- openapi/paths/bulkobjects@{object_id}@access.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml index b7192316..24bc803c 100644 --- a/openapi/components/responses/200OkDrsObjects.yaml +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -1,4 +1,4 @@ -description: The `DrsObject` was found successfully +description: The `DrsObjects` were found successfully content: application/json: schema: diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index b023fd0d..a8600ccf 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -2,7 +2,7 @@ post: summary: Get info about multiple DrsObjects. description: >- Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. - operationId: GetObject + operationId: GetBulkObject parameters: - $ref: '../components/parameters/ObjectId.yaml' - $ref: '../components/parameters/Expand.yaml' diff --git a/openapi/paths/bulkobjects@{object_id}@access.yaml b/openapi/paths/bulkobjects@{object_id}@access.yaml index 0fa88c16..60ce9e3f 100644 --- a/openapi/paths/bulkobjects@{object_id}@access.yaml +++ b/openapi/paths/bulkobjects@{object_id}@access.yaml @@ -5,7 +5,7 @@ get: This method only needs to be called when using an `AccessMethod` that contains an `access_id` (e.g., for servers that use signed URLs for fetching object bytes). - operationId: GetAccessURL + operationId: GetBulkAccessURL parameters: - $ref: '../components/parameters/ObjectId.yaml' - $ref: '../components/parameters/AccessId.yaml' @@ -26,4 +26,4 @@ get: $ref: '../components/responses/500InternalServerError.yaml' tags: - Objects - x-swagger-router-controller: ga4gh.drs.server \ No newline at end of file + x-swagger-router-controller: ga4gh.drs.server From e7fcf31c678416c118f5503cac0b16fe42d87616 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:32:59 -0700 Subject: [PATCH 03/40] bulk operations prototyping --- openapi/data_repository_service.openapi.yaml | 2 +- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- openapi/paths/bulkobjects@{object_id}@access.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index 284d8952..a2c84b90 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -108,7 +108,7 @@ paths: /objects/{object_id}/access/{access_id}: $ref: ./paths/objects@{object_id}@access@{access_id}.yaml /bulk/objects/{object_id}/access: - $ref: ./paths/objects@{object_id}@access.yaml + $ref: ./paths/bulkobjects@{object_id}@access.yaml components: securitySchemes: BasicAuth: diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index a8600ccf..53156f82 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -8,7 +8,7 @@ post: - $ref: '../components/parameters/Expand.yaml' responses: 200: - $ref: '../components/responses/200OkDrsObject.yaml' + $ref: '../components/responses/200OkDrsObjects.yaml' 202: $ref: '../components/responses/202Accepted.yaml' 400: diff --git a/openapi/paths/bulkobjects@{object_id}@access.yaml b/openapi/paths/bulkobjects@{object_id}@access.yaml index 60ce9e3f..efbcdfe3 100644 --- a/openapi/paths/bulkobjects@{object_id}@access.yaml +++ b/openapi/paths/bulkobjects@{object_id}@access.yaml @@ -1,4 +1,4 @@ -get: +post: summary: Get a URL for fetching bytes description: >- Returns a URL that can be used to fetch the bytes of a `DrsObject`. From ac3e6ea6bea7a87381740321adf8aaa5d3ad3dee Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:35:38 -0700 Subject: [PATCH 04/40] bulk operations prototyping --- openapi/paths/bulkobjects@{object_id}.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 53156f82..398e849a 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -2,9 +2,8 @@ post: summary: Get info about multiple DrsObjects. description: >- Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. - operationId: GetBulkObject + operationId: GetBulkObjects parameters: - - $ref: '../components/parameters/ObjectId.yaml' - $ref: '../components/parameters/Expand.yaml' responses: 200: From 7df1396c50fd3753381e67eedeea2bd7d3340a9f Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:40:26 -0700 Subject: [PATCH 05/40] bulk operations prototyping --- openapi/paths/bulkobjects@{object_id}.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 398e849a..143bee12 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -33,6 +33,5 @@ post: objectids: type: array items: - type: - $ref: '../components/parameters/ObjectId.yaml' + type: string description: An array of ObjectIds From f1734abdadb9cbc1c4c9a0a96dab13a21658fef9 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:40:56 -0700 Subject: [PATCH 06/40] bulk operations prototyping --- openapi/components/responses/200OkDrsObjects.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml index 24bc803c..a80380cc 100644 --- a/openapi/components/responses/200OkDrsObjects.yaml +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -7,5 +7,4 @@ content: drsobjects: type: array items: - type: - $ref: '../schemas/DrsObject.yaml' + type: string From 1898a0f66d5ed3ea11fac3db2c5f33b8cf3f4d27 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:43:23 -0700 Subject: [PATCH 07/40] bulk operations prototyping --- openapi/components/responses/200OkDrsObjects.yaml | 2 +- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml index a80380cc..e82051b7 100644 --- a/openapi/components/responses/200OkDrsObjects.yaml +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -7,4 +7,4 @@ content: drsobjects: type: array items: - type: string + $ref: '../schemas/DrsObject.yaml' diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 143bee12..68fcfaca 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -33,5 +33,5 @@ post: objectids: type: array items: - type: string + $ref: '../components/parameters/ObjectId.yaml' description: An array of ObjectIds From 982ea08b32bb8c0b33af92027a826af8cb683ad7 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 22:52:49 -0700 Subject: [PATCH 08/40] bulk operations prototyping --- openapi/components/parameters/BulkObjectId.yaml | 5 +++++ openapi/data_repository_service.openapi.yaml | 2 +- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 openapi/components/parameters/BulkObjectId.yaml diff --git a/openapi/components/parameters/BulkObjectId.yaml b/openapi/components/parameters/BulkObjectId.yaml new file mode 100644 index 00000000..c6e201d0 --- /dev/null +++ b/openapi/components/parameters/BulkObjectId.yaml @@ -0,0 +1,5 @@ +name: bulk_object_id +required: true +description: '`DrsObject` identifier' +schema: + type: string diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index a2c84b90..34ae9fb5 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -103,7 +103,7 @@ x-tagGroups: paths: /objects/{object_id}: $ref: ./paths/objects@{object_id}.yaml - /bulk/objects/{object_id}: + /bulk/objects: $ref: ./paths/bulkobjects@{object_id}.yaml /objects/{object_id}/access/{access_id}: $ref: ./paths/objects@{object_id}@access@{access_id}.yaml diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 68fcfaca..730d9e72 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -33,5 +33,5 @@ post: objectids: type: array items: - $ref: '../components/parameters/ObjectId.yaml' + $ref: '../components/parameters/BulkObjectId.yaml' description: An array of ObjectIds From b5806c6ea7017f51bbacfec8aa30282ec877cfc0 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 23:07:02 -0700 Subject: [PATCH 09/40] bulk operations prototyping --- .../components/responses/200OkAccesses.yaml | 10 ++++++++++ openapi/components/schemas/BulkAccessURL.yaml | 17 +++++++++++++++++ openapi/data_repository_service.openapi.yaml | 4 ++-- ...aml => bulkobjects@access@{access_id}.yaml} | 18 +++++++++++++++--- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 openapi/components/responses/200OkAccesses.yaml create mode 100644 openapi/components/schemas/BulkAccessURL.yaml rename openapi/paths/{bulkobjects@{object_id}@access.yaml => bulkobjects@access@{access_id}.yaml} (61%) diff --git a/openapi/components/responses/200OkAccesses.yaml b/openapi/components/responses/200OkAccesses.yaml new file mode 100644 index 00000000..60f312f6 --- /dev/null +++ b/openapi/components/responses/200OkAccesses.yaml @@ -0,0 +1,10 @@ +description: The `AccessURL` was found successfully +content: + application/json: + schema: + type: object + properties: + access_urls: + type: array + items: + $ref: '../schemas/BulkAccessURL.yaml' diff --git a/openapi/components/schemas/BulkAccessURL.yaml b/openapi/components/schemas/BulkAccessURL.yaml new file mode 100644 index 00000000..3fdf01d0 --- /dev/null +++ b/openapi/components/schemas/BulkAccessURL.yaml @@ -0,0 +1,17 @@ +type: object +required: + - url +properties: + object_id: + $ref: '../components/parameters/BulkObjectId.yaml' + url: + type: string + description: A fully resolvable URL that can be used to fetch the actual object bytes. + headers: + type: array + items: + type: string + description: >- + An optional list of headers to include in the HTTP request to `url`. + These headers can be used to provide auth tokens required to fetch the object bytes. + example: 'Authorization: Basic Z2E0Z2g6ZHJz' diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index 34ae9fb5..8f38ca33 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -107,8 +107,8 @@ paths: $ref: ./paths/bulkobjects@{object_id}.yaml /objects/{object_id}/access/{access_id}: $ref: ./paths/objects@{object_id}@access@{access_id}.yaml - /bulk/objects/{object_id}/access: - $ref: ./paths/bulkobjects@{object_id}@access.yaml + /bulk/objects/access/{access_id}: + $ref: ./paths/bulkobjects@access@{access_id}.yaml components: securitySchemes: BasicAuth: diff --git a/openapi/paths/bulkobjects@{object_id}@access.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml similarity index 61% rename from openapi/paths/bulkobjects@{object_id}@access.yaml rename to openapi/paths/bulkobjects@access@{access_id}.yaml index efbcdfe3..ab61e8a7 100644 --- a/openapi/paths/bulkobjects@{object_id}@access.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -1,7 +1,7 @@ post: - summary: Get a URL for fetching bytes + summary: Get a URLs for fetching bytes from multiple objects description: >- - Returns a URL that can be used to fetch the bytes of a `DrsObject`. + Returns an array of URL objects that can be used to fetch the bytes of multiple `DrsObject`s. This method only needs to be called when using an `AccessMethod` that contains an `access_id` (e.g., for servers that use signed URLs for fetching object bytes). @@ -11,7 +11,7 @@ post: - $ref: '../components/parameters/AccessId.yaml' responses: 200: - $ref: '../components/responses/200OkAccess.yaml' + $ref: '../components/responses/200OkAccesses.yaml' 202: $ref: '../components/responses/202Accepted.yaml' 400: @@ -27,3 +27,15 @@ post: tags: - Objects x-swagger-router-controller: ga4gh.drs.server + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + object_ids: + type: array + items: + $ref: '../components/parameters/BulkObjectId.yaml' + description: An array of ObjectIDs diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 730d9e72..5bf36bf2 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -30,7 +30,7 @@ post: schema: type: object properties: - objectids: + object_ids: type: array items: $ref: '../components/parameters/BulkObjectId.yaml' From e9285af573025ca6a55e411c06ce3cd325f1bf55 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 23:17:10 -0700 Subject: [PATCH 10/40] bulk operations prototyping --- openapi/paths/bulkobjects@access@{access_id}.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index ab61e8a7..15cc3b6f 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -7,7 +7,6 @@ post: (e.g., for servers that use signed URLs for fetching object bytes). operationId: GetBulkAccessURL parameters: - - $ref: '../components/parameters/ObjectId.yaml' - $ref: '../components/parameters/AccessId.yaml' responses: 200: From c1d72ce97de1f8057dc6e0f9e63c2bacd40e5de2 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 23:22:46 -0700 Subject: [PATCH 11/40] bulk operations prototyping --- openapi/paths/bulkobjects@access@{access_id}.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index 15cc3b6f..f2ad1449 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -34,7 +34,4 @@ post: type: object properties: object_ids: - type: array - items: - $ref: '../components/parameters/BulkObjectId.yaml' - description: An array of ObjectIDs + type: string From a6c268cfb32a451363f12d6342f133e7cbede0ed Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sun, 15 Aug 2021 23:26:03 -0700 Subject: [PATCH 12/40] bulk operations prototyping --- openapi/paths/bulkobjects@access@{access_id}.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index f2ad1449..0ba7de1d 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -1,5 +1,5 @@ post: - summary: Get a URLs for fetching bytes from multiple objects + summary: Get URLs for fetching bytes from multiple objects description: >- Returns an array of URL objects that can be used to fetch the bytes of multiple `DrsObject`s. @@ -34,4 +34,7 @@ post: type: object properties: object_ids: - type: string + type: array + items: + $ref: '../components/parameters/BulkObjectId.yaml' + description: An array of ObjectIDs From ba1ba6bd8affdd4c6281005a8596a453dbf9bc90 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 10 Jan 2022 09:58:39 -0800 Subject: [PATCH 13/40] responding to comments on PR#365 --- openapi/components/parameters/BulkObjectAccessId.yaml | 10 ++++++++++ openapi/data_repository_service.openapi.yaml | 4 ++-- openapi/paths/bulkobjects@access@{access_id}.yaml | 6 +++--- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 openapi/components/parameters/BulkObjectAccessId.yaml diff --git a/openapi/components/parameters/BulkObjectAccessId.yaml b/openapi/components/parameters/BulkObjectAccessId.yaml new file mode 100644 index 00000000..34009a30 --- /dev/null +++ b/openapi/components/parameters/BulkObjectAccessId.yaml @@ -0,0 +1,10 @@ +name: bulk_object_access_id +required: true +description: '`DrsObject` identifier and access ids' +schema: + type: object + properties: + object_id: + type: string + access_id: + type: string diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index 8f38ca33..b0decbfa 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -103,11 +103,11 @@ x-tagGroups: paths: /objects/{object_id}: $ref: ./paths/objects@{object_id}.yaml - /bulk/objects: + /objects: $ref: ./paths/bulkobjects@{object_id}.yaml /objects/{object_id}/access/{access_id}: $ref: ./paths/objects@{object_id}@access@{access_id}.yaml - /bulk/objects/access/{access_id}: + /objects/access: $ref: ./paths/bulkobjects@access@{access_id}.yaml components: securitySchemes: diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index 0ba7de1d..d8d840c0 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -33,8 +33,8 @@ post: schema: type: object properties: - object_ids: + selection: type: array items: - $ref: '../components/parameters/BulkObjectId.yaml' - description: An array of ObjectIDs + $ref: '../components/parameters/BulkObjectAccessId.yaml' + description: An array of ObjectIDs paired with their access IDs diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 5bf36bf2..de35610e 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -30,7 +30,7 @@ post: schema: type: object properties: - object_ids: + selection: type: array items: $ref: '../components/parameters/BulkObjectId.yaml' From a0f9f33294c77d45c2db9c08a94818d586fd6cb6 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 3 Feb 2022 22:51:25 -0800 Subject: [PATCH 14/40] Create summary.yaml --- openapi/components/schemas/summary.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 openapi/components/schemas/summary.yaml diff --git a/openapi/components/schemas/summary.yaml b/openapi/components/schemas/summary.yaml new file mode 100644 index 00000000..259bf296 --- /dev/null +++ b/openapi/components/schemas/summary.yaml @@ -0,0 +1,12 @@ +type: object +description: A summary of what was resolved. +properties: + requested: + type: integer + description: Number of items requested. + resolved: + type: integer + description: Number of objects resolved. + unresolved: + type: integer + description: Number of objects not resolved. From 264bf079d9d8b6c8636d86164198cabe63817a59 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 3 Feb 2022 22:57:13 -0800 Subject: [PATCH 15/40] Create unresolved.yaml --- openapi/components/schemas/unresolved.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 openapi/components/schemas/unresolved.yaml diff --git a/openapi/components/schemas/unresolved.yaml b/openapi/components/schemas/unresolved.yaml new file mode 100644 index 00000000..9238307d --- /dev/null +++ b/openapi/components/schemas/unresolved.yaml @@ -0,0 +1,4 @@ +type: object + description: Error codes for each unresolved drs objects. + additionalProperties: + type: integer From 39a4fb46cfc381a20b6afcd20bff58e983b28bb5 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 3 Feb 2022 22:58:41 -0800 Subject: [PATCH 16/40] Update 200OkDrsObjects.yaml --- openapi/components/responses/200OkDrsObjects.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml index e82051b7..994901b9 100644 --- a/openapi/components/responses/200OkDrsObjects.yaml +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -4,7 +4,15 @@ content: schema: type: object properties: - drsobjects: + summary: + type: object + items: + $ref: '../schemas/summary.yaml' + unresolved_drs_object: + type: object + items: + $ref: '../schemas/unresolved.yaml' + resolved_drs_object: type: array items: $ref: '../schemas/DrsObject.yaml' From d7ccae7e3f28e34f27d4d96026544eacb7e3b3c3 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 7 Feb 2022 10:24:18 -0800 Subject: [PATCH 17/40] working on bulk schema changes --- .../parameters/BulkObjectAccessId.yaml | 24 +++++++++++-------- .../components/parameters/BulkObjectId.yaml | 12 ++++++---- .../paths/bulkobjects@access@{access_id}.yaml | 10 +------- openapi/paths/bulkobjects@{object_id}.yaml | 8 +------ 4 files changed, 23 insertions(+), 31 deletions(-) diff --git a/openapi/components/parameters/BulkObjectAccessId.yaml b/openapi/components/parameters/BulkObjectAccessId.yaml index 34009a30..4c623e9b 100644 --- a/openapi/components/parameters/BulkObjectAccessId.yaml +++ b/openapi/components/parameters/BulkObjectAccessId.yaml @@ -1,10 +1,14 @@ -name: bulk_object_access_id -required: true -description: '`DrsObject` identifier and access ids' -schema: - type: object - properties: - object_id: - type: string - access_id: - type: string +type: object +description: The object that contains object_id/access_id tuples +properties: + bulk_object_access_ids: + type: array + items: + type: object + properties: + bulk_object_id: + type: string + bulk_access_ids: + type: array + items: + type: string diff --git a/openapi/components/parameters/BulkObjectId.yaml b/openapi/components/parameters/BulkObjectId.yaml index c6e201d0..2eac906d 100644 --- a/openapi/components/parameters/BulkObjectId.yaml +++ b/openapi/components/parameters/BulkObjectId.yaml @@ -1,5 +1,7 @@ -name: bulk_object_id -required: true -description: '`DrsObject` identifier' -schema: - type: string +type: object +description: The object that contains the DRS object IDs array +properties: + bulk_object_ids: + type: array + items: + type: string diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index d8d840c0..f1555e7a 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -6,8 +6,6 @@ post: This method only needs to be called when using an `AccessMethod` that contains an `access_id` (e.g., for servers that use signed URLs for fetching object bytes). operationId: GetBulkAccessURL - parameters: - - $ref: '../components/parameters/AccessId.yaml' responses: 200: $ref: '../components/responses/200OkAccesses.yaml' @@ -31,10 +29,4 @@ post: content: application/json: schema: - type: object - properties: - selection: - type: array - items: - $ref: '../components/parameters/BulkObjectAccessId.yaml' - description: An array of ObjectIDs paired with their access IDs + $ref: '../components/parameters/BulkObjectAccessId.yaml' diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index de35610e..75a4396e 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -28,10 +28,4 @@ post: content: application/json: schema: - type: object - properties: - selection: - type: array - items: - $ref: '../components/parameters/BulkObjectId.yaml' - description: An array of ObjectIds + $ref: '../components/parameters/BulkObjectId.yaml' From 0fad71e6750ef212dd0075d39e6598c57c3870b6 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 7 Feb 2022 10:49:01 -0800 Subject: [PATCH 18/40] updates --- CONTRIBUTING.md | 2 +- openapi/components/schemas/unresolved.yaml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c980f9df..7a50d982 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,7 +83,7 @@ this will not automatically be built from our Travis. However, if you are a developer and have created a feature branch following the naming convention above, you should see automated builds. -Check https://travis-ci.org/ga4gh/data-repository-service-schemas/builds to see the status of the builds. +Check https://travis-ci.com/ga4gh/data-repository-service-schemas/builds to see the status of the builds. Pull Request Voting Process =========================== diff --git a/openapi/components/schemas/unresolved.yaml b/openapi/components/schemas/unresolved.yaml index 9238307d..34343c9c 100644 --- a/openapi/components/schemas/unresolved.yaml +++ b/openapi/components/schemas/unresolved.yaml @@ -1,4 +1,13 @@ type: object - description: Error codes for each unresolved drs objects. - additionalProperties: - type: integer +description: Error codes for each unresolved drs objects. +properties: + type: array + items: + type: object + properties: + error_code: + type: integer + object_ids: + type: array + items: + type: string From 0a84ce204ed6319cb3c524313cbf1806d288f7eb Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 7 Feb 2022 11:05:04 -0800 Subject: [PATCH 19/40] updates --- openapi/components/schemas/BulkAccessURL.yaml | 2 +- openapi/components/schemas/unresolved.yaml | 22 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/openapi/components/schemas/BulkAccessURL.yaml b/openapi/components/schemas/BulkAccessURL.yaml index 3fdf01d0..8de07a04 100644 --- a/openapi/components/schemas/BulkAccessURL.yaml +++ b/openapi/components/schemas/BulkAccessURL.yaml @@ -3,7 +3,7 @@ required: - url properties: object_id: - $ref: '../components/parameters/BulkObjectId.yaml' + $ref: '../parameters/BulkObjectId.yaml' url: type: string description: A fully resolvable URL that can be used to fetch the actual object bytes. diff --git a/openapi/components/schemas/unresolved.yaml b/openapi/components/schemas/unresolved.yaml index 34343c9c..4a6d2002 100644 --- a/openapi/components/schemas/unresolved.yaml +++ b/openapi/components/schemas/unresolved.yaml @@ -1,13 +1,11 @@ -type: object +type: array description: Error codes for each unresolved drs objects. -properties: - type: array - items: - type: object - properties: - error_code: - type: integer - object_ids: - type: array - items: - type: string +items: + type: object + properties: + error_code: + type: integer + object_ids: + type: array + items: + type: string From ddcf7c6f11076c1296ab4de65a9aeafad3d68859 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 14 Mar 2022 10:31:28 -0700 Subject: [PATCH 20/40] fixed 200 return object for objects endpoint --- openapi/components/responses/200OkDrsObjects.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/openapi/components/responses/200OkDrsObjects.yaml b/openapi/components/responses/200OkDrsObjects.yaml index 994901b9..acede161 100644 --- a/openapi/components/responses/200OkDrsObjects.yaml +++ b/openapi/components/responses/200OkDrsObjects.yaml @@ -5,13 +5,9 @@ content: type: object properties: summary: - type: object - items: - $ref: '../schemas/summary.yaml' - unresolved_drs_object: - type: object - items: - $ref: '../schemas/unresolved.yaml' + $ref: '../schemas/summary.yaml' + unresolved_drs_objects: + $ref: '../schemas/unresolved.yaml' resolved_drs_object: type: array items: From 3dbcc96c98e8741ad8b7afc18276f0555b385314 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 14 Mar 2022 11:13:09 -0700 Subject: [PATCH 21/40] fixed 200 return object for objects endpoint --- openapi/components/responses/200OkAccesses.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/components/responses/200OkAccesses.yaml b/openapi/components/responses/200OkAccesses.yaml index 60f312f6..b946ffd7 100644 --- a/openapi/components/responses/200OkAccesses.yaml +++ b/openapi/components/responses/200OkAccesses.yaml @@ -7,4 +7,4 @@ content: access_urls: type: array items: - $ref: '../schemas/BulkAccessURL.yaml' + $ref: '../schemas/BulkObjectSingleAccessURL.yaml' From efeca29e151f90375b0023b7a71fe70a1c0fabe6 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 11:51:12 +0200 Subject: [PATCH 22/40] trying to include passports as a parameter in the bulk body request --- openapi/paths/bulkobjects@access@{access_id}.yaml | 6 ++++++ openapi/paths/bulkobjects@{object_id}.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index d8d840c0..31156ef8 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -38,3 +38,9 @@ post: items: $ref: '../components/parameters/BulkObjectAccessId.yaml' description: An array of ObjectIDs paired with their access IDs + selection: + type: array + items: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM + description: the encoded JWT GA4GH Passport that contains embedded Visas. The overall JWT is signed as are the individual Passport Visas. diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index de35610e..e2f1ed2e 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -35,3 +35,9 @@ post: items: $ref: '../components/parameters/BulkObjectId.yaml' description: An array of ObjectIds + selection: + type: array + items: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM + description: the encoded JWT GA4GH Passport that contains embedded Visas. The overall JWT is signed as are the individual Passport Visas. From 5938922b09fcccb5eeb46c4749cb51dfdd5a7297 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 12:06:35 +0200 Subject: [PATCH 23/40] updating the build badge, trying to get passport to show up on bulk --- README.md | 2 +- openapi/paths/bulkobjects@{object_id}.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f4e7249..87a9e1e7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Data Repository Service (DRS) API -`develop` branch status: [![Build Status](https://travis-ci.org/ga4gh/data-repository-service-schemas.svg?branch=develop)](https://travis-ci.org/ga4gh/data-repository-service-schemas?branch=develop) +`develop` branch status: [![Build Status](https://app.travis-ci.com/ga4gh/data-repository-service-schemas.svg?branch=develop)](https://app.travis-ci.com/ga4gh/data-repository-service-schemas.svg?branch=develop) Swagger Validator [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1405753.svg)](https://doi.org/10.5281/zenodo.1405753) The [Global Alliance for Genomics and Health](http://genomicsandhealth.org/) (GA4GH) is an international coalition, formed to enable the sharing of genomic and clinical data. diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index e2f1ed2e..2aa58d08 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -37,6 +37,7 @@ post: description: An array of ObjectIds selection: type: array + name: passports items: type: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM From 0414c4eecd56faff1d1ae91b84af89c26a9b6c45 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 12:21:04 +0200 Subject: [PATCH 24/40] working to get passports --- openapi/paths/bulkobjects@{object_id}.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 2aa58d08..e84b65fd 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -35,9 +35,8 @@ post: items: $ref: '../components/parameters/BulkObjectId.yaml' description: An array of ObjectIds - selection: + passports: type: array - name: passports items: type: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM From 6baeb8062a03c3d8384be7adbe44308bcf864740 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 13:27:55 +0200 Subject: [PATCH 25/40] trying to get passport field to show up --- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index e84b65fd..6e017a88 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -30,7 +30,7 @@ post: schema: type: object properties: - selection: + bulk_object_ids: type: array items: $ref: '../components/parameters/BulkObjectId.yaml' From d9e643e0b452575fb3bed457c4ce6dec1e4a60fd Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 13:36:52 +0200 Subject: [PATCH 26/40] trying to figure out adding passports --- openapi/paths/bulkobjects@{object_id}.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 6e017a88..810dde60 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -30,11 +30,6 @@ post: schema: type: object properties: - bulk_object_ids: - type: array - items: - $ref: '../components/parameters/BulkObjectId.yaml' - description: An array of ObjectIds passports: type: array items: From 10d627e61e9970406e35706c0ae5ef2d2814d88a Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 22 Sep 2022 13:42:57 +0200 Subject: [PATCH 27/40] trying to get this to build the docs --- openapi/paths/bulkobjects@{object_id}.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 810dde60..f001d46b 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -28,11 +28,4 @@ post: content: application/json: schema: - type: object - properties: - passports: - type: array - items: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM - description: the encoded JWT GA4GH Passport that contains embedded Visas. The overall JWT is signed as are the individual Passport Visas. + $ref: '../components/parameters/BulkObjectIdPassport.yaml' From 815f7df83962ac63e657fff4fc302d02f5da3d6b Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 27 Mar 2023 12:40:43 -0700 Subject: [PATCH 28/40] adding passports --- openapi/components/parameters/BulkObjectId.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openapi/components/parameters/BulkObjectId.yaml b/openapi/components/parameters/BulkObjectId.yaml index 2eac906d..beb09823 100644 --- a/openapi/components/parameters/BulkObjectId.yaml +++ b/openapi/components/parameters/BulkObjectId.yaml @@ -5,3 +5,7 @@ properties: type: array items: type: string + passports: + type: array + items: + type: string From d3b09b4afb328d9deaa636ce9aaf8899ac70480e Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 27 Mar 2023 12:56:53 -0700 Subject: [PATCH 29/40] working on bulk method for access URLs --- openapi/components/parameters/BulkObjectAccessId.yaml | 4 ++++ openapi/components/parameters/BulkObjectId.yaml | 4 ++-- openapi/components/responses/200OkAccesses.yaml | 8 ++++++-- openapi/components/schemas/BulkAccessURL.yaml | 6 ++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/openapi/components/parameters/BulkObjectAccessId.yaml b/openapi/components/parameters/BulkObjectAccessId.yaml index 4c623e9b..f2be7581 100644 --- a/openapi/components/parameters/BulkObjectAccessId.yaml +++ b/openapi/components/parameters/BulkObjectAccessId.yaml @@ -1,6 +1,10 @@ type: object description: The object that contains object_id/access_id tuples properties: + passports: + type: array + items: + type: string bulk_object_access_ids: type: array items: diff --git a/openapi/components/parameters/BulkObjectId.yaml b/openapi/components/parameters/BulkObjectId.yaml index beb09823..e19bc5f6 100644 --- a/openapi/components/parameters/BulkObjectId.yaml +++ b/openapi/components/parameters/BulkObjectId.yaml @@ -1,11 +1,11 @@ type: object description: The object that contains the DRS object IDs array properties: - bulk_object_ids: + passports: type: array items: type: string - passports: + bulk_object_ids: type: array items: type: string diff --git a/openapi/components/responses/200OkAccesses.yaml b/openapi/components/responses/200OkAccesses.yaml index b946ffd7..508abb7e 100644 --- a/openapi/components/responses/200OkAccesses.yaml +++ b/openapi/components/responses/200OkAccesses.yaml @@ -4,7 +4,11 @@ content: schema: type: object properties: - access_urls: + summary: + $ref: '../schemas/summary.yaml' + unresolved_drs_objects: + $ref: '../schemas/unresolved.yaml' + resolved_drs_object_access_urls: type: array items: - $ref: '../schemas/BulkObjectSingleAccessURL.yaml' + $ref: '../schemas/BulkAccessURL.yaml' diff --git a/openapi/components/schemas/BulkAccessURL.yaml b/openapi/components/schemas/BulkAccessURL.yaml index 8de07a04..866da73e 100644 --- a/openapi/components/schemas/BulkAccessURL.yaml +++ b/openapi/components/schemas/BulkAccessURL.yaml @@ -2,8 +2,10 @@ type: object required: - url properties: - object_id: - $ref: '../parameters/BulkObjectId.yaml' + drs_object_id: + type: string + drs_access_id: + type: string url: type: string description: A fully resolvable URL that can be used to fetch the actual object bytes. From 4a71e69a5cfc8ad9a9692c4f4d1742a176e87cdc Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 27 Mar 2023 13:59:27 -0700 Subject: [PATCH 30/40] added 413 error --- openapi/components/responses/404NotFoundDrsObject.yaml | 2 +- openapi/components/responses/413RequestTooLarge.yaml | 5 +++++ openapi/paths/bulkobjects@access@{access_id}.yaml | 2 ++ openapi/paths/bulkobjects@{object_id}.yaml | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 openapi/components/responses/413RequestTooLarge.yaml diff --git a/openapi/components/responses/404NotFoundDrsObject.yaml b/openapi/components/responses/404NotFoundDrsObject.yaml index 4160dd76..6741536a 100644 --- a/openapi/components/responses/404NotFoundDrsObject.yaml +++ b/openapi/components/responses/404NotFoundDrsObject.yaml @@ -2,4 +2,4 @@ description: The requested `DrsObject` wasn't found. content: application/json: schema: - $ref: '../schemas/Error.yaml' \ No newline at end of file + $ref: '../schemas/Error.yaml' diff --git a/openapi/components/responses/413RequestTooLarge.yaml b/openapi/components/responses/413RequestTooLarge.yaml new file mode 100644 index 00000000..f4d2615a --- /dev/null +++ b/openapi/components/responses/413RequestTooLarge.yaml @@ -0,0 +1,5 @@ +description: The bulk request is too large. +content: + application/json: + schema: + $ref: '../schemas/Error.yaml' diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index f1555e7a..6f437c96 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -19,6 +19,8 @@ post: $ref: '../components/responses/403Forbidden.yaml' 404: $ref: '../components/responses/404NotFoundAccess.yaml' + 413: + $ref: '../components/responses/413RequestTooLarge.yaml' 500: $ref: '../components/responses/500InternalServerError.yaml' tags: diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 75a4396e..4453a0df 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -18,6 +18,8 @@ post: $ref: '../components/responses/403Forbidden.yaml' 404: $ref: '../components/responses/404NotFoundDrsObject.yaml' + 413: + $ref: '../components/responses/413RequestTooLarge.yaml' 500: $ref: '../components/responses/500InternalServerError.yaml' tags: From 9bf5892ce3795d9b0ef635cbf6904dc6ba2e3708 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 22 May 2023 13:29:33 -0700 Subject: [PATCH 31/40] working on adding bulk options endpoint --- .../parameters/BulkObjectSingleAccessId.yaml | 7 ++++ .../responses/200OkBulkAuthorizations.yaml | 14 ++++++++ .../components/schemas/Authorizations.yaml | 2 ++ .../paths/bulkobjects@access@{access_id}.yaml | 4 ++- openapi/paths/bulkobjects@{object_id}.yaml | 34 +++++++++++++++++-- 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 openapi/components/parameters/BulkObjectSingleAccessId.yaml create mode 100644 openapi/components/responses/200OkBulkAuthorizations.yaml diff --git a/openapi/components/parameters/BulkObjectSingleAccessId.yaml b/openapi/components/parameters/BulkObjectSingleAccessId.yaml new file mode 100644 index 00000000..256c79f1 --- /dev/null +++ b/openapi/components/parameters/BulkObjectSingleAccessId.yaml @@ -0,0 +1,7 @@ +type: object +description: The object that contains an object_id/access_id tuple +properties: + bulk_object_id: + type: string + bulk_object_access_id: + type: string diff --git a/openapi/components/responses/200OkBulkAuthorizations.yaml b/openapi/components/responses/200OkBulkAuthorizations.yaml new file mode 100644 index 00000000..83be4586 --- /dev/null +++ b/openapi/components/responses/200OkBulkAuthorizations.yaml @@ -0,0 +1,14 @@ +description: "`Authorizations` were found successfully" +content: + application/json: + schema: + type: object + properties: + summary: + $ref: '../schemas/summary.yaml' + unresolved_drs_objects: + $ref: '../schemas/unresolved.yaml' + resolved_drs_object: + type: array + items: + $ref: '../schemas/Authorizations.yaml' diff --git a/openapi/components/schemas/Authorizations.yaml b/openapi/components/schemas/Authorizations.yaml index 578a9cc0..b9d028dc 100644 --- a/openapi/components/schemas/Authorizations.yaml +++ b/openapi/components/schemas/Authorizations.yaml @@ -1,5 +1,7 @@ type: object properties: + drs_object_id: + type: string supported_types: type: array items: diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index 6f437c96..30f2cd79 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -1,10 +1,12 @@ post: - summary: Get URLs for fetching bytes from multiple objects + summary: Get URLs for fetching bytes from multiple objects with an optional Passport(s). description: >- Returns an array of URL objects that can be used to fetch the bytes of multiple `DrsObject`s. This method only needs to be called when using an `AccessMethod` that contains an `access_id` (e.g., for servers that use signed URLs for fetching object bytes). + + Currently this is limited to use passports (one or more) or a single bearer token, so make sure your bulk request is for objects that all use the same passports/token. operationId: GetBulkAccessURL responses: 200: diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 4453a0df..820dc028 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -1,7 +1,37 @@ +options: + summary: Get Authorization info about multiple DrsObjects. + security: + - {} + description: >- + Returns a structure that contains for each DrsObjects a list of `Authorizations` that can be used to determine how to authorize requests to `GetObject` or `PostObject` (or bulk equivalents). + operationId: OptionsBulkObject + responses: + 200: + $ref: '../components/responses/200OkBulkAuthorizations.yaml' + 204: + $ref: '../components/responses/AuthorizationsNotSupported.yaml' + 400: + $ref: '../components/responses/400BadRequest.yaml' + 404: + $ref: '../components/responses/404NotFoundDrsObject.yaml' + 405: + $ref: '../components/responses/AuthorizationsNotSupported.yaml' + 500: + $ref: '../components/responses/500InternalServerError.yaml' + tags: + - Objects + x-swagger-router-controller: ga4gh.drs.server + requestBody: + required: true + content: + application/json: + schema: + $ref: '../components/parameters/BulkObjectId.yaml' + post: - summary: Get info about multiple DrsObjects. + summary: Get info about multiple DrsObjects with an optional Passport(s). description: >- - Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. + Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. Currently this is limited to use passports (one or more) or a single bearer token, so make sure your bulk request is for objects that all use the same passports/token. operationId: GetBulkObjects parameters: - $ref: '../components/parameters/Expand.yaml' From bd798055415a5c74f54618f42ad0805a2ce6c4c0 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 22 May 2023 13:57:08 -0700 Subject: [PATCH 32/40] adding error 413 for the bulk options request --- openapi/paths/bulkobjects@{object_id}.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 820dc028..d0a49518 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -16,6 +16,8 @@ options: $ref: '../components/responses/404NotFoundDrsObject.yaml' 405: $ref: '../components/responses/AuthorizationsNotSupported.yaml' + 413: + $ref: '../components/responses/413RequestTooLarge.yaml' 500: $ref: '../components/responses/500InternalServerError.yaml' tags: From e1ea19c676f595bf0573a1c21c9979b97704fd5e Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 11 Jul 2023 12:22:27 +0200 Subject: [PATCH 33/40] updated logo and version string --- README.md | 2 +- openapi/data_repository_service.openapi.yaml | 4 ++-- pages/more-background-on-compact-identifiers/openapi.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87a9e1e7..519a6107 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -GA4GH Logo +GA4GH Logo # Data Repository Service (DRS) API diff --git a/openapi/data_repository_service.openapi.yaml b/openapi/data_repository_service.openapi.yaml index 287dc976..8b28bdc7 100644 --- a/openapi/data_repository_service.openapi.yaml +++ b/openapi/data_repository_service.openapi.yaml @@ -1,9 +1,9 @@ openapi: 3.0.3 info: title: Data Repository Service - version: 1.2.0 + version: 1.4.0 x-logo: - url: 'https://www.ga4gh.org/wp-content/themes/ga4gh-theme/gfx/GA-logo-horizontal-tag-RGB.svg' + url: 'https://www.ga4gh.org/wp-content/themes/ga4gh/dist/assets/svg/logos/logo-full-color.svg' termsOfService: 'https://www.ga4gh.org/terms-and-conditions/' contact: name: GA4GH Cloud Work Stream diff --git a/pages/more-background-on-compact-identifiers/openapi.yaml b/pages/more-background-on-compact-identifiers/openapi.yaml index 929b023e..165af693 100644 --- a/pages/more-background-on-compact-identifiers/openapi.yaml +++ b/pages/more-background-on-compact-identifiers/openapi.yaml @@ -3,7 +3,7 @@ info: title: More Background on Compact Identifiers version: 1.2.0 x-logo: - url: 'https://www.ga4gh.org/wp-content/themes/ga4gh-theme/gfx/GA-logo-horizontal-tag-RGB.svg' + url: 'https://www.ga4gh.org/wp-content/themes/ga4gh/dist/assets/svg/logos/logo-full-color.svg' termsOfService: 'https://www.ga4gh.org/terms-and-conditions/' contact: name: GA4GH Cloud Work Stream From 22c5a82d841db3ac0347be938222cdfdddba8f1f Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 11 Jul 2023 12:56:15 +0200 Subject: [PATCH 34/40] removing passport from bulk opts endpoint since it does not make sense to require authorization --- openapi/paths/bulkobjects@{object_id}.yaml | 2 +- openapi/tags/ServiceRegistry.md | 2 +- pages/more-background-on-compact-identifiers/openapi.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index d0a49518..4ca1b28e 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -28,7 +28,7 @@ options: content: application/json: schema: - $ref: '../components/parameters/BulkObjectId.yaml' + $ref: '../components/parameters/BulkObjectIdNoPassport.yaml' post: summary: Get info about multiple DrsObjects with an optional Passport(s). diff --git a/openapi/tags/ServiceRegistry.md b/openapi/tags/ServiceRegistry.md index a12cbf11..50d8ad28 100644 --- a/openapi/tags/ServiceRegistry.md +++ b/openapi/tags/ServiceRegistry.md @@ -17,7 +17,7 @@ Example listing of a DRS API registration from a service registry's `/services` "type": { "group": "org.ga4gh", "artifact": "drs", - "version": "1.2.0" + "version": "1.4.0" }, "description": "The Data Repository Service (DRS) API ...", "organization": { diff --git a/pages/more-background-on-compact-identifiers/openapi.yaml b/pages/more-background-on-compact-identifiers/openapi.yaml index 165af693..3a0019cf 100644 --- a/pages/more-background-on-compact-identifiers/openapi.yaml +++ b/pages/more-background-on-compact-identifiers/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: More Background on Compact Identifiers - version: 1.2.0 + version: 1.4.0 x-logo: url: 'https://www.ga4gh.org/wp-content/themes/ga4gh/dist/assets/svg/logos/logo-full-color.svg' termsOfService: 'https://www.ga4gh.org/terms-and-conditions/' From b51134546d2f290542b369ccb3d6a5b04b4d7e8b Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 11 Jul 2023 12:57:11 +0200 Subject: [PATCH 35/40] adding new yaml --- openapi/components/parameters/BulkObjectIdNoPassport.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 openapi/components/parameters/BulkObjectIdNoPassport.yaml diff --git a/openapi/components/parameters/BulkObjectIdNoPassport.yaml b/openapi/components/parameters/BulkObjectIdNoPassport.yaml new file mode 100644 index 00000000..f25067d2 --- /dev/null +++ b/openapi/components/parameters/BulkObjectIdNoPassport.yaml @@ -0,0 +1,8 @@ +type: object +description: The object that contains the DRS object IDs array +properties: + bulk_object_ids: + type: array + items: + type: string + description: An array of ObjectIDs. From 5ccf0682210c4952f48835535cbe876ef0283cba Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 11 Jul 2023 12:58:09 +0200 Subject: [PATCH 36/40] updating travis URL --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a50d982..f86ce231 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,7 +83,7 @@ this will not automatically be built from our Travis. However, if you are a developer and have created a feature branch following the naming convention above, you should see automated builds. -Check https://travis-ci.com/ga4gh/data-repository-service-schemas/builds to see the status of the builds. +Check https://app.travis-ci.com/github/ga4gh/data-repository-service-schemas to see the status of the builds. Pull Request Voting Process =========================== From 783ef6816af7d8109ad4ed5ed9c303274b99be1c Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 11 Jul 2023 14:06:03 +0200 Subject: [PATCH 37/40] updated the security to PassportAuth --- openapi/paths/bulkobjects@access@{access_id}.yaml | 2 ++ openapi/paths/bulkobjects@{object_id}.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/openapi/paths/bulkobjects@access@{access_id}.yaml b/openapi/paths/bulkobjects@access@{access_id}.yaml index 30f2cd79..0878eb1d 100644 --- a/openapi/paths/bulkobjects@access@{access_id}.yaml +++ b/openapi/paths/bulkobjects@access@{access_id}.yaml @@ -8,6 +8,8 @@ post: Currently this is limited to use passports (one or more) or a single bearer token, so make sure your bulk request is for objects that all use the same passports/token. operationId: GetBulkAccessURL + security: + - PassportAuth: [] responses: 200: $ref: '../components/responses/200OkAccesses.yaml' diff --git a/openapi/paths/bulkobjects@{object_id}.yaml b/openapi/paths/bulkobjects@{object_id}.yaml index 4ca1b28e..022ea2db 100644 --- a/openapi/paths/bulkobjects@{object_id}.yaml +++ b/openapi/paths/bulkobjects@{object_id}.yaml @@ -35,6 +35,8 @@ post: description: >- Returns an array of object metadata, and a list of access methods that can be used to fetch objects' bytes. Currently this is limited to use passports (one or more) or a single bearer token, so make sure your bulk request is for objects that all use the same passports/token. operationId: GetBulkObjects + security: + - PassportAuth: [] parameters: - $ref: '../components/parameters/Expand.yaml' responses: From 19a815b7feeb96aaa153e6cd6898cf497d26e882 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 19 Sep 2023 09:59:14 -0700 Subject: [PATCH 38/40] adding a maxBulkRequestLength variable to service info --- openapi/components/schemas/DrsService.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openapi/components/schemas/DrsService.yaml b/openapi/components/schemas/DrsService.yaml index 5424d884..da7e9ea6 100644 --- a/openapi/components/schemas/DrsService.yaml +++ b/openapi/components/schemas/DrsService.yaml @@ -2,6 +2,10 @@ type: object required: - type properties: + maxBulkRequestLength: + type: integer + required: true + description: The max length the bullk request endpoints can handle before generating a 413 error e.g. how long can the arrays bulk_object_ids and bulk_object_access_ids be for this server. type: type: object required: From 7e607d30324d2ca251a81f00e9b101a5bc6b3387 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 19 Sep 2023 10:09:01 -0700 Subject: [PATCH 39/40] adding better description of variables --- openapi/components/parameters/BulkObjectAccessId.yaml | 2 ++ openapi/components/parameters/BulkObjectIdNoPassport.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/openapi/components/parameters/BulkObjectAccessId.yaml b/openapi/components/parameters/BulkObjectAccessId.yaml index f2be7581..4123bb43 100644 --- a/openapi/components/parameters/BulkObjectAccessId.yaml +++ b/openapi/components/parameters/BulkObjectAccessId.yaml @@ -12,7 +12,9 @@ properties: properties: bulk_object_id: type: string + description: DRS object ID bulk_access_ids: type: array + description: DRS object access ID items: type: string diff --git a/openapi/components/parameters/BulkObjectIdNoPassport.yaml b/openapi/components/parameters/BulkObjectIdNoPassport.yaml index f25067d2..f972c58c 100644 --- a/openapi/components/parameters/BulkObjectIdNoPassport.yaml +++ b/openapi/components/parameters/BulkObjectIdNoPassport.yaml @@ -3,6 +3,7 @@ description: The object that contains the DRS object IDs array properties: bulk_object_ids: type: array + description: DRS object IDs items: type: string description: An array of ObjectIDs. From 6f29332aa09c7c6d07f932752b0ded9fcf5fb986 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 25 Sep 2023 13:56:00 -0700 Subject: [PATCH 40/40] adding better description of variables --- openapi/components/schemas/DrsService.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/components/schemas/DrsService.yaml b/openapi/components/schemas/DrsService.yaml index da7e9ea6..2407e5cc 100644 --- a/openapi/components/schemas/DrsService.yaml +++ b/openapi/components/schemas/DrsService.yaml @@ -5,7 +5,7 @@ properties: maxBulkRequestLength: type: integer required: true - description: The max length the bullk request endpoints can handle before generating a 413 error e.g. how long can the arrays bulk_object_ids and bulk_object_access_ids be for this server. + description: The max length the bullk request endpoints can handle (>= 1) before generating a 413 error e.g. how long can the arrays bulk_object_ids and bulk_object_access_ids be for this server. type: type: object required: