Created
January 4, 2022 10:46
-
-
Save evertlammerts/6e0efd92caf9051dc5e38116c35e05bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "Query execution." | |
version: "1.0.0" | |
title: "Run a query and get unicorms" | |
termsOfService: "http://datalicks.com/terms/" | |
contact: | |
email: "ben@datalikker.com" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" | |
host: "sql.datalicks.com" | |
basePath: "/v1" | |
schemes: | |
- "https" | |
paths: | |
/run: | |
post: | |
summary: "Run a query" | |
description: "" | |
consumes: | |
- "application/x-www-form-urlencoded" | |
parameters: | |
- in: "formData" | |
type: "string" | |
name: "query" | |
description: "Input your query here" | |
required: true | |
responses: | |
"201": | |
description: "Accepted query and created status resource" | |
headers: | |
Location: | |
description: "The location of the status resource" | |
type: string | |
format: uri | |
"400": | |
description: "You gave me a bad request" | |
/status/{runId}: | |
get: | |
summary: "Get status of query execution" | |
description: "" | |
produces: | |
- "text/html" | |
- "application/json" | |
parameters: | |
- name: "runId" | |
in: "path" | |
description: "the run id of the query run" | |
required: true | |
type: "string" | |
responses: | |
"200": | |
description: "" | |
schema: | |
type: "object" | |
items: | |
$ref: "#/definitions/queryStatus" | |
"404": | |
description: "Non existing run ID" | |
/result/{runId}: | |
get: | |
summary: "Get the result of the query run" | |
description: "" | |
produces: | |
- "text/plain" | |
parameters: | |
- name: "runId" | |
in: "path" | |
description: "the run id of the query run" | |
required: true | |
type: "string" | |
responses: | |
"200": | |
description: "" | |
schema: | |
type: "object" | |
items: | |
$ref: "#/definitions/queryResult" | |
"404": | |
description: "Non existing run ID" | |
definitions: | |
queryStatus: | |
type: "object" | |
queryResult: | |
type: "object" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment