postrock docs

API

Each table you create in postrock is given a unique id which is used to construct its secret URL. For example, with id s3cr3t123, the API will accept POST requests at /@s3cr3t123.csv

The table’s secret URL should be kept SECRET! Anyone who knows the secret URL can POST data to the table, so do not make it publicly available in client-side code. If you do, you run the risk of having rows added without your permission, and your table’s row limit could be met causing the table to stop accepting new data.

Request

POST https://@:id.csv

The body of the request should be one or more rows of CSV as UTF-8 text. Multiple rows are accepted if they are separated by a newline.

Content-Type HTTP header can be text/plain, which is the default for fetch POST, or application/x-www-form-urlencoded, which is the default for cURL POST.

The first row of the first POST is used to set the number of columns for the table. In subsequent POSTs, rows must have that same number of columns, or the request will error.