Skip to content
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

Feature/issue 348 post passport #349

Closed
wants to merge 10 commits into from
31 changes: 16 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dist: trusty
language: python
python:
- '2.7'
- '3.6'
#- '2.7'

# Specifying `branches.only = ['master']` can cause tagged builds to
# not deploy. See travis-ci/travis-ci#2498 and travis-ci/travis-ci#1675.
Expand Down Expand Up @@ -60,21 +60,22 @@ jobs:
on:
all_branches: true


# Deploy to PyPI on every tagged commit
- stage: deploy
python: '3.6'
script: ignore
before_install: ignore
deploy:
- provider: pypi
on:
tags: true
branch: master
python: '3.6'
repo: ga4gh/data-repository-service-schemas
user: david4096
password:
secure: LlQn8ZBAb5ekujHnoDrmzrmXaM6TpyzByNHPH4FTbbdnJ8lkDPb/ZhYvdmqrOvXPQg81/IoYKlIvP7fY9kc3oGUJ2IXhcPFqiw8njsRE5Qaebp+YppQO7C3IWGlHoZtXNtC608ZSA4x0oneNeNy+Y8KYnqKbmOlbuvrYRlNYfe9/8z7yLPH8wdmp0GyvbViedr3p7PXhtQVUKAgPpgjffZnSA7P/Y6AdkvjHHv2xMAzWP/QmOFWZNxUXjg0miR0K7eGFeGBNMM/+QsVXrGOu/TCtPtJ4JXyD86nzrZUbsOluyAblxwGlrv05se5ImVhR210OC5zvSW2902y/lxCw5uek+xg4/tcSA1ckshxLeu02GfDygCktMUtqtKVIZ+qvU7H4dEQ6Jnz9yBvZW5M6V94Ew3wBFy0RB5I9k3MMQY21FdynIUEZzBgJbOChCbmlIDT1varBHvWBiwg8EwPOVuJt1CsOoptJxUsoJND4tAOPIvXMNI17qGJ+VWAVMVNn7cVUuhEeGXwQF4urrkFBA7WIYOp6O9R8Ipg6WnQdxVdnqb3NsEc19SRdFXQ82SYibKfIZxjpdmYVgKzTYsJGMhfG6fTw9D4JABhggfgShsnByrFtbbkn/9g64jXDOjwPLeRXwXYZe6ZV6M69PDWdo0o326Qq/OHBG5eU7z2plNI=
# - stage: deploy
# python: '3.6'
# script: ignore
# before_install: ignore
# deploy:
# - provider: pypi
# on:
# tags: true
# branch: master
# python: '3.6'
# repo: ga4gh/data-repository-service-schemas
# user: david4096
# password:
# secure: LlQn8ZBAb5ekujHnoDrmzrmXaM6TpyzByNHPH4FTbbdnJ8lkDPb/ZhYvdmqrOvXPQg81/IoYKlIvP7fY9kc3oGUJ2IXhcPFqiw8njsRE5Qaebp+YppQO7C3IWGlHoZtXNtC608ZSA4x0oneNeNy+Y8KYnqKbmOlbuvrYRlNYfe9/8z7yLPH8wdmp0GyvbViedr3p7PXhtQVUKAgPpgjffZnSA7P/Y6AdkvjHHv2xMAzWP/QmOFWZNxUXjg0miR0K7eGFeGBNMM/+QsVXrGOu/TCtPtJ4JXyD86nzrZUbsOluyAblxwGlrv05se5ImVhR210OC5zvSW2902y/lxCw5uek+xg4/tcSA1ckshxLeu02GfDygCktMUtqtKVIZ+qvU7H4dEQ6Jnz9yBvZW5M6V94Ew3wBFy0RB5I9k3MMQY21FdynIUEZzBgJbOChCbmlIDT1varBHvWBiwg8EwPOVuJt1CsOoptJxUsoJND4tAOPIvXMNI17qGJ+VWAVMVNn7cVUuhEeGXwQF4urrkFBA7WIYOp6O9R8Ipg6WnQdxVdnqb3NsEc19SRdFXQ82SYibKfIZxjpdmYVgKzTYsJGMhfG6fTw9D4JABhggfgShsnByrFtbbkn/9g64jXDOjwPLeRXwXYZe6ZV6M69PDWdo0o326Qq/OHBG5eU7z2plNI=

before_install:
- python setup.py sdist
Expand Down
150 changes: 150 additions & 0 deletions openapi/data_repository_service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,84 @@ paths:
tags:
- DataRepositoryService
x-swagger-router-controller: ga4gh.drs.server
post:
summary: Get info about a `DrsObject`.
description: >-
Returns object metadata, and a list of access methods that can be used to fetch object bytes.


Method is a POST to accomodate a JWT GA4GH Passport sent in the formData in order to authorize access.
operationId: PostGetObject
consumes: [application/x-www-form-urlencoded]
responses:
'200':
description: The `DrsObject` was found successfully.
schema:
$ref: '#/definitions/DrsObject'
'202':
description: >
The operation is delayed and will continue asynchronously.
The client should retry this same request after the delay specified by Retry-After header.
headers:
Retry-After:
description: >
Delay in seconds. The client should retry this same request after waiting for this duration.
To simplify client response processing, this must be an integral relative time in seconds.
This value SHOULD represent the minimum duration the client should wait before attempting
the operation again with a reasonable expectation of success. When it is not feasible
for the server to determine the actual expected delay, the server may return a
brief, fixed value instead.
type: integer
format: int64
'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'
'404':
description: The requested `DrsObject` wasn't found
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: query
name: expand
type: boolean
default: false
description: >-
If false and the object_id refers to a bundle, then the ContentsObject array
contains only those objects directly contained in the bundle. That is, if the
bundle contains other bundles, those other bundles are not recursively
included in the result.

If true and the object_id refers to a bundle, then the entire set of objects
in the bundle is expanded. That is, if the bundle contains aother bundles,
then those other bundles are recursively expanded and included in the result.
Recursion continues through the entire sub-tree of the bundle.

If the object_id refers to a blob, then the query parameter is ignored.
- name: token
in: formData
required: true
type: string
description: the encoded JWT GA4GH Passport that contains embedded Visas. The overall JWT is signed as are the individual Passport Visas.
tags:
- DataRepositoryService
x-swagger-router-controller: ga4gh.drs.server
'/objects/{object_id}/access/{access_id}':
get:
summary: Get a URL for fetching bytes.
Expand Down Expand Up @@ -155,6 +233,78 @@ paths:
tags:
- DataRepositoryService
x-swagger-router-controller: ga4gh.drs.server
post:
summary: Get a URL for fetching bytes.
description: >-
Returns a URL that can be used to fetch the bytes of a `DrsObject`.


Method is a POST to accomodate a JWT GA4GH Passport sent in the formData in order to authorize access.


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: PostGetAccessURL
consumes: [application/x-www-form-urlencoded]
responses:
'200':
description: The access URL was found successfully.
schema:
$ref: '#/definitions/AccessURL'
'202':
description: >
The operation is delayed and will continue asynchronously.
The client should retry this same request after the delay specified by Retry-After header.
headers:
Retry-After:
description: >
Delay in seconds. The client should retry this same request after waiting for this duration.
To simplify client response processing, this must be an integral relative time in seconds.
This value SHOULD represent the minimum duration the client should wait before attempting
the operation again with a reasonable expectation of success. When it is not feasible
for the server to determine the actual expected delay, the server may return a
brief, fixed value instead.
type: integer
format: int64
'400':
description: The request is malformed.
schema:
$ref: '#/definitions/Error'
'401':
description: The request is unauthorized.
schema:
$ref: '#/definitions/Error'
'404':
description: The requested access URL wasn't found
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
description: An `id` of a `DrsObject`
- name: access_id
in: path
required: true
type: string
description: An `access_id` from the `access_methods` list of a `DrsObject`
- name: token
in: formData
required: true
type: string
description: the encoded JWT GA4GH Passport that contains embedded Visas. The overall JWT is signed as are the individual Passport Visas.
tags:
- DataRepositoryService
x-swagger-router-controller: ga4gh.drs.server
securityDefinitions:
authToken:
description: |
Expand Down