For the complete documentation index, see llms.txt. This page is also available as Markdown.

insertmicroapprow

description

Add a new row to a Datatable (historically called a Microapp).

Use Row Metadata and Relationships for the canonical definition of shared row semantics such as embeddingRowID, linked-table structures, and metadata fields returned after creation.

parameters

The X-Auth-Token and X-User-Id are derived from the values authToken and userId returned from the login endpoint and are used in the HTTP header.

Accepted top-level request properties:

  • microAppID - required Datatable ID.

  • rowData - required. Name/value pairs for business fields. Keys are matched against field labels and are case-sensitive.

  • embeddingRowID - optional parent row ID when inserting a child row in a sub-table relationship.

  • userID - optional creator override. If omitted, the authenticated user becomes the row creator.

  • viewers - optional viewers array for the inserted row.

  • teamViewers - optional team-viewers array for the inserted row.

  • ignoreActionRules - optional boolean. When true, insert action rules are skipped.

Unknown keys inside rowData are ignored. System metadata such as _id, submitted, clientSubmitted, parentResourceID, and topLevelParentID is not writable through rowData.

resource

{
  "microAppID": "<insert datatable id here>",
  "rowData": {
    "ExampleFieldName": "ExampleValue"
  },
  "embeddingRowID": "<optional parent row id>",
  "userID": "<optional creator user id>",
  "viewers": [
    "<optional user id>"
  ],
  "teamViewers": [
    "<optional team id>"
  ],
  "ignoreActionRules": true
}

response

Returns the status of the request and, on success, the new rowID.

example

You should get back:

Child Row Example Using embeddingRowID

When inserting into a child Datatable, include embeddingRowID to link the new row to its parent row:

Use embeddingRowID for parent-child sub-table relationships. Do not confuse it with linked-table crossAppRowID, which points to a referenced row in another Datatable.

Optional Metadata Example

This example shows the optional top-level parameters that the endpoint accepts:

Linked Table Field Example

When inserting a row with a linked table (cross app) field, you need to provide both the crossAppRowID (the ID of the row you're linking to) and a value object containing the display information.

Key Points:

  • crossAppRowID: The _id of the row in the linked table

  • value.label: The field name from the linked table to display

  • value.value: The actual display value from that field

You should get back:

what you can and can't change

  • You can populate Datatable fields by label in rowData.

  • You can set row creator with top-level userID.

  • You can set row-level viewers and teamViewers with top-level properties.

  • You can assign a parent row with top-level embeddingRowID.

  • You cannot use rowData to set arbitrary system metadata like _id, submitted, clientSubmitted, parentResourceID, or topLevelParentID.

  • If the Datatable has Viewers or Team Viewers fields configured to inherit from the parent row, those values may be inherited from the embeddingRowID row rather than taken from omitted row content.

See Also


Last updated