Operations (sample payloads)

Main operations

Create row

Create a new row in the given table. Sample Input

{
    "datatable_id": "dt_123456789",
    "properties": [
        \{
            "key": "First Name",
            "value": "John"
        \},
        \{
            "key": "Last Name",
            "value": "Doe"
        \},
        \{
            "key": "Email",
            "value": "john.doe@example.com"
        \},
        \{
            "key": "Age",
            "value": "35"
        \},
        \{
            "key": "City",
            "value": "New York"
        \}
    ],
    "key_response_by_id": false
}

Sample Output

{
    "datatableId": "dt_123456789",
    "id": "row_987654321",
    "properties": \{
        "First Name": "John",
        "Last Name": "Doe",
        "Email": "john.doe@example.com",
        "Age": "35",
        "City": "New York"
    \}
}

Delete row

Delete a row by the given ID. Sample Input

\{
    "datatable_id": "dt_123456789abcdef",
    "row_id": "row_987654321zyxwvu"
\}

Sample Output

{
    "success": true
}

List columns

Return a list of columns. Sample Input

{
    "datatable_id": "dt_123456789abcdef"
}

Sample Output

{
    "results": [
        \{
            "id": "col_001",
            "name": "customer_id",
            "type": "string"
        \},
        \{
            "id": "col_002",
            "name": "first_name",
            "type": "string"
        \},
        \{
            "id": "col_003",
            "name": "last_name",
            "type": "string"
        \},
        \{
            "id": "col_004",
            "name": "email",
            "type": "string"
        \},
        \{
            "id": "col_005",
            "name": "age",
            "type": "integer"
        \},
        \{
            "id": "col_006",
            "name": "registration_date",
            "type": "date"
        \}
    ]
}

List rows

Return all rows in a table. Sample Input

\{
    "datatable_id": "dt_123456789",
    "key_response_by_id": false,
    "after": "cursor_abc123",
    "first": 10
\}

Sample Output

{
    "elements": [
        {
            "datatableId": "dt_123456789",
            "id": "row_1",
            "properties": \{
                "column1": "John Doe",
                "column2": "johndoe@example.com",
                "column3": "123-456-7890",
                "column4": "New York",
                "column5": "USA",
                "column6": "Software Engineer",
                "column7": "2023-05-15",
                "column8": "Active"
            \}
        },
        {
            "datatableId": "dt_123456789",
            "id": "row_2",
            "properties": \{
                "column1": "Jane Smith",
                "column2": "janesmith@example.com",
                "column3": "987-654-3210",
                "column4": "London",
                "column5": "UK",
                "column6": "Product Manager",
                "column7": "2023-05-14",
                "column8": "Active"
            \}
        }
    ]
}

List tables

Return a list of tables. Sample Input

\{
    "first": 5,
    "after": "cursor_abc123"
\}

Sample Output

{
    "elements": [
        {
            "id": "tbl_001",
            "name": "Customers",
            "description": "Table containing customer information",
            "columns": [
                \{
                    "name": "customer_id",
                    "id": "col_001",
                    "type": "string"
                \},
                \{
                    "name": "full_name",
                    "id": "col_002",
                    "type": "string"
                \},
                \{
                    "name": "email",
                    "id": "col_003",
                    "type": "string"
                \}
            ],
            "userId": "usr_123",
            "orgId": "org_456",
            "workspaceId": "wsp_789",
            "projectId": "prj_101",
            "createdAt": "2023-04-15T10:30:00Z",
            "updatedAt": "2023-04-15T10:30:00Z"
        },
        {
            "id": "tbl_002",
            "name": "Orders",
            "description": "Table containing order information",
            "columns": [
                \{
                    "name": "order_id",
                    "id": "col_004",
                    "type": "string"
                \},
                \{
                    "name": "customer_id",
                    "id": "col_005",
                    "type": "string"
                \},
                \{
                    "name": "order_date",
                    "id": "col_006",
                    "type": "date"
                \},
                \{
                    "name": "total_amount",
                    "id": "col_007",
                    "type": "number"
                \}
            ],
            "userId": "usr_123",
            "orgId": "org_456",
            "workspaceId": "wsp_789",
            "projectId": "prj_101",
            "createdAt": "2023-04-15T11:15:00Z",
            "updatedAt": "2023-04-15T11:15:00Z"
        }
    ]
}

Lookup row

Lookup a row by a column value and return first matching record. Sample Input

\{
    "datatable_id": "dt_123456789",
    "column": "email",
    "value": "john.doe@example.com",
    "key_response_by_id": false
\}

Sample Output

{
    "datatableId": "dt_123456789",
    "id": "row_987654321",
    "properties": \{
        "email": "john.doe@example.com",
        "first_name": "John",
        "last_name": "Doe",
        "age": "35",
        "occupation": "Software Engineer",
        "city": "New York",
        "country": "USA",
        "phone": "+1-555-123-4567"
    \}
}

Update cell in row

Update a cell in the given table. Sample Input

\{
    "datatable_id": "dt_123456789",
    "row_id": "row_987654321",
    "column_id": "col_abcdefgh",
    "value": "Updated Value",
    "key_response_by_id": false
\}

Sample Output

{
    "datatableId": "dt_123456789",
    "id": "row_987654321",
    "properties": \{
        "Column 1": "Existing Value 1",
        "Column 2": "Existing Value 2",
        "Column 3": "Updated Value",
        "Column 4": "Existing Value 4",
        "Column 5": "Existing Value 5",
        "Column 6": "Existing Value 6",
        "Column 7": "Existing Value 7",
        "Column 8": "Existing Value 8"
    \}
}

DDL operations

List columns (DDL)

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping


Sample Input

{}

Sample Output

[
    \{
        "column_name": "id",
        "data_type": "INTEGER",
        "is_nullable": "NO",
        "column_default": null,
        "is_primary_key": true
    \},
    \{
        "column_name": "first_name",
        "data_type": "VARCHAR(50)",
        "is_nullable": "YES",
        "column_default": null,
        "is_primary_key": false
    \},
    \{
        "column_name": "last_name",
        "data_type": "VARCHAR(50)",
        "is_nullable": "YES",
        "column_default": null,
        "is_primary_key": false
    \},
    \{
        "column_name": "email",
        "data_type": "VARCHAR(100)",
        "is_nullable": "NO",
        "column_default": null,
        "is_primary_key": false
    \},
    \{
        "column_name": "created_at",
        "data_type": "TIMESTAMP",
        "is_nullable": "NO",
        "column_default": "CURRENT_TIMESTAMP",
        "is_primary_key": false
    \}
]

List tables (DDL)

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping


Sample Input

{}

Sample Output

[
    \{
        "table_name": "customers",
        "ddl": "CREATE TABLE customers (\n  id INT PRIMARY KEY,\n  name VARCHAR(100),\n  email VARCHAR(100),\n  created_at TIMESTAMP\n);"
    \},
    \{
        "table_name": "orders",
        "ddl": "CREATE TABLE orders (\n  id INT PRIMARY KEY,\n  customer_id INT,\n  order_date DATE,\n  total_amount DECIMAL(10, 2),\n  FOREIGN KEY (customer_id) REFERENCES customers(id)\n);"
    \},
    \{
        "table_name": "products",
        "ddl": "CREATE TABLE products (\n  id INT PRIMARY KEY,\n  name VARCHAR(200),\n  description TEXT,\n  price DECIMAL(8, 2),\n  stock_quantity INT\n);"
    \}
]

Was this page helpful?