Overview

Onalu’s record creation API allows adding records to a table by sending HTTP POST or PUT requests with JSON payloads. This API can be used to automate the creation of records, for example to insert data from non-Onalu sources.

To use this API you first need to enable it for the table you want to create records in (see Enabling the API). You will then be able to send HTTP POST or PUT requests to the URL displayed in the table's settings (which should look something like http://onalu.com/api/v0/table/ws123/tb456/789) whose payload is a JSON object with properties corresponding to the Onalu fields you wish to populate with data. See below for specific examples using the command-line client curl and the web-based client Hoppscotch to make requests.

Enabling the API

Screen Recording 2023-03-23 at 3.22.13 PM.mov

To enable the record creation API:

  1. Open the Onalu table you want to enable the API for
  2. Click on the settings icon on the top
  3. Find the API section
  4. Toggle “Enable”

Getting the Table API URL

To enable the record creation API:

  1. Open the Onalu table
  2. Open table settings by clicking on the settings icon
  3. Find the API section
  4. Find the URL and copy it

Table API URL.png

Example Using curl

The curl program is a command-line application that can make HTTP requests. It is installed by default on macOS and most Linux distributions. Assuming your table contains a text-typed field named “Text”, the following curl command will create a new record with a cell containing the value “Hello, Onalu!”: