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. Whentrue, 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_idof the row in the linked tablevalue.label: The field name from the linked table to displayvalue.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
viewersandteamViewerswith top-level properties.You can assign a parent row with top-level
embeddingRowID.You cannot use
rowDatato set arbitrary system metadata like_id,submitted,clientSubmitted,parentResourceID, ortopLevelParentID.If the Datatable has Viewers or Team Viewers fields configured to inherit from the parent row, those values may be inherited from the
embeddingRowIDrow rather than taken from omitted row content.
See Also
Row Metadata and Relationships - Canonical metadata,
embeddingRowID, and linked-table semanticsinsertmicroapprows - Batch insert version of this operation
Common API Examples - See this operation in all three API formats
microappdata/row - Understanding linked table field structure
updatemicroapprow - Updating linked table fields
Last updated