From 1ebc8c21cca10121002d0ba68fdce33804e05085 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:21:38 +0000 Subject: [PATCH 1/4] Update from https://github.com/glideapps/glide/commit/4319209d8399f4e5ca93359dae3576686881d38d --- openapi/swagger.json | 400 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 400 insertions(+) diff --git a/openapi/swagger.json b/openapi/swagger.json index 4bf91f6..3fb9053 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -561,6 +561,230 @@ "description": "Creates a new Big Table" } }, + "/tables/fromURL": { + "post": { + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tableID": { + "type": "string", + "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + }, + "linkedAppIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of appIDs which were successfully linked." + } + }, + "required": [ + "tableID", + "rowIDs" + ], + "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 + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] + }, + "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_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 + } + } + } + } + }, + "parameters": [ + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." + }, + "appsToLink": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of app IDs to link the new table to." + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Creates a new Big Table from a URL" + } + }, "/tables/{tableID}": { "put": { "responses": { @@ -1602,6 +1826,182 @@ } }, "/tables/{tableID}/rows/{rowID}": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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 + } + ] + } + }, + "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 + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] + }, + "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": [ + "table_not_found", + "table_not_big_table", + "row_not_found" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "required": true + } + ], + "description": "Gets a single row from a Big Table by row ID" + }, "patch": { "responses": { "200": { From 7e10daf7a3335b7ad6608f62692e1ccdea15efcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 21:59:59 +0000 Subject: [PATCH 2/4] Update from https://github.com/glideapps/glide/commit/f425c68cec087403c3b3dfd835998469fc658c88 --- openapi/swagger.json | 4677 ++++++++++++++++++++---------------------- 1 file changed, 2188 insertions(+), 2489 deletions(-) diff --git a/openapi/swagger.json b/openapi/swagger.json index 3fb9053..9c4568d 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -1,2610 +1,2309 @@ { - "openapi": "3.0.0", - "info": { - "title": "", - "version": "" - }, - "components": { - "schemas": { - "A_collection_of_row_objects": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - }, - "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 - } - ] - } - }, - "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)." - } + "openapi": "3.0.0", + "info": { + "title": "", + "version": "" }, - "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", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "name": { - "type": "string", - "description": "Name of the table, e.g., `Invoices`", - "example": "Invoices" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "description": "A collection of table objects, each with `id` and `name`" + "components": { + "schemas": { + "A_collection_of_row_objects": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 } - }, - "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 + }, + "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 } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + ] } - } }, - "description": "Gets all Big Tables in the current team" - }, - "post": { - "responses": { - "201": { - "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" - }, - "rowIDs": { - "type": "array", - "items": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - }, - "linkedAppIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of appIDs which were successfully linked." - } - }, - "required": [ - "tableID", - "rowIDs" - ], - "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 - } - } + "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)." } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] - }, - "message": { - "type": "string" + }, + "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", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "name": { + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "description": "A collection of table objects, each with `id` and `name`" + } + }, + "required": ["data"], + "additionalProperties": false + } + } } - }, - "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_id_reserved", - "column_id_not_unique", - "column_has_invalid_value", - "column_id_not_found" - ] - }, - "message": { - "type": "string" + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "name", - "in": "query", - "schema": { - "type": "string", - "description": "Name of the table. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body.", - "example": "Invoices" - }, - "required": false - }, - { - "name": "appsToLink", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of app IDs to link the new table to." - }, - "required": false - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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" + }, + "description": "Gets all Big Tables in the current team" }, - "required": false - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the table, e.g., `Invoices`", - "example": "Invoices" - }, - "schema": { - "type": "object", - "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", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] + "post": { + "responses": { + "201": { + "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" + }, + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + }, + "linkedAppIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of appIDs which were successfully linked." + } + }, + "required": ["tableID", "rowIDs"], + "additionalProperties": false + } }, - { - "anyOf": [ - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": [ - "kind" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "array" - ] + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + } }, - "items": { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "message": { + "type": "string" } - }, - "required": [ - "kind" - ], - "additionalProperties": false - } - }, - "required": [ - "kind", - "items" - ], - "additionalProperties": false + }, + "required": ["type", "message"], + "additionalProperties": false } - ] - } - ], - "description": "The type of the column." + }, + "required": ["error"], + "additionalProperties": false } - }, - "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. If this is not provided, the schema will be inferred from the data.", - "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": [ - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } - }, - "required": [ - "$stashID" - ], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - }, - "appsToLink": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of app IDs to link the new table to." - } }, - "required": [ - "name", - "rows" - ], - "additionalProperties": false - }, - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } - }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } - } - } - }, - "description": "Creates a new Big Table" - } - }, - "/tables/fromURL": { - "post": { - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "tableID": { + "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 + } + } + } + } + }, + "parameters": [ + { + "name": "name", + "in": "query", + "schema": { "type": "string", - "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - }, - "linkedAppIDs": { + "description": "Name of the table. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body.", + "example": "Invoices" + }, + "required": false + }, + { + "name": "appsToLink", + "in": "query", + "schema": { "type": "array", "items": { - "type": "string" + "type": "string" }, - "description": "An array of appIDs which were successfully linked." - } + "description": "An array of app IDs to link the new table to." }, - "required": [ - "tableID", - "rowIDs" - ], - "additionalProperties": false - } - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" + "required": false + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" + }, + "schema": { + "type": "object", + "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", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": ["kind"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": ["array"] + }, + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": ["kind"], + "additionalProperties": false + } + }, + "required": ["kind", "items"], + "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. If this is not provided, the schema will be inferred from the data.", + "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": [ + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + }, + { + "type": "object", + "properties": { + "$stashID": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } + }, + "required": ["$stashID"], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + }, + "appsToLink": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of app IDs to link the new table to." + } + }, + "required": ["name", "rows"], + "additionalProperties": false + }, + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + } + ] + } }, - "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_id_reserved", - "column_id_not_unique", - "column_has_invalid_value", - "column_id_not_found" - ] + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } }, - "message": { - "type": "string" + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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 - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." - }, - "appsToLink": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of app IDs to link the new table to." - } }, - "required": [ - "url" - ], - "additionalProperties": false - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } - }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "description": "Creates a new Big Table" } - } }, - "description": "Creates a new Big Table from a URL" - } - }, - "/tables/{tableID}": { - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "rowIDs": { - "type": "array", - "items": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] + "/tables/importFromURL": { + "post": { + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tableID": { + "type": "string", + "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + }, + "linkedAppIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of appIDs which were successfully linked." + } + }, + "required": ["tableID", "rowIDs"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + } + } } - }, - "required": [ - "rowIDs" - ], - "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" + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false - } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] - }, - "message": { - "type": "string" + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } } - }, - "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": [ - "table_not_found", - "table_not_big_table" - ] - }, - "message": { - "type": "string" + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "412": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "precondition_failed" - ] + }, + "parameters": [ + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "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" - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." + }, + "appsToLink": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of app IDs to link the new table to." + } + }, + "required": ["url"], + "additionalProperties": false + } }, - "message": { - "type": "string" + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + }, + "description": "Creates a new Big Table from a URL" } - } }, - "parameters": [ - { - "name": "if-match", - "in": "header", - "schema": { - "type": "string", - "pattern": "^\"[0-9]+\"$", - "description": "ETag of the current table version. If provided, the request will fail if the table has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." - }, - "required": false - }, - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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 - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "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., `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", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] + "/tables/{tableID}": { + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + } + }, + "required": ["rowIDs"], + "additionalProperties": false + } }, - { - "anyOf": [ - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": [ - "kind" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "array" - ] + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + } }, - "items": { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "message": { + "type": "string" } - }, - "required": [ - "kind" - ], - "additionalProperties": false - } - }, - "required": [ - "kind", - "items" - ], - "additionalProperties": false + }, + "required": ["type", "message"], + "additionalProperties": false } - ] - } - ], - "description": "The type of the column." + }, + "required": ["error"], + "additionalProperties": false } - }, - "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": [ - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } - }, - "required": [ - "$stashID" - ], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - } }, - "required": [ - "rows" - ], - "additionalProperties": false - }, - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } - }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } - } - } - }, - "description": "Replaces the schema and/or data of a Big Table" - } - }, - "/tables/{tableID}/rows": { - "head": { - "responses": { - "200": { - "description": "", - "headers": { - "ETag": { - "schema": { - "type": "string", - "description": "The current version of the table" + "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 + } + } + } + }, + "412": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["precondition_failed"] + }, + "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_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 + } + } + } + } }, - "required": true - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" + "parameters": [ + { + "name": "if-match", + "in": "header", + "schema": { + "type": "string", + "pattern": "^\"[0-9]+\"$", + "description": "ETag of the current table version. If provided, the request will fail if the table has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": false + }, + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 } - }, - "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" - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "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., `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", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": ["kind"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": ["array"] + }, + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": ["kind"], + "additionalProperties": false + } + }, + "required": ["kind", "items"], + "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": [ + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + }, + { + "type": "object", + "properties": { + "$stashID": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } + }, + "required": ["$stashID"], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + } + }, + "required": ["rows"], + "additionalProperties": false + }, + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } }, - "message": { - "type": "string" + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + }, + "description": "Replaces the schema and/or data of a Big Table" } - } }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - } - ], - "description": "Gets information about the data in a Big Table" - }, - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 + "/tables/{tableID}/rows": { + "head": { + "responses": { + "200": { + "description": "", + "headers": { + "ETag": { + "schema": { + "type": "string", + "description": "The current version of the table" + }, + "required": true + } } - }, - "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 + }, + "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 + } + } } - ] }, - "continuation": { - "type": "string", - "description": "A continuation token for fetching the next set of rows. If this is not provided, this response contains the last set of rows." - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "message": { - "type": "string" + "required": true + } + ], + "description": "Gets information about the data in a Big Table" + }, + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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 + } + ] + }, + "continuation": { + "type": "string", + "description": "A continuation token for fetching the next set of rows. If this is not provided, this response contains the last set of rows." + } + }, + "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 + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "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": ["table_not_found", "table_not_big_table"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } } - }, - "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": [ - "table_not_found", - "table_not_big_table" - ] + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": true + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "number", + "description": "Maximum number of rows to return in a single response. No more than this number of rows will be returned, however fewer rows may be returned, even if there are more rows to fetch. If there are more rows, the response will include a continuation token that can be used to fetch the next set of rows." + }, + "required": false + }, + { + "name": "continuation", + "in": "query", + "schema": { + "type": "string", + "description": "A continuation token from a previous response. If provided, the next set of rows will be returned. If not provided, the first set of rows will be returned." + }, + "required": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "number", - "description": "Maximum number of rows to return in a single response. No more than this number of rows will be returned, however fewer rows may be returned, even if there are more rows to fetch. If there are more rows, the response will include a continuation token that can be used to fetch the next set of rows." - }, - "required": false - }, - { - "name": "continuation", - "in": "query", - "schema": { - "type": "string", - "description": "A continuation token from a previous response. If provided, the next set of rows will be returned. If not provided, the first set of rows will be returned." + ], + "description": "Gets rows from a Big Table" }, - "required": false - } - ], - "description": "Gets rows from a Big Table" - }, - "post": { - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "rowIDs": { - "type": "array", - "items": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] + "post": { + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + } + }, + "required": ["rowIDs"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + } + } } - }, - "required": [ - "rowIDs" - ], - "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" + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false - } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] - }, - "message": { - "type": "string" + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "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": ["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 + } + } } - }, - "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": [ - "table_not_found", - "table_not_big_table" - ] + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 } - }, - "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" - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } + }, + "required": ["$stashID"], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } }, - "message": { - "type": "string" + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + }, + "description": "Adds rows to a Big Table" } - } }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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 - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } + "/tables/{tableID}/rows/{rowID}": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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 + } + ] + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } }, - "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", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } + "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 + } + } + } }, - "required": [ - "$stashID" - ], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } - }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } - } - } - }, - "description": "Adds rows to a Big Table" - } - }, - "/tables/{tableID}/rows/{rowID}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } } - }, - "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 + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["table_not_found", "table_not_big_table", "row_not_found"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } } - ] } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false - } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" }, - "message": { - "type": "string" + "required": true + } + ], + "description": "Gets a single row from a Big Table by row ID" + }, + "patch": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the row was successfully updated." + } + } + } + }, + "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 + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "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": ["row_not_found", "table_not_found", "table_not_big_table"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } + } + }, + "412": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["precondition_failed"] + }, + "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 + } + } } - }, - "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": [ - "table_not_found", - "table_not_big_table", - "row_not_found" - ] + }, + "parameters": [ + { + "name": "if-match", + "in": "header", + "schema": { + "type": "string", + "pattern": "^\"[0-9]+\"$", + "description": "ETag of the current table version. If provided, the request will fail if this row has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." }, - "message": { - "type": "string" + "required": false + }, + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Updates a row in a Big Table" }, - "required": true - } - ], - "description": "Gets a single row from a Big Table by row ID" - }, - "patch": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the row was successfully updated." - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the row does not exist or was successfully deleted." + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false - } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] - }, - "message": { - "type": "string" + }, + "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 + } + } } - }, - "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": [ - "row_not_found", - "table_not_found", - "table_not_big_table" - ] - }, - "message": { - "type": "string" + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["payment_required"] + }, + "message": { + "type": "string" + } + }, + "required": ["type", "message"], + "additionalProperties": false + } + }, + "required": ["error"], + "additionalProperties": false + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false - } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "412": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "precondition_failed" - ] - }, - "message": { - "type": "string" + }, + "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 + } + } } - }, - "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" - ] + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "required": true } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "if-match", - "in": "header", - "schema": { - "type": "string", - "pattern": "^\"[0-9]+\"$", - "description": "ETag of the current table version. If provided, the request will fail if this row has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." - }, - "required": false - }, - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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 - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - } + ], + "description": "Deletes a row from a Big Table" } - } }, - "description": "Updates a row in a Big Table" - }, - "delete": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the row does not exist or was successfully deleted." - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" + "/stashes/{stashID}/{serial}": { + "put": { + "responses": { + "200": { + "description": "", + "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." + } + } + } + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "payment_required" - ] + }, + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash. The stash will be created if it doesn't already exist.", + "example": "20240215-job32" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": true + }, + { + "name": "serial", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.", + "example": "1" + }, + "required": true } - }, - "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" - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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 + } + ] + } }, - "message": { - "type": "string" + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + }, + "description": "Sets the content of a chunk of data inside a stash" } - } }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "required": true - } - ], - "description": "Deletes a row from a Big Table" - } - }, - "/stashes/{stashID}/{serial}": { - "put": { - "responses": { - "200": { - "description": "", - "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." - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" + "/stashes/{stashID}": { + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the stash with the given stash ID was successfully deleted." + } + } + } + }, + "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 + } + } } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } - } - } - }, - "parameters": [ - { - "name": "stashID", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash. The stash will be created if it doesn't already exist.", - "example": "20240215-job32" - }, - "required": true - }, - { - "name": "serial", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.", - "example": "1" - }, - "required": true - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } }, - "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 - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } - }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } - } - } - }, - "description": "Sets the content of a chunk of data inside a stash" - } - }, - "/stashes/{stashID}": { - "delete": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the stash with the given stash ID was successfully deleted." - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" }, - "message": { - "type": "string" - } - }, - "required": [ - "type", - "message" - ], - "additionalProperties": false + "required": true } - }, - "required": [ - "error" - ], - "additionalProperties": false - } - } + ], + "description": "Deletes a stash and all its data" } - } - }, - "parameters": [ - { - "name": "stashID", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - }, - "required": true - } - ], - "description": "Deletes a stash and all its data" - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "tags": [], - "servers": [ - { - "description": "Production", - "url": "https://api.glideapps.com" - } - ] + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "tags": [], + "servers": [ + { + "description": "Production", + "url": "https://api.glideapps.com" + } + ] } From 254a4e2023ffbd867afa51a64055b4c48c5cd583 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 22:06:57 +0000 Subject: [PATCH 3/4] Update from https://github.com/glideapps/glide/commit/62671ebc7a454af3b1db91d9c1c6d94de5a32ff3 --- openapi/swagger.json | 4525 ++++++++++++++++++++++-------------------- 1 file changed, 2331 insertions(+), 2194 deletions(-) diff --git a/openapi/swagger.json b/openapi/swagger.json index 9c4568d..c79546c 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -1,2309 +1,2446 @@ { - "openapi": "3.0.0", - "info": { - "title": "", - "version": "" + "openapi": "3.0.0", + "info": { + "title": "", + "version": "" + }, + "components": { + "schemas": { + "A_collection_of_row_objects": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + }, + "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 + } + ] + } }, - "components": { - "schemas": { - "A_collection_of_row_objects": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 + "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", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "name": { + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "description": "A collection of table objects, each with `id` and `name`" } - }, - "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 + }, + "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 + } + } } + } }, - "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)." + "description": "Gets all Big Tables in the current team" + }, + "post": { + "responses": { + "201": { + "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" + }, + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + }, + "linkedAppIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of appIDs which were successfully linked." + } + }, + "required": [ + "tableID", + "rowIDs" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } } - }, - "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", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "name": { - "type": "string", - "description": "Name of the table, e.g., `Invoices`", - "example": "Invoices" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "description": "A collection of table objects, each with `id` and `name`" - } - }, - "required": ["data"], - "additionalProperties": false - } - } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" } - }, - "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 - } - } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Gets all Big Tables in the current team" - }, - "post": { - "responses": { - "201": { - "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" - }, - "rowIDs": { - "type": "array", - "items": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - }, - "linkedAppIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of appIDs which were successfully linked." - } - }, - "required": ["tableID", "rowIDs"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - } - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "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" } - }, - "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": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "parameters": [ + { + "name": "name", + "in": "query", + "schema": { + "type": "string", + "description": "Name of the table. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body.", + "example": "Invoices" + }, + "required": false + }, + { + "name": "appsToLink", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of app IDs to link the new table to." + }, + "required": false + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the table, e.g., `Invoices`", + "example": "Invoices" + }, + "schema": { + "type": "object", + "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", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] }, - "required": ["error"], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "message": { - "type": "string" - } + { + "anyOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": [ + "kind" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "array" + ] }, - "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_id_reserved", - "column_id_not_unique", - "column_has_invalid_value", - "column_id_not_found" - ] - }, - "message": { - "type": "string" + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] } - }, - "required": ["type", "message"], - "additionalProperties": false + }, + "required": [ + "kind" + ], + "additionalProperties": false + } + }, + "required": [ + "kind", + "items" + ], + "additionalProperties": false } - }, - "required": ["error"], - "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. If this is not provided, the schema will be inferred from the data.", + "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" } + ] } - } - }, - "parameters": [ - { - "name": "name", - "in": "query", - "schema": { - "type": "string", - "description": "Name of the table. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body.", - "example": "Invoices" + }, + "rows": { + "anyOf": [ + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + }, + { + "type": "object", + "properties": { + "$stashID": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } + }, + "required": [ + "$stashID" + ], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + }, + "appsToLink": { + "type": "array", + "items": { + "type": "string" }, - "required": false + "description": "An array of app IDs to link the new table to." + } }, - { - "name": "appsToLink", - "in": "query", - "schema": { + "required": [ + "name", + "rows" + ], + "additionalProperties": false + }, + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Creates a new Big Table" + } + }, + "/tables/importFromURL": { + "post": { + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tableID": { + "type": "string", + "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] + }, + "linkedAppIDs": { "type": "array", "items": { - "type": "string" + "type": "string" }, - "description": "An array of app IDs to link the new table to." + "description": "An array of appIDs which were successfully linked." + } }, - "required": false - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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": [ + "tableID", + "rowIDs" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "required": false + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the table, e.g., `Invoices`", - "example": "Invoices" - }, - "schema": { - "type": "object", - "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", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - }, - { - "anyOf": [ - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": ["kind"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": ["array"] - }, - "items": { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": ["kind"], - "additionalProperties": false - } - }, - "required": ["kind", "items"], - "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. If this is not provided, the schema will be inferred from the data.", - "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": [ - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } - }, - "required": ["$stashID"], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - }, - "appsToLink": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of app IDs to link the new table to." - } - }, - "required": ["name", "rows"], - "additionalProperties": false - }, - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - } - ] - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } + "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_id_reserved", + "column_id_not_unique", + "column_has_invalid_value", + "column_id_not_found" + ] }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Creates a new Big Table" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } + } }, - "/tables/importFromURL": { - "post": { - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "tableID": { - "type": "string", - "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - }, - "linkedAppIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of appIDs which were successfully linked." - } - }, - "required": ["tableID", "rowIDs"], - "additionalProperties": false - } - } - }, - "required": ["data"], - "additionalProperties": false - } - } - } + "parameters": [ + { + "name": "appsToLink", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of app IDs to link the new table to." + }, + "required": false + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." + }, + "appsToLink": { + "type": "array", + "items": { + "type": "string" }, - "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 - } - } + "description": "An array of app IDs to link the new table to." + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Creates a new Big Table from a URL" + } + }, + "/tables/{tableID}": { + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "message": { - "type": "string" - } - }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } + }, + "required": [ + "rowIDs" + ], + "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" } - }, - "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 - } - } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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": [ + "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": false + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." - }, - "appsToLink": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of app IDs to link the new table to." - } - }, - "required": ["url"], - "additionalProperties": false - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "412": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "precondition_failed" + ] }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } + "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_id_reserved", + "column_id_not_unique", + "column_has_invalid_value", + "column_id_not_found" + ] }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data. The schema will be inferred from the data. The name of the table must be passed in the query parameter `name`.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Creates a new Big Table from a URL" + }, + "required": [ + "error" + ], + "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": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - } - }, - "required": ["rowIDs"], - "additionalProperties": false - } + "parameters": [ + { + "name": "if-match", + "in": "header", + "schema": { + "type": "string", + "pattern": "^\"[0-9]+\"$", + "description": "ETag of the current table version. If provided, the request will fail if the table has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." + }, + "required": false + }, + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "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., `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", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] }, - "required": ["data"], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" - } + { + "anyOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] + } + }, + "required": [ + "kind" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "array" + ] }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "message": { - "type": "string" + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "string", + "uri", + "imageURI", + "audioURI", + "markdown", + "phoneNumber", + "emailAddress", + "emoji", + "date", + "time", + "dateTime", + "duration", + "number", + "boolean" + ] } - }, - "required": ["type", "message"], - "additionalProperties": false + }, + "required": [ + "kind" + ], + "additionalProperties": false + } + }, + "required": [ + "kind", + "items" + ], + "additionalProperties": false } - }, - "required": ["error"], - "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": [ + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + }, + { + "type": "object", + "properties": { + "$stashID": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } + }, + "required": [ + "$stashID" + ], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + } }, - "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 - } - } - } - }, - "412": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["precondition_failed"] - }, - "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_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 - } - } - } - } + "required": [ + "rows" + ], + "additionalProperties": false + }, + { + "$ref": "#/components/schemas/A_collection_of_row_objects" + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Replaces the schema and/or data of a Big Table" + } + }, + "/tables/{tableID}/rows": { + "head": { + "responses": { + "200": { + "description": "", + "headers": { + "ETag": { + "schema": { + "type": "string", + "description": "The current version of the table" }, - "parameters": [ - { - "name": "if-match", - "in": "header", - "schema": { - "type": "string", - "pattern": "^\"[0-9]+\"$", - "description": "ETag of the current table version. If provided, the request will fail if the table has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." - }, - "required": false - }, - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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": true + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "required": false + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "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., `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", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - }, - { - "anyOf": [ - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": ["kind"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": ["array"] - }, - "items": { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "string", - "uri", - "imageURI", - "audioURI", - "markdown", - "phoneNumber", - "emailAddress", - "emoji", - "date", - "time", - "dateTime", - "duration", - "number", - "boolean" - ] - } - }, - "required": ["kind"], - "additionalProperties": false - } - }, - "required": ["kind", "items"], - "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": [ - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - }, - { - "type": "object", - "properties": { - "$stashID": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } - }, - "required": ["$stashID"], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - } - }, - "required": ["rows"], - "additionalProperties": false - }, - { - "$ref": "#/components/schemas/A_collection_of_row_objects" - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } + }, + "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" + ] }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Replaces the schema and/or data of a Big Table" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } + } }, - "/tables/{tableID}/rows": { - "head": { - "responses": { - "200": { - "description": "", - "headers": { - "ETag": { - "schema": { - "type": "string", - "description": "The current version of the table" - }, - "required": true - } + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + } + ], + "description": "Gets information about the data in a Big Table" + }, + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 } - }, - "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 - } - } + }, + "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 } + ] }, - "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 - } - } - } + "continuation": { + "type": "string", + "description": "A continuation token for fetching the next set of rows. If this is not provided, this response contains the last set of rows." } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "required": true - } - ], - "description": "Gets information about the data in a Big Table" - }, - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - }, - "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 - } - ] - }, - "continuation": { - "type": "string", - "description": "A continuation token for fetching the next set of rows. If this is not provided, this response contains the last set of rows." - } - }, - "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 - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "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": ["table_not_found", "table_not_big_table"] - }, - "message": { - "type": "string" - } - }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "number", - "description": "Maximum number of rows to return in a single response. No more than this number of rows will be returned, however fewer rows may be returned, even if there are more rows to fetch. If there are more rows, the response will include a continuation token that can be used to fetch the next set of rows." + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] }, - "required": false - }, - { - "name": "continuation", - "in": "query", - "schema": { - "type": "string", - "description": "A continuation token from a previous response. If provided, the next set of rows will be returned. If not provided, the first set of rows will be returned." + "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": [ + "table_not_found", + "table_not_big_table" + ] }, - "required": false + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "description": "Gets rows from a Big Table" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "post": { - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "rowIDs": { - "type": "array", - "items": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", - "example": [ - "zcJWnyI8Tbam21V34K8MNA", - "93a19-cf7c-44437-b8c1-e9acbbb" - ] - } - }, - "required": ["rowIDs"], - "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 - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "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": ["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 - } - } + "required": true + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "number", + "description": "Maximum number of rows to return in a single response. No more than this number of rows will be returned, however fewer rows may be returned, even if there are more rows to fetch. If there are more rows, the response will include a continuation token that can be used to fetch the next set of rows." + }, + "required": false + }, + { + "name": "continuation", + "in": "query", + "schema": { + "type": "string", + "description": "A continuation token from a previous response. If provided, the next set of rows will be returned. If not provided, the first set of rows will be returned." + }, + "required": false + } + ], + "description": "Gets rows from a Big Table" + }, + "post": { + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "rowIDs": { + "type": "array", + "items": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "description": "Row IDs of added rows, returned in the same order as the input rows, e.g., \n\n```json\n[\n\t\"zcJWnyI8Tbam21V34K8MNA\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```", + "example": [ + "zcJWnyI8Tbam21V34K8MNA", + "93a19-cf7c-44437-b8c1-e9acbbb" + ] } + }, + "required": [ + "rowIDs" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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": [ + "data" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "required": false + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - }, - "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", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" - } - }, - "required": ["$stashID"], - "additionalProperties": false, - "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Adds rows to a Big Table" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } - }, - "/tables/{tableID}/rows/{rowID}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - }, - "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 - } - ] - } - }, - "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 - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "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": ["table_not_found", "table_not_big_table", "row_not_found"] - }, - "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": [ + "table_not_found", + "table_not_big_table" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "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" + ] }, - "required": true + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "description": "Gets a single row from a Big Table by row ID" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + } + }, + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" }, - "patch": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the row was successfully updated." - } - } - } - }, - "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 - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "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": ["row_not_found", "table_not_found", "table_not_big_table"] - }, - "message": { - "type": "string" - } - }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } - } + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } }, - "412": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["precondition_failed"] - }, - "message": { - "type": "string" - } - }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } - } + "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", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + } }, - "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 - } - } + "required": [ + "$stashID" + ], + "additionalProperties": false, + "description": "A single reference to a [stash](/api-reference/v2/stashing) whose data should be used." + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Adds rows to a Big Table" + } + }, + "/tables/{tableID}/rows/{rowID}": { + "patch": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the row was successfully updated." + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "if-match", - "in": "header", - "schema": { - "type": "string", - "pattern": "^\"[0-9]+\"$", - "description": "ETag of the current table version. If provided, the request will fail if this row has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." - }, - "required": false - }, - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" - }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" - }, - "required": true - }, - { - "name": "onSchemaError", - "in": "query", - "schema": { - "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": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] }, - "required": false - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Updates a row in a Big Table" - }, - "delete": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the row does not exist or was successfully deleted." - } - } - } - }, - "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 - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["payment_required"] - }, - "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": ["table_not_found", "table_not_big_table"] - }, - "message": { - "type": "string" - } - }, - "required": ["type", "message"], - "additionalProperties": false - } - }, - "required": ["error"], - "additionalProperties": false - } - } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "row_not_found", + "table_not_found", + "table_not_big_table" + ] + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "tableID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", - "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "412": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "precondition_failed" + ] }, - "required": true - }, - { - "name": "rowID", - "in": "path", - "schema": { - "type": "string", - "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", - "example": "zcJWnyI8Tbam21V34K8MNA" + "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" + ] }, - "required": true + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "description": "Deletes a row from a Big Table" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } + } }, - "/stashes/{stashID}/{serial}": { - "put": { - "responses": { - "200": { - "description": "", - "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." - } - } - } - }, - "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 - } - } + "parameters": [ + { + "name": "if-match", + "in": "header", + "schema": { + "type": "string", + "pattern": "^\"[0-9]+\"$", + "description": "ETag of the current table version. If provided, the request will fail if this row has been updated since the given version. See [Data Versioning](/api-reference/v2/tables/versioning)." + }, + "required": false + }, + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "required": true + }, + { + "name": "onSchemaError", + "in": "query", + "schema": { + "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 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } + } + } + } + }, + "description": "Updates a row in a Big Table" + }, + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the row does not exist or was successfully deleted." + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "parameters": [ - { - "name": "stashID", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash. The stash will be created if it doesn't already exist.", - "example": "20240215-job32" - }, - "required": true - }, - { - "name": "serial", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.", - "example": "1" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } + } + }, + "402": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_required" + ] }, - "required": true + "message": { + "type": "string" + } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", - "example": { - "fullName": "Alex Bard", - "invoiceDate": "2024-07-29T14:04:15.561Z", - "totalAmount": 34.5, - "amountPaid": 0 - } - }, - "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 - } - ] - } - }, - "text/csv": { - "schema": { - "type": "string", - "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" - } + }, + "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" + ] }, - "text/tab-separated-values": { - "schema": { - "type": "string", - "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", - "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" - } + "message": { + "type": "string" } + }, + "required": [ + "type", + "message" + ], + "additionalProperties": false } - }, - "description": "Sets the content of a chunk of data inside a stash" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } + } }, - "/stashes/{stashID}": { - "delete": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false, - "description": "A 200 HTTP response code indicates that the stash with the given stash ID was successfully deleted." - } - } - } - }, - "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 - } - } + "parameters": [ + { + "name": "tableID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`", + "example": "2a1bad8b-cf7c-44437-b8c1-e3782df6" + }, + "required": true + }, + { + "name": "rowID", + "in": "path", + "schema": { + "type": "string", + "description": "ID of the row, e.g., `zcJWnyI8Tbam21V34K8MNA`", + "example": "zcJWnyI8Tbam21V34K8MNA" + }, + "required": true + } + ], + "description": "Deletes a row from a Big Table" + } + }, + "/stashes/{stashID}/{serial}": { + "put": { + "responses": { + "200": { + "description": "", + "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." + } + } + } + }, + "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 + } + } + } + } + }, + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash. The stash will be created if it doesn't already exist.", + "example": "20240215-job32" + }, + "required": true + }, + { + "name": "serial", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.", + "example": "1" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {}, + "description": "A row object 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\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```", + "example": { + "fullName": "Alex Bard", + "invoiceDate": "2024-07-29T14:04:15.561Z", + "totalAmount": 34.5, + "amountPaid": 0 + } }, - "parameters": [ - { - "name": "stashID", - "in": "path", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", - "description": "ID of the stash, e.g., `20240215-job32`", - "example": "20240215-job32" + "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 + } + ] + } + }, + "text/csv": { + "schema": { + "type": "string", + "description": "A CSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name,Age,Birthday\nAlice,25,2024-08-29T09:46:16.722Z\nBob,30,2020-01-15T09:00:16.722Z" + } + }, + "text/tab-separated-values": { + "schema": { + "type": "string", + "description": "A TSV string. The first line is column IDs, and each subsequent line is a row of data.", + "example": "Name\tAge\tBirthday\nAlice\t25\t2024-08-29T09:46:16.722Z\nBob\t30\t2020-01-15T09:00:16.722Z" + } + } + } + }, + "description": "Sets the content of a chunk of data inside a stash" + } + }, + "/stashes/{stashID}": { + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false, + "description": "A 200 HTTP response code indicates that the stash with the given stash ID was successfully deleted." + } + } + } + }, + "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 } - ], - "description": "Deletes a stash and all its data" + }, + "required": [ + "error" + ], + "additionalProperties": false + } + } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "tags": [], - "servers": [ - { - "description": "Production", - "url": "https://api.glideapps.com" - } - ] + } + }, + "parameters": [ + { + "name": "stashID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", + "description": "ID of the stash, e.g., `20240215-job32`", + "example": "20240215-job32" + }, + "required": true + } + ], + "description": "Deletes a stash and all its data" + } + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "tags": [], + "servers": [ + { + "description": "Production", + "url": "https://api.glideapps.com" + } + ] } From 04c2d6b63223ccf11939b3df3ed7d4e5b1641e9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:33:02 +0000 Subject: [PATCH 4/4] Update from https://github.com/glideapps/glide/commit/ab2b2ee8e8665d20ab90c80031353b43920a2367 --- openapi/swagger.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi/swagger.json b/openapi/swagger.json index c79546c..1f3f7da 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -561,7 +561,7 @@ "description": "Creates a new Big Table" } }, - "/tables/importFromURL": { + "/tables/import": { "post": { "responses": { "201": { @@ -759,7 +759,7 @@ "schema": { "type": "object", "properties": { - "url": { + "fromUrl": { "type": "string", "format": "uri", "description": "The url of the table to fetch from. Required when the name is not passed in the request body. It is an error to pass a name in both this query parameter and the request body." @@ -773,7 +773,7 @@ } }, "required": [ - "url" + "fromUrl" ], "additionalProperties": false }