diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml new file mode 100644 index 0000000..9342b7b --- /dev/null +++ b/openapi/openapi.yaml @@ -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 diff --git a/openapi/parameters/dali-maxrec.yaml b/openapi/parameters/dali-maxrec.yaml new file mode 100644 index 0000000..9260433 --- /dev/null +++ b/openapi/parameters/dali-maxrec.yaml @@ -0,0 +1,6 @@ +name: MAXREC +in: query +description: request a specific limit on number of rows to return +schema: + type: integer + format: int64 diff --git a/openapi/parameters/dali-responseformat.yaml b/openapi/parameters/dali-responseformat.yaml new file mode 100644 index 0000000..202eee4 --- /dev/null +++ b/openapi/parameters/dali-responseformat.yaml @@ -0,0 +1,5 @@ +name: RESPONSEFORMAT +in: query +description: select output table format +schema: + type: string diff --git a/openapi/parameters/tap-format.yaml b/openapi/parameters/tap-format.yaml new file mode 100644 index 0000000..40c253b --- /dev/null +++ b/openapi/parameters/tap-format.yaml @@ -0,0 +1,5 @@ +name: FORMAT +in: query +description: "supported for backwards compatibility to 1.0 (see: RESPONSEFORMAT)" +schema: + type: string diff --git a/openapi/parameters/tap-lang.yaml b/openapi/parameters/tap-lang.yaml new file mode 100644 index 0000000..c432ae7 --- /dev/null +++ b/openapi/parameters/tap-lang.yaml @@ -0,0 +1,6 @@ +name: LANG +in: query +description: specify the query language used in the QUERY parameter +required: true +schema: + type: string diff --git a/openapi/parameters/tap-query.yaml b/openapi/parameters/tap-query.yaml new file mode 100644 index 0000000..92e9c20 --- /dev/null +++ b/openapi/parameters/tap-query.yaml @@ -0,0 +1,6 @@ +name: QUERY +in: query +description: specify the query +required: true +schema: + type: string diff --git a/openapi/parameters/tap-upload.yaml b/openapi/parameters/tap-upload.yaml new file mode 100644 index 0000000..27302d6 --- /dev/null +++ b/openapi/parameters/tap-upload.yaml @@ -0,0 +1,5 @@ +name: UPLOAD +in: query +description: specify name,location pair for a table to be uploaded and used in the query +schema: + type: string diff --git a/openapi/tap-async.yaml b/openapi/tap-async.yaml new file mode 100644 index 0000000..473631d --- /dev/null +++ b/openapi/tap-async.yaml @@ -0,0 +1,28 @@ +get: + summary: UWS 1.1 + description: async job listing + parameters: + 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: + - $ref: ./parameters/tap-lang.yaml + - $ref: ./parameters/tap-query.yaml + - $ref: ./parameters/tap-upload.yaml + - $ref: ./parameters/tap-format.yaml + - $ref: ./parameters/dali-maxrec.yaml + - $ref: ./parameters/dali-responseformat.yaml + responses: + 303: + $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 diff --git a/openapi/tap-responses.yaml b/openapi/tap-responses.yaml new file mode 100644 index 0000000..cc11415 --- /dev/null +++ b/openapi/tap-responses.yaml @@ -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 diff --git a/openapi/tap-sync.yaml b/openapi/tap-sync.yaml new file mode 100644 index 0000000..037382b --- /dev/null +++ b/openapi/tap-sync.yaml @@ -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-upload.yaml + - $ref: ./parameters/tap-format.yaml + - $ref: ./parameters/dali-maxrec.yaml + - $ref: ./parameters/dali-responseformat.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-upload.yaml + - $ref: ./parameters/tap-format.yaml + - $ref: ./parameters/dali-maxrec.yaml + - $ref: ./parameters/dali-responseformat.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 +