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

OpenAPI spec for TAP-1.1 #8

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
openapi: 3.1.0
info:
title: TAP service endpoints
version: "1.1"
description: This is more or less the current TAP-1.1 standard.
servers:
- url: /example
paths:
# notes: the tap openapi components are included here;
# the uws- and vosi- components are not included here and would have to
# use the $ref: {URL} style or be pulled in when building the complete
# stand-alone spec/document structure (TBD)
/sync:
$ref: ./tap-sync.yaml

/async:
$ref: ./tap-async.yaml
/async/{jobID}:
$ref: ./include/UWS/uws-job.yaml
#$ref: https://ivoa.net/std/UWS/uws-job.yaml
## TODO: more resources under /async/{jobID} here...

/tables:
$ref: ./include/VOSI/vosi-tableset.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-tableset.yaml
/tables/{name}:
$ref: ./include/VOSI/vosi-table.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-table.yaml

/availability:
$ref: ./include/VOSI/vosi-availability.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-availability.yaml
/capabilities:
$ref: ./include/VOSI/vosi-capabilities.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-capabilities.yaml
6 changes: 6 additions & 0 deletions openapi/parameters/dali-maxrec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: MAXREC
in: query
description: request a specific limit on number of rows to return
schema:
type: integer
format: int64
5 changes: 5 additions & 0 deletions openapi/parameters/dali-responseformat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: RESPONSEFORMAT
in: query
description: select output table format
schema:
type: string
5 changes: 5 additions & 0 deletions openapi/parameters/dali-upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: UPLOAD
in: query
description: specify name,location pair for a resource to be uploaded and used in the query
schema:
type: string
5 changes: 5 additions & 0 deletions openapi/parameters/tap-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: FORMAT
in: query
description: "supported for backwards compatibility to 1.0 (see: RESPONSEFORMAT)"
schema:
type: string
6 changes: 6 additions & 0 deletions openapi/parameters/tap-lang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: LANG
in: query
description: specify the query language used in the QUERY parameter
required: true
schema:
type: string
6 changes: 6 additions & 0 deletions openapi/parameters/tap-query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: QUERY
in: query
description: specify the query
required: true
schema:
type: string
31 changes: 31 additions & 0 deletions openapi/tap-async.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
get:
summary: UWS 1.1
description: async job listing
parameters:
# UWS job listing control specified here
responses:
200:
$ref: ./include/UWS/uws-responses.yaml#/job-listing
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
post:
summary: TAP-async 1.1
description: TAP asynchronous query endpoint (create UWS Job)
parameters:
# TAP job definition specified here
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
- $ref: ./parameters/dali-upload.yaml
responses:
303:
# UWS respoonse code
$ref: ./include/UWS/uws-responses.yaml#/created
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
7 changes: 7 additions & 0 deletions openapi/tap-responses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# UWS create job response
invalid-query:
description: the requested TAP query job is invalid; this is usually the ADQL query
content:
text/plain:
schema:
type: string
43 changes: 43 additions & 0 deletions openapi/tap-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
get:
summary: TAP-sync 1.1
description: TAP synchronous query endpoint
parameters:
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
- $ref: ./parameters/dali-upload.yaml
responses:
200:
description: successful response
303:
description: redirect to the job result (optional)
400:
$ref: ./tap-responses.yaml#/invalid-query
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
post:
summary: TAP-sync 1.1
description: TAP synchronous query endpoint
parameters:
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
- $ref: ./parameters/dali-upload.yaml
responses:
200:
description: successful response
303:
description: redirect to the job result (optional)
400:
$ref: ./tap-responses.yaml#/invalid-query
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied