-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add POST endpoint for additional access methods to existing object #47
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,47 @@ 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an additional access method to an existing object |
||
operationId: PostObjectAccess | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the same reason as above, maybe it's better to write |
||
responses: | ||
'201': | ||
description: Successfully added access method. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To keep in the style of the other descriptions, maybe better to write:
|
||
'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' | ||
'409': | ||
description: Conflict - Object with the same ID already exists. | ||
schema: | ||
$ref: '#/definitions/Error' | ||
Comment on lines
+132
to
+135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that in a |
||
'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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use |
||
tags: | ||
- DRS-Filer | ||
x-swagger-router-controller: ga4gh.drs.server | ||
|
||
delete: | ||
summary: Delete object. | ||
description: >- | ||
|
@@ -148,7 +189,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: >- | ||
|
@@ -501,3 +542,20 @@ definitions: | |
- name | ||
tags: | ||
- name: DataRepositoryService | ||
AdditionalAccessMethod: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just reuse the |
||
type: object | ||
properties: | ||
method_id: | ||
type: string | ||
description: ID of the access method. | ||
Comment on lines
+548
to
+550
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be created by the implementation/service, so no need to put it here. |
||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As briefly discussed, I'm afraid we will need to create a different endpoint here, maybe
/objects/{object_id}/access:register
, because in the latest versions of the DRS specification, there is (unfortunately) already aPOST
method defined for/objects/{object_id}/access
that has a different non-REST-compliant meaning (see here).Actually, supporting the new DRS versions will require a lot of code changes on DRS-Filer, including some breaking changes, but for now let's just focus on this issue and try to avoid conflicts in the future, when we will do the migration to the latest version.