Log
A simple log database backed by Google Spreadsheet
1. You need a database
Go create your new spreadsheet, it will be your database. Get the sheetId
.
And then invite this email with Write permission. This is the bot that will write the log for you.
sheet-bot@thesimpleapi.iam.gserviceaccount.com
2. Send log
POST https://log.thesimpleapi.com/
Body:
(Press "Send" to see response)
Requirements
- Request body must be a JSON object or an array of JSON object (bulk insert).
- Supported data types are string, number and boolean. Any other unregonized data types will be converted to JSON string representation of the value.
- Column
[[createdAt]]
is automatically added with ISO string date time of the record.
3. Multi pages
You can select the page (or "sheet", or "table"... you may call it) by append the page name in endpoint: /:sheetId/:page
POST https://log.thesimpleapi.com//
Body:
(Press "Send" to see response)
4. View/manage logs
You can view, filter, create visualizations... on your Google Spreadsheet. This is the example shpreadsheet used in the previous step.
5. What can you do with this?
- Quickly collect and aggregate data.
- For example, I logged browser information of all requests to this page to this shpreadsheet