Tables

Methods

All Tables

GET https://api.starion.io/apps/:appId/tables

Get all tables in your team

[
  {
    "_id": "fe8affb7-b31f-43e3-a8d0-bc45f93842dd",
    "createdAt": "2023-10-24T19:41:48.349Z",
    "lastUpdate": "2023-10-24T19:41:48.349Z",
    "name": "Products",
    "tableType": "shared" // shared | private
    "appIds": ["eca80596-56bb-46ed-b0b3-f2e3404ee2d5", 
               "0d7d675d-f620-492f-9fb7-0426cafa7ffe"] // apps that using this table
  },
  {
    "_id": "a1e2ca40-e111-4ae6-8fae-01906edc084a",
    "createdAt": "2023-10-24T19:41:48.349Z",
    "lastUpdate": "2023-10-24T19:41:48.349Z",
    "name": "Orders",
    "tableType": "private" // shared | private
    "appIds": [] // apps that using this table
  }
]

List Rows

GET https://api.starion.io/tables/:tableId/rows

Path Parameters

NameTypeDescription

tableId*

String

Table id you want to query

Query Parameters

NameTypeDescription

limit

Number

Maximum of 100. Default is 10

offset

Number

Default: 0

ownerUserId

String

User id, if none provided when querying private table, it will be an error.

orderBy

String

createdAt or lastUpdatedAt. Default: createdAt

orderDirection

String

asc or desc. Default: asc

{
    "error": "ownerUserId is required when querying private table"
}

Create Row

POST https://api.starion.io/apps/:appId/tables/:tableId/rows

Create a row on the specified table

Path Parameters

NameTypeDescription

tableId

String

Table id you want to create row to

Query Parameters

NameTypeDescription

ownerUserId

String

Required if the table is private table

Request Body

NameTypeDescription

fields*

Object

{
    "error": "ownerUserId is required when editing private table."
}

Update Row

PUT https://api.starion.io/apps/:appId/tables/:tableId/rows/:rowId

Path Parameters

NameTypeDescription

tableId*

String

Table id you want to update

rowId*

String

Query Parameters

NameTypeDescription

ownerUserId

String

Required if the table is private table

Request Body

NameTypeDescription

fields*

Object

{
    "error": "ownerUserId is required when editing private table."
}

Patch Row

PATCH https://api.starion.io/apps/:appId/tables/:tableId/rows/:rowId

Path Parameters

NameTypeDescription

tableId*

String

Table id you want to update

rowId*

String

Row id

Query Parameters

NameTypeDescription

ownerUserId

String

Required if the table is private table

Delete Row

DELETE https://api.starion.io/apps/:appId/tables/:tableId/rows/:rowId

Path Parameters

NameTypeDescription

teamId*

String

Your team id

tableId*

String

Table id you want to update

rowId*

String

Row id

Query Parameters

NameTypeDescription

ownerUserId

String

Required if the table is private table

Delete Rows

DELETE https://api.starion.io/apps/:appId/:teamId/tables/:tableId/rows

Path Parameters

NameTypeDescription

teamId*

String

Your team id

tableId*

String

Table id you want to update

Query Parameters

NameTypeDescription

ownerUserId

String

Required if the table is private table

{
    "deletedRowIds": ["6b84a1df-4f04-47d3-82b5-b2434cd27186", 
                      "61c5575a-94ec-460f-b60c-6824d31f062f"]
}

Field Values

Field values in our API correspond to the columns in your table. When interacting with row data, the format of the returned or sent object depends on the column type. Here are the formats based on the different types:

Single line Text, Multi-line Text, Phone Number

These are represented as simple UTF-8 strings.

Single Select

An array with a single element containing the chosen value.

Multiple Select

An array with multiple elements, each element corresponding to a selected value.

Number

Numeric values such as -1.3 or 100.

Checkbox

Boolean values, either true or false.

Date Time

Date and time values follow the ISO-8601 format.

Attachment

An array of attachment object.

Attachment
{
    "id": string
    "url": string
    "uploadedAt": string
}

Reference to another Item in another Table

This is represented as an array of item IDs.

Examples

List Rows response
[
    {
        "phone-number-column": "123-456-7890",
        "date-time-column": "2011-10-05T14:48:00.000Z",
        "single-select-column": [
            "selected-value1",
            "selected-value2"
        ]
        "attachments-column": [
            {
                "id": "attachment-id",
                "url": "https://starion.io/attachments/attachment-file.ext"
            },
            {
                "id": "attachment-id2",
                "url": "https://starion.io/attachments/attachment-file2.ext"
            },
        ],
        "checkbox-column": false,
        "reference-column": [
            "another-table-item-id-1",
            "another-table-item-id-2"
        ]
    }
]

Last updated