Skip to main content
PUT
/
tables
/
{tableID}
cURL
curl --request PUT \
  --url https://api.glideapps.com/tables/{tableID} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "schema": {
    "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": [
    {
      "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
    }
  ]
}'
{
  "data": {
    "rowIDs": [
      "zcJWnyI8Tbam21V34K8MNA",
      "93a19-cf7c-44437-b8c1-e9acbbb"
    ]
  }
}
Overwrite an existing Big Table by clearing all rows and (optionally) adding new data. Row IDs for any added rows are returned in the response in the same order as the input row data is passed in the request. Row data may be passed in JSON, CSV, or TSV format. If a column is not included in the passed row data, it will be empty in the added row. If a column is passed that does not exist in the updated table schema, or with a value that does not match the column’s type, the default behavior is for no action to be taken and the API call to return an error. However, you can control this behavior with the onSchemaError query parameter.
There is currently no way to supply values for user-specific columns in the API. Those columns will be cleared when using this endpoint.

Updating the Schema

You can optionally update the table schema at the same time by providing a new schema in the JSON request body. If you do not provide a schema, the existing schema will be used. When using a CSV or TSV request body, you cannot pass a schema. If you need to update the schema, use the onSchemaError=updateSchema query parameter, or stash the CSV/TSV data and pass a JSON request body referencing the stash ID.

Examples

To clear all rows from a table, send a PUT request with an empty array in the rows field:
{
    "rows": []
}
If you want to reset a table’s data with a small number of rows, you can do so by providing the data inline in the rows field (being sure that row object structure matches the table schema):
[
    {
        "fullName": "Alex Bard",
        "ageInYears": 30,
        "hiredOn": "2021-07-03"
    }
]
However, this is only appropriate for relatively small initial datasets (around a few hundred rows or less, depending on schema complexity). If you need to work with a larger dataset you should utilize stashing.
Stashing is our process for handling the upload of large datasets. Break down your dataset into smaller, more manageable, pieces and upload them to a single stash ID.Then, to reset a table’s data from the stash, use the $stashID reference in the rows field instead of providing the data inline:
{
    "rows": { "$stashID": "20240215-job32" }
}
This endpoint can be combined with the Get Rows endpoint and stashing to fetch the current table data, modify it, and then overwrite the table with the updated data:
  1. Call the Get Rows endpoint to fetch the current table data. Pass a reasonably high limit query parameter because you want to fetch all rows in as few requests as possible.
  2. Modify the data as desired, and then stash the modified rows using the Stash Data endpoint.
  3. If a continuation was returned in step 1, repeat steps 1-3, passing the continuation query parameter to Get Rows until all rows have been fetched, modified, and stashed.
  4. Finally, call this endpoint with same stash ID used in step 2. This will overwrite the table with the updated data:
{
    "rows": { "$stashID": "20240215-job32" }
}
Risk of Data LossWe strongly recommend you use the If-Match header to ensure the table is not modified between steps 1 and 4. See the Data Versioning guide for more information.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-glide-asynchronous
enum<string>

Allow asynchronous processing, which will return a job ID. Note that this does not force asynchronouys processing. The caller must handle both synchronous and asynchronous responses.

Available options:
true,
false
if-match
string

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.

Path Parameters

tableID
string
required

ID of the table, e.g., 2a1bad8b-cf7c-44437-b8c1-e3782df6

Example:

"2a1bad8b-cf7c-44437-b8c1-e3782df6"

Query Parameters

onSchemaError
enum<string>

The action to take when the passed data does not match the table schema:

  • abort: Abort the entire operation and return an error.
  • dropColumns: Ignore the data that caused the error, and do not import those columns in the affected rows.
  • 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.
Available options:
abort,
dropColumns,
updateSchema
Example:

"updateSchema"

Body

  • object
  • object[]
rows
required

A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:

[
{
"fullName": "Alex Bard",
"invoiceDate": "2024-07-29T14:04:15.561Z",
"totalAmount": 34.50,
"amountPaid": 0
},
{
"fullName": "Alicia Hines",
"invoiceDate": "2023-06-15T10:30:00.000Z",
"totalAmount": 50.75,
"amountPaid": 20
}
]
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
}
]
schema
object

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"
}
]
}

Response

data
object
required
I