Tables

Tables live inside spaces and hold your records. Each table has a schema of typed fields (text, number, date, select, lookup, user, etc.).

List tables in a space

GET /api/space/<space_id>/tables/list

Request

curl https://infolobby.com/api/space/42/tables/list \
  -H "Authorization: Bearer il_live_..."

Response

[
  {
    "id": 101,
    "name": "Contacts",
    "space_id": 42
  },
  {
    "id": 102,
    "name": "Deals",
    "space_id": 42
  }
]

Get a table's schema

GET /api/table/<table_id>/get

Returns the table metadata and its field definitions.

Example

curl https://infolobby.com/api/table/101/get \
  -H "Authorization: Bearer il_live_..."

Response

{
  "id": 101,
  "name": "Contacts",
  "space_id": 42,
  "fields": [
    {"id": "item_id", "name": "ID", "type": "number", "key": "true"},
    {"id": "name", "name": "Name", "type": "text"},
    {"id": "email", "name": "Email", "type": "text"},
    {"id": "status", "name": "Status", "type": "select", "options": [{"title":"New","color":""},{"title":"Active","color":"#86EFAC"},{"title":"Archived","color":"#D1D5DB"}]}
  ]
}

Create a table

POST /api/space/<space_id>/tables/create

Available to any account key with admin access to the workspace. Personal keys (il_user_) cannot create tables.

Request body

Field Type Required Notes
name string yes Display name
fields object[] yes Field definitions (see schema below)
db_table string no Underlying MySQL table name. Auto-generated from name if omitted.
tabs object[] no Tab grouping for fields

Field shape

Each field has at minimum name and type. Common types: text, number, date, select, user, lookup, key. Tables should always have one key field as the primary identifier.

id is optional on create. When omitted, the field id is derived from name (slugified, e.g. "Email Address"email_address) and de-duplicated automatically — so you can create a table by sending only name + type per field. Supply id explicitly only when you need a specific column name. Duplicate explicit ids are rejected with Duplicate field id.

Example

curl -X POST https://infolobby.com/api/space/42/tables/create \
  -H "Authorization: Bearer il_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contacts",
    "fields": [
      {"id":"id","name":"ID","type":"key"},
      {"id":"name","name":"Name","type":"string"},
      {"id":"email","name":"Email","type":"string"}
    ]
  }'

Equivalent minimal form (ids derived from names — name/email):

{
  "name": "Contacts",
  "fields": [
    {"name":"ID","type":"key"},
    {"name":"Name","type":"string"},
    {"name":"Email","type":"string"}
  ]
}

Update a table

POST /api/table/<table_id>/update

⚠ Destructive if misused. The fields array you POST fully replaces the table's schema. Any field not in the payload is removed and its data is permanently dropped from the underlying MySQL table.

Recommended flow: 1. GET /api/table/<id>/get to fetch the current schema. 2. Mutate the returned fields array in place — add, edit, or remove specific entries. 3. POST the modified array back to update.

Never construct the fields array from scratch unless you intend to wipe the schema.

Request body

Field Type Required Notes
name string yes Table display name
fields object[] yes Full field array — see warning above
tabs object[] no Tab grouping
settings.hidden bool no Hide the table from the workspace navigation

Example

# Step 1: fetch current schema
curl https://infolobby.com/api/table/101/get \
  -H "Authorization: Bearer il_live_..." > table.json

# Step 2: edit table.json (add a field, etc.) -- shown here as a fictional payload
# Step 3: post it back
curl -X POST https://infolobby.com/api/table/101/update \
  -H "Authorization: Bearer il_live_..." \
  -H "Content-Type: application/json" \
  -d @updated.json

Delete a table

POST /api/table/<table_id>/delete

Deletes the table definition and (for managed databases) drops the underlying MySQL table. Irreversible.

curl -X POST https://infolobby.com/api/table/101/delete \
  -H "Authorization: Bearer il_live_..."