diff --git a/api-reference/v2/jobs/get-job.mdx b/api-reference/v2/jobs/get-job.mdx new file mode 100644 index 0000000..dcd81f4 --- /dev/null +++ b/api-reference/v2/jobs/get-job.mdx @@ -0,0 +1,6 @@ +--- +title: Get Job Status +openapi: get /jobs/{jobID} +--- + +Returns the status of an asynchronous job. diff --git a/mint.json b/mint.json index a514052..e72b9f1 100644 --- a/mint.json +++ b/mint.json @@ -1,81 +1,80 @@ { - "openapi": "/openapi/swagger.json", - "name": "Glide API Docs", - "favicon": "/logo/favicon.svg", - "colors": { - "primary": "#18BED4", - "light": "#B7B2F0", - "dark": "#18BED4", - "anchors": { - "from": "#D7E779", - "to": "#07C983" - } - }, - "topbarLinks": [ - { - "name": "Glide User Docs", - "url": "https://www.glideapps.com/docs" - } - ], - "topbarCtaButton": { - "name": "Open Glide", - "url": "https://go.glideapps.com" - }, - "navigation": [ - { - "group": "General", - "pages": [ - "api-reference/v2/general/introduction", - "api-reference/v2/general/authentication", - "api-reference/v2/general/errors", - "api-reference/v2/general/limits" - ] - }, - { - "group": "Tables", - "pages": [ - "api-reference/v2/tables/versioning", - "api-reference/v2/tables/get-tables", - "api-reference/v2/tables/get-table-rows", - "api-reference/v2/tables/get-table-row", - "api-reference/v2/tables/head-table-rows", - "api-reference/v2/tables/post-tables", - "api-reference/v2/tables/post-table-rows", - "api-reference/v2/tables/put-tables", - "api-reference/v2/tables/patch-table-row", - "api-reference/v2/tables/delete-table-row" - ] + "openapi": "/openapi/swagger.json", + "name": "Glide API Docs", + "favicon": "/logo/favicon.svg", + "colors": { + "primary": "#18BED4", + "light": "#B7B2F0", + "dark": "#18BED4", + "anchors": { + "from": "#D7E779", + "to": "#07C983" + } }, - { - "group": "Stashing", - "pages": [ - "api-reference/v2/stashing/introduction", - "api-reference/v2/stashing/put-stashes-serial", - "api-reference/v2/stashing/delete-stash" - ] + "topbarLinks": [ + { + "name": "Glide User Docs", + "url": "https://www.glideapps.com/docs" + } + ], + "topbarCtaButton": { + "name": "Open Glide", + "url": "https://go.glideapps.com" }, - { - "group": "Tutorials", - "pages": [ - "api-reference/v2/tutorials/bulk-import" - ] + "navigation": [ + { + "group": "General", + "pages": [ + "api-reference/v2/general/introduction", + "api-reference/v2/general/authentication", + "api-reference/v2/general/errors", + "api-reference/v2/general/limits" + ] + }, + { + "group": "Tables", + "pages": [ + "api-reference/v2/tables/versioning", + "api-reference/v2/tables/get-tables", + "api-reference/v2/tables/get-table-rows", + "api-reference/v2/tables/get-table-row", + "api-reference/v2/tables/head-table-rows", + "api-reference/v2/tables/post-tables", + "api-reference/v2/tables/post-table-rows", + "api-reference/v2/tables/put-tables", + "api-reference/v2/tables/patch-table-row", + "api-reference/v2/tables/delete-table-row" + ] + }, + { + "group": "Stashing", + "pages": [ + "api-reference/v2/stashing/introduction", + "api-reference/v2/stashing/put-stashes-serial", + "api-reference/v2/stashing/delete-stash" + ] + }, + { + "group": "Jobs", + "pages": ["api-reference/v2/jobs/get-job"] + }, + { + "group": "Tutorials", + "pages": ["api-reference/v2/tutorials/bulk-import"] + }, + { + "group": "Resources", + "pages": ["api-reference/v2/resources/postman", "api-reference/v2/resources/changelog"] + } + ], + "footerSocials": { + "youtube": "https://www.youtube.com/glideapps", + "x": "https://x.com/glideapps", + "github": "https://github.com/glideapps", + "linkedin": "https://www.linkedin.com/company/glideapps/" }, - { - "group": "Resources", - "pages": [ - "api-reference/v2/resources/postman", - "api-reference/v2/resources/changelog" - ] + "feedback": { + "thumbsRating": true, + "raiseIssue": true } - ], - "footerSocials": { - "youtube": "https://www.youtube.com/glideapps", - "x": "https://x.com/glideapps", - "github": "https://github.com/glideapps", - "linkedin": "https://www.linkedin.com/company/glideapps/" - }, - "feedback": { - "thumbsRating": true, - "raiseIssue": true - } -} \ No newline at end of file +} diff --git a/openapi/swagger.json b/openapi/swagger.json index a40ae33..9ec862b 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -183,6 +183,41 @@ } } }, + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "tableID": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "jobID": { + "type": "string", + "description": "The ID of the asynchronous job" + } + }, + "required": [ + "tableID", + "jobID" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, "400": { "description": "", "content": { @@ -290,6 +325,19 @@ } }, "parameters": [ + { + "name": "x-glide-asynchronous", + "in": "header", + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ], + "description": "Allow asynchronous processing, which will return a job ID. Note that this does not force asynchronouys processing. The caller must handle both synchronous and asynchronous responses." + }, + "required": false + }, { "name": "name", "in": "query", @@ -759,6 +807,11 @@ "schema": { "type": "object", "properties": { + "displayName": { + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" + }, "fromUrl": { "type": "string", "format": "uri", @@ -838,6 +891,35 @@ } } }, + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "jobID": { + "type": "string", + "description": "The ID of the asynchronous job" + } + }, + "required": [ + "jobID" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, "400": { "description": "", "content": { @@ -1016,6 +1098,19 @@ } }, "parameters": [ + { + "name": "x-glide-asynchronous", + "in": "header", + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ], + "description": "Allow asynchronous processing, which will return a job ID. Note that this does not force asynchronouys processing. The caller must handle both synchronous and asynchronous responses." + }, + "required": false + }, { "name": "if-match", "in": "header", @@ -2398,6 +2493,142 @@ "description": "Deletes a row from a Big Table" } }, + "/jobs/{jobID}": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "running", + "succeeded", + "failed" + ], + "description": "The current status of the job" + }, + "result": { + "description": "The result of the job, if it `succeeded`" + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A message describing the error" + } + }, + "required": [ + "message" + ], + "additionalProperties": false, + "description": "The error information, if the job `failed`" + } + }, + "required": [ + "status" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "job_not_found" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "parameters": [ + { + "name": "jobID", + "in": "path", + "schema": { + "type": "string", + "description": "The ID of the job to check" + }, + "required": true + } + ], + "description": "Check whether a job is finished, and get its result" + } + }, "/stashes/{stashID}/{serial}": { "put": { "responses": {