From ebf4897fbd03df2483aa2e2ad426d8af2d75392b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:09:49 +0000 Subject: [PATCH 1/4] Update from https://github.com/glideapps/glide/commit/5413bc1072b66f04ad6b38a7472cf9b7350fb86e --- openapi/swagger.json | 1435 +++++++++++++++++++++++++++--------------- 1 file changed, 921 insertions(+), 514 deletions(-) diff --git a/openapi/swagger.json b/openapi/swagger.json index d13d03f..89f4a1a 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -1,559 +1,966 @@ { - "openapi": "3.0.0", - "info": { - "title": "", - "version": "" + "openapi": "3.0.0", + "info": { + "title": "", + "version": "" + }, + "components": { + "schemas": {}, + "responses": {}, + "parameters": {}, + "examples": {}, + "requestBodies": {}, + "headers": {}, + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer" + } }, - "components": { - "schemas": {}, - "responses": {}, - "parameters": {}, - "examples": {}, - "requestBodies": {}, - "headers": {}, - "securitySchemes": { - "BearerAuth": { - "type": "http", - "scheme": "bearer", - "description": "Bearer authentication header of the form Bearer ``, where `` is your [auth token](/api-reference/v2/general/authentication)." + "links": {}, + "callbacks": {} + }, + "paths": { + "/tables": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } } - }, - "links": {}, - "callbacks": {} - }, - "paths": { - "/tables": { - "get": { - "responses": { - "200": { - "description": "List of Glide Big Tables in the current team", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "description": "A collection of table objects as id/name pairs", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`" - }, - "name": { - "type": "string", - "description": "Name of the table, e.g., `Invoices`" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "example": [ - { - "id": "2a1bad8b-cf7c-44437-b8c1-e3782df6", - "name": "Invoices" - }, - { - "id": "93a19-cf7c-44437-b8c1-e9acbbb", - "name": "Line Items" - } - ] - } - }, - "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 } - }, - "post": { - "responses": { - "200": { - "description": "Table successfully created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "tableID": { - "type": "string", - "description": "ID of the created table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`" - }, - "rowIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Row IDs of added rows, e.g.,\n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```" - } - }, - "required": [ - "tableID", - "rowIDs" - ], - "additionalProperties": false, - "description": "The newly created table ID and IDs of all rows added", - "example": { - "tableID": "2a1bad8b-cf7c-44437-b8c1-e3782df6", - "rowIDs": [ - "2a1bad8b-cf7c-44437-b8c1-e3782df6", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - } - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } + } + } + } + } + }, + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "tableID": { + "type": "string", + "description": "ID of the created table" + }, + "rowIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Row IDs of added rows" } + }, + "required": [ + "tableID", + "rowIDs" + ], + "additionalProperties": false } - }, - "operationId": "Create table", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the table, e.g., `Employees`", - "example": "Employees" - }, - "schema": { - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Internal ID of the column, e.g., `name`. This value cannot be changed once created." - }, - "displayName": { - "type": "string", - "description": "Human readable display name of the column, e.g., `Name`. Can be modified once created." - }, - "type": { - "type": "string", - "description": "Type of the column. Can be one of: `string`, `number`, `dateTime`, `boolean`, `uri`, `json`" - } - }, - "required": [ - "id", - "type" - ] - }, - "description": "Collection of column definitions, in the order that they are to be displayed in the table", - "example": [ - { - "id": "fullName", - "displayName": "Name", - "kind": "string" - }, - { - "id": "ageInYears", - "displayName": "Age", - "kind": "number" - }, - { - "id": "hiredOn", - "displayName": "Hire Date", - "kind": "dateTime" - } - ] - } - }, - "description": "The schema of the table as a collection of column definitions", - "additionalProperties": false - }, - "rows": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"ageInYears\": 30,\n\t\t\"hiredOn\": \"2021-07-03\"\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"ageInYears\": 34,\n\t\t\"hiredOn\": \"2023-01-015\"\n\t}\n]\n```", - "example": [ - { - "fullName": "Alex Bard", - "ageInYears": 30, - "hiredOn": "2021-07-03" - }, - { - "fullName": "Alicia Hines", - "ageInYears": 34, - "hiredOn": "2023-01-015" - } - ] - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "description": "ID of the stash whose row data should be used to populate the table, e.g., `20240215-job32`" - } - }, - "description": "A single reference to a stash whose row data should be used to populate the table", - "required": [ - "$stashID" - ], - "additionalProperties": false - } - ] - } - }, - "required": [ - "name", - "schema" - ], - "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 } + } } - }, - "/tables/{tableID}": { - "put": { - "responses": { - "200": { - "description": "Table successfully overwritten", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "rowIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Row IDs of added rows", - "example": [ - "2a1bad8b-cf7c-44437-b8c1-e3782df6", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - } - }, - "required": [ - "rowIDs" - ], - "additionalProperties": false - } - }, - "additionalProperties": false, - "required": [ - "data" - ] - } - } + }, + "422": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "column_id_reserved", + "column_id_not_unique", + "column_has_invalid_value", + "column_id_not_found" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "operationId": "Create table", + "parameters": [ + { + "name": "onSchemaError", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "description": "Abort the entire operation and return an error", + "enum": [ + "abort" + ] }, - "operationId": "Overwrite table", - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { + { + "type": "string", + "description": "Ignore the columns that caused the error, and do not import any data from them", + "enum": [ + "dropColumns" + ] + }, + { + "type": "string", + "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", + "enum": [ + "updateSchema" + ] + } + ] + }, + "required": false + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "rows": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + } + }, + { + "type": "object", + "properties": { + "$stashID": { "type": "string" + } }, - "required": true, - "description": "ID of the table to overwrite, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`" - } + "required": [ + "$stashID" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "schema", + "rows" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "schema": { - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Internal ID of the column, e.g., `name`. This value cannot be changed once created." - }, - "displayName": { - "type": "string", - "description": "Human readable display name of the column, e.g., `Name`. Can be modified once created." - }, - "type": { - "type": "string", - "description": "Type of the column. Can be one of: `string`, `number`, `dateTime`, `boolean`, `uri`, `json`" - } - }, - "required": [ - "id", - "type" - ] - }, - "description": "Collection of column definitions, in the order that they are to be displayed in the table" - } - }, - "description": "The schema of the table as a collection of column definitions", - "additionalProperties": false - }, - "rows": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"ageInYears\": 30,\n\t\t\"hiredOn\": \"2021-07-03\"\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"ageInYears\": 34,\n\t\t\"hiredOn\": \"2023-01-015\"\n\t}\n]\n```" - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "description": "ID of the stash whose row data should be used to populate the table, e.g., `20240215-job32`" - } - }, - "description": "A single reference to a stash whose row data should be used to populate the table", - "required": [ - "$stashID" - ], - "additionalProperties": false - } - ] - } - }, - "additionalProperties": false, - "example": { - "rows": [ - { - "fullName": "Alex Bard", - "ageInYears": 30, - "hiredOn": "2021-07-03" - }, - { - "fullName": "Alicia Hines", - "ageInYears": 34, - "hiredOn": "2023-01-015" - } - ] - } - } + "additionalProperties": false + } + } + } + } + } + }, + "/tables/{tableID}": { + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Row IDs of added rows" } + }, + "required": [ + "rowIDs" + ], + "additionalProperties": false } + }, + "required": [ + "data" + ], + "additionalProperties": false } + } } - }, - "/tables/{tableID}/rows": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "rowIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Row IDs of added rows" - } - }, - "required": [ - "rowIDs" - ], - "additionalProperties": false, - "example": { - "rowIDs": [ - "2a1bad8b-cf7c-44437-b8c1-e3782df6", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - } - } - }, - "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 } - }, - "operationId": "Add rows to table", - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "table_not_found", + "table_not_big_table" + ] }, - "required": true, - "description": "ID of the table to add rows to, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"ageInYears\": 30,\n\t\t\"hiredOn\": \"2021-07-03\"\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"ageInYears\": 34,\n\t\t\"hiredOn\": \"2023-01-015\"\n\t}\n]\n```", - "example": [ - { - "fullName": "Alex Bard", - "ageInYears": 30, - "hiredOn": "2021-07-03" - }, - { - "fullName": "Alicia Hines", - "ageInYears": 34, - "hiredOn": "2023-01-015" - } - ] - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "description": "ID of the stash whose row data should be used to populate the table, e.g., `20240215-job32`" - } - }, - "description": "A single reference to a stash whose row data should be used to populate the table", - "required": [ - "$stashID" - ], - "additionalProperties": false - } - ] - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } + }, + "required": [ + "error" + ], + "additionalProperties": false } + } } - }, - "/stashes/{stashID}/{serial}": { - "post": { - "responses": { - "200": { - "description": "The data was successfully stashed into the stash with the given stash ID.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the data was successfully stashed into the stash with the given stash ID.", - "example": {} - } - } + }, + "422": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "column_id_reserved", + "column_id_not_unique", + "column_has_invalid_value", + "column_id_not_found" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "operationId": "Overwrite table", + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "description": "Abort the entire operation and return an error", + "enum": [ + "abort" + ] + }, + { + "type": "string", + "description": "Ignore the columns that caused the error, and do not import any data from them", + "enum": [ + "dropColumns" + ] }, - "operationId": "Add rows to stash", - "parameters": [ - { - "name": "stashID", - "in": "path", - "description": "ID of the stash to add rows to, e.g., `20240215-job32`", - "schema": { + { + "type": "string", + "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", + "enum": [ + "updateSchema" + ] + } + ] + }, + "required": false + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "rows": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + } + }, + { + "type": "object", + "properties": { + "$stashID": { "type": "string" + } }, - "required": true - }, - { - "name": "serial", - "in": "path", - "description": "Serial identifier of the data to add to the stash. Data subsets will be loaded in the order implied by the serial, so utilize ordered identifiers for each subset if a specific loading sequence is required. E.g., `1`, `2`, etc...\n\nOtherwise a random, but unique value can be used, e.g., `c2a4567`.", - "schema": { + "required": [ + "$stashID" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "schema", + "rows" + ], + "additionalProperties": false + } + } + } + } + } + }, + "/tables/{tableID}/rows": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { "type": "string" + }, + "description": "Row IDs of added rows" + } + }, + "required": [ + "rowIDs" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "required": true + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "An array of data to add to the stash. The data should conform to the requirements of the endpoint where the stash is intended to be used.\n\nFor instance, to reference row data, each entry should have the same schema as the table it is being added to.\n\n```json\n[\n\t{\"Name\": \"Alex\", \"Age\": 30, \"Birthday\": \"2024-07-03T10:24:08.285Z\"},\n\t{\"Name\": \"TomTom\", \"Age\": 26, \"Birthday\": \"2024-07-03T10:27:43.265Z\"},\n\t{\"Name\": \"Foo Bar\", \"Age\": 5}\n]\n```", - "example": [ - { - "Name": "Alex", - "Age": 30, - "Birthday": "2024-07-03T10:24:08.285Z" - }, - { - "Name": "TomTom", - "Age": 26, - "Birthday": "2024-07-03T10:27:43.265Z" - }, - { - "Name": "Foo Bar", - "Age": 5 - } - ] - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "table_not_found", + "table_not_big_table" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "422": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "column_has_invalid_value", + "column_id_reserved", + "column_id_not_found" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "operationId": "Add rows to table", + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "description": "Abort the entire operation and return an error", + "enum": [ + "abort" + ] + }, + { + "type": "string", + "description": "Ignore the columns that caused the error, and do not import any data from them", + "enum": [ + "dropColumns" + ] + }, + { + "type": "string", + "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", + "enum": [ + "updateSchema" + ] } + ] + }, + "required": false + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + } + }, + { + "type": "object", + "properties": { + "$stashID": { + "type": "string" + } + }, + "required": [ + "$stashID" + ], + "additionalProperties": false + } + ] + } } + } } + } }, - "security": [ - { - "BearerAuth": [] + "/stashes": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "stashID": { + "type": "string", + "description": "The newly created stash" + } + }, + "required": [ + "stashID" + ], + "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 + } + } + } + } + }, + "operationId": "Create stash", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } } - ], - "tags": [], - "servers": [ - { - "description": "Production", - "url": "https://api.glideapps.com" + } + }, + "/stashes/{stashID}/{serial}": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "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 + } + } + } + } + }, + "operationId": "Add rows to stash", + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "serial", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + } + } + } + } } - ] -} \ No newline at end of file + } + }, + "/stashes/{stashID}": { + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "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 + } + } + } + } + }, + "operationId": "Delete stash", + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + } + ] + } + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "tags": [], + "servers": [ + { + "description": "Production", + "url": "https://api.glideapps.com" + } + ] +} From 5f91bec36441dca6188e8b34f9c7a2ea7a4fa015 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:28:12 +0000 Subject: [PATCH 2/4] Update from https://github.com/glideapps/glide/commit/81543f6e1286bdf917b4e7c451a4ac77923d892f --- openapi/swagger.json | 445 +++++++++++++++++++++++++++++++++---------- 1 file changed, 340 insertions(+), 105 deletions(-) diff --git a/openapi/swagger.json b/openapi/swagger.json index 89f4a1a..32a81d3 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -14,7 +14,8 @@ "securitySchemes": { "BearerAuth": { "type": "http", - "scheme": "bearer" + "scheme": "bearer", + "description": "Bearer authentication header of the form Bearer ``, where `` is your [auth token](/api-reference/v2/general/authentication)." } }, "links": {}, @@ -37,10 +38,14 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, "name": { - "type": "string" + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" } }, "required": [ @@ -48,7 +53,8 @@ "name" ], "additionalProperties": false - } + }, + "description": "A collection of table objects, each with `id` and `name`" } }, "required": [ @@ -91,7 +97,8 @@ } } } - } + }, + "description": "Gets all Big Tables in the current team" }, "post": { "responses": { @@ -107,14 +114,19 @@ "properties": { "tableID": { "type": "string", - "description": "ID of the created table" + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, "rowIDs": { "type": "array", "items": { "type": "string" }, - "description": "Row IDs of added rows" + "description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "2a1bad8b-cf7c-44437-b8c1-e3782df6", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] } }, "required": [ @@ -203,35 +215,20 @@ } } }, - "operationId": "Create table", + "description": "Creates a new Big Table", "parameters": [ { "name": "onSchemaError", "in": "query", "schema": { - "anyOf": [ - { - "type": "string", - "description": "Abort the entire operation and return an error", - "enum": [ - "abort" - ] - }, - { - "type": "string", - "description": "Ignore the columns that caused the error, and do not import any data from them", - "enum": [ - "dropColumns" - ] - }, - { - "type": "string", - "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", - "enum": [ - "updateSchema" - ] - } - ] + "type": "string", + "enum": [ + "abort", + "dropColumns", + "updateSchema" + ], + "description": "The action to take when the passed data does not match the table schema:\n\n- `abort`: Abort the entire operation and return an error.\n- `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows.\n- `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.", + "example": "updateSchema" }, "required": false } @@ -243,12 +240,103 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" }, "schema": { "type": "object", - "properties": {}, - "additionalProperties": false + "properties": { + "columns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Internal ID of the column, e.g., `fullName`. This value cannot be changed once created.", + "example": "fullName" + }, + "displayName": { + "type": "string", + "description": "Human-readable display name of the column, e.g., `Full Name`. Can be modified once created.", + "example": "Full Name" + }, + "type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "uri", + "dateTime", + "json" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "uri", + "dateTime", + "json" + ] + } + }, + "required": [ + "kind" + ], + "additionalProperties": false + } + ], + "description": "The type of the column" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "description": "A collection of column definitions, in the order that they are to be displayed in the table" + } + }, + "required": [ + "columns" + ], + "additionalProperties": false, + "description": "The schema of the table as a collection of column definitions", + "example": { + "columns": [ + { + "id": "fullName", + "displayName": "Full Name", + "type": "string" + }, + { + "id": "invoiceDate", + "displayName": "Invoice Date", + "type": "dateTime" + }, + { + "id": "totalAmount", + "displayName": "Total", + "type": "number" + }, + { + "id": "amountPaid", + "displayName": "Paid", + "type": "number" + } + ] + } }, "rows": { "anyOf": [ @@ -257,19 +345,37 @@ "items": { "type": "object", "additionalProperties": {} - } + }, + "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```", + "example": [ + { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + }, + { + "fullName": "Alicia Hines", + "invoiceDate": "2023-06-15T10:30:00.000Z", + "totalAmount": 50.75, + "amountPaid": 20 + } + ] }, { "type": "object", "properties": { "$stashID": { - "type": "string" + "type": "string", + "description": "ID of the stash whose data should be used", + "example": "20240215-job32" } }, "required": [ "$stashID" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used" } ] } @@ -304,7 +410,11 @@ "items": { "type": "string" }, - "description": "Row IDs of added rows" + "description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "2a1bad8b-cf7c-44437-b8c1-e3782df6", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] } }, "required": [ @@ -428,13 +538,15 @@ } } }, - "operationId": "Overwrite table", + "description": "Overwrites a Big Table with new schema and/or data", "parameters": [ { "name": "tableID", "in": "path", "schema": { - "type": "string" + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, "required": true }, @@ -442,29 +554,14 @@ "name": "onSchemaError", "in": "query", "schema": { - "anyOf": [ - { - "type": "string", - "description": "Abort the entire operation and return an error", - "enum": [ - "abort" - ] - }, - { - "type": "string", - "description": "Ignore the columns that caused the error, and do not import any data from them", - "enum": [ - "dropColumns" - ] - }, - { - "type": "string", - "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", - "enum": [ - "updateSchema" - ] - } - ] + "type": "string", + "enum": [ + "abort", + "dropColumns", + "updateSchema" + ], + "description": "The action to take when the passed data does not match the table schema:\n\n- `abort`: Abort the entire operation and return an error.\n- `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows.\n- `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.", + "example": "updateSchema" }, "required": false } @@ -477,8 +574,97 @@ "properties": { "schema": { "type": "object", - "properties": {}, - "additionalProperties": false + "properties": { + "columns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Internal ID of the column, e.g., `fullName`. This value cannot be changed once created.", + "example": "fullName" + }, + "displayName": { + "type": "string", + "description": "Human-readable display name of the column, e.g., `Full Name`. Can be modified once created.", + "example": "Full Name" + }, + "type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "uri", + "dateTime", + "json" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "uri", + "dateTime", + "json" + ] + } + }, + "required": [ + "kind" + ], + "additionalProperties": false + } + ], + "description": "The type of the column" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "description": "A collection of column definitions, in the order that they are to be displayed in the table" + } + }, + "required": [ + "columns" + ], + "additionalProperties": false, + "description": "The schema of the table as a collection of column definitions", + "example": { + "columns": [ + { + "id": "fullName", + "displayName": "Full Name", + "type": "string" + }, + { + "id": "invoiceDate", + "displayName": "Invoice Date", + "type": "dateTime" + }, + { + "id": "totalAmount", + "displayName": "Total", + "type": "number" + }, + { + "id": "amountPaid", + "displayName": "Paid", + "type": "number" + } + ] + } }, "rows": { "anyOf": [ @@ -487,19 +673,37 @@ "items": { "type": "object", "additionalProperties": {} - } + }, + "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```", + "example": [ + { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + }, + { + "fullName": "Alicia Hines", + "invoiceDate": "2023-06-15T10:30:00.000Z", + "totalAmount": 50.75, + "amountPaid": 20 + } + ] }, { "type": "object", "properties": { "$stashID": { - "type": "string" + "type": "string", + "description": "ID of the stash whose data should be used", + "example": "20240215-job32" } }, "required": [ "$stashID" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used" } ] } @@ -533,7 +737,11 @@ "items": { "type": "string" }, - "description": "Row IDs of added rows" + "description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "2a1bad8b-cf7c-44437-b8c1-e3782df6", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] } }, "required": [ @@ -656,13 +864,15 @@ } } }, - "operationId": "Add rows to table", + "description": "Adds rows to a Big Table", "parameters": [ { "name": "tableID", "in": "path", "schema": { - "type": "string" + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, "required": true }, @@ -670,29 +880,14 @@ "name": "onSchemaError", "in": "query", "schema": { - "anyOf": [ - { - "type": "string", - "description": "Abort the entire operation and return an error", - "enum": [ - "abort" - ] - }, - { - "type": "string", - "description": "Ignore the columns that caused the error, and do not import any data from them", - "enum": [ - "dropColumns" - ] - }, - { - "type": "string", - "description": "Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them", - "enum": [ - "updateSchema" - ] - } - ] + "type": "string", + "enum": [ + "abort", + "dropColumns", + "updateSchema" + ], + "description": "The action to take when the passed data does not match the table schema:\n\n- `abort`: Abort the entire operation and return an error.\n- `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows.\n- `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.", + "example": "updateSchema" }, "required": false } @@ -707,19 +902,37 @@ "items": { "type": "object", "additionalProperties": {} - } + }, + "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```", + "example": [ + { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + }, + { + "fullName": "Alicia Hines", + "invoiceDate": "2023-06-15T10:30:00.000Z", + "totalAmount": 50.75, + "amountPaid": 20 + } + ] }, { "type": "object", "properties": { "$stashID": { - "type": "string" + "type": "string", + "description": "ID of the stash whose data should be used", + "example": "20240215-job32" } }, "required": [ "$stashID" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used" } ] } @@ -817,7 +1030,8 @@ "schema": { "type": "object", "properties": {}, - "additionalProperties": false + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the data was successfully stashed into the stash with the given stash ID." } } } @@ -855,13 +1069,15 @@ } } }, - "operationId": "Add rows to stash", + "description": "Adds data to a stash", "parameters": [ { "name": "stashID", "in": "path", "schema": { - "type": "string" + "type": "string", + "description": "ID of the stash to add data to, e.g., `20240215-job32`", + "example": "20240215-job32" }, "required": true }, @@ -869,7 +1085,8 @@ "name": "serial", "in": "path", "schema": { - "type": "string" + "type": "string", + "description": "Serial identifier of the chunk of data to add to the stash. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data is required, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`." }, "required": true } @@ -882,7 +1099,22 @@ "items": { "type": "object", "additionalProperties": {} - } + }, + "description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```", + "example": [ + { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + }, + { + "fullName": "Alicia Hines", + "invoiceDate": "2023-06-15T10:30:00.000Z", + "totalAmount": 50.75, + "amountPaid": 20 + } + ] } } } @@ -899,7 +1131,8 @@ "schema": { "type": "object", "properties": {}, - "additionalProperties": false + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the stash with the given stash ID was successfully deleted." } } } @@ -937,13 +1170,15 @@ } } }, - "operationId": "Delete stash", + "description": "Deletes a stash and its data", "parameters": [ { "name": "stashID", "in": "path", "schema": { - "type": "string" + "type": "string", + "description": "ID of the stash to delete, e.g., `20240215-job32`", + "example": "20240215-job32" }, "required": true } From 0ffacb1bd22edd36c3c8059a03731685aae50595 Mon Sep 17 00:00:00 2001 From: Alex Corrado Date: Fri, 2 Aug 2024 13:15:08 +0100 Subject: [PATCH 3/4] Add delete stash endpoint docs --- api-reference/v2/stashing/delete-stash.mdx | 10 ++++++++++ mint.json | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 api-reference/v2/stashing/delete-stash.mdx diff --git a/api-reference/v2/stashing/delete-stash.mdx b/api-reference/v2/stashing/delete-stash.mdx new file mode 100644 index 0000000..9202fae --- /dev/null +++ b/api-reference/v2/stashing/delete-stash.mdx @@ -0,0 +1,10 @@ +--- +title: Delete Stash +openapi: delete /stashes/{stashID} +--- + +If you no longer need a stash, you can delete it. This will remove the stash and all the data it contains. Stashes are automatically deleted within 48 hours of creation. + + + To understand what stashing is and how to use it to work with large datasets, please see our [introduction to stashing](/api-reference/v2/stashing/introduction). + diff --git a/mint.json b/mint.json index bcde5ae..a4f245c 100644 --- a/mint.json +++ b/mint.json @@ -43,7 +43,8 @@ "group": "Stashing", "pages": [ "api-reference/v2/stashing/introduction", - "api-reference/v2/stashing/post-stashes-serial" + "api-reference/v2/stashing/post-stashes-serial", + "api-reference/v2/stashing/delete-stash" ] }, { From 8326fb02ad3522c123a284b6395648ebc32879fd Mon Sep 17 00:00:00 2001 From: Ryan Daigle Date: Fri, 2 Aug 2024 11:43:14 -0400 Subject: [PATCH 4/4] Add changelog entry for delete stash endpoint --- api-reference/v2/resources/changelog.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api-reference/v2/resources/changelog.mdx b/api-reference/v2/resources/changelog.mdx index 80eb75c..25cee8c 100644 --- a/api-reference/v2/resources/changelog.mdx +++ b/api-reference/v2/resources/changelog.mdx @@ -1,8 +1,11 @@ ---- title: Glide API Changelog sidebarTitle: Changelog --- +### August 2, 2024 + +- Add [delete stash](/api-reference/v2/stashing/delete-stash) endpoint documentation + ### July 29, 2024 - Remove the `rows` wrapper element from stashing docs