One of the most common requirements is to add a new row or change the values of an existing row via the API.
To create or modify a row or the data in a row, the API request is createOrUpdateTableRow.
To create or modify multiple rows, or the data for multiple rows, the API request is createOrUpdateTableRows.
1. Create a new row
Once you have retrieved the column identifiers (fields) of a table with getTableValues, it is easy to create a new row.
From the API website, use the createOrUpdateTableRow. function, specifying tmpNEW_ROW as the value for the rowID parameter.
Here is an example of a request. Replace userID with your user ID and sessionID with your API key (Sesskey), and fieldID1, fieldID2, fieldID3 and fieldID4 with the correct column IDs (fields):
Note : it is recommended to pass the parameters as POST rather than GET but for the example it is easier to test.
2. Modifying the values of one or more fields in an existing row
Once you have retrieved the identifiers of the columns (fields) and rows of a table with getTableValues, it is easy to modify the values of an existing row.
From the API site, use the createOrUpdateTableRow. function, specifying the row ID as the value for the rowID parameter.
Here is an example of a request. Replace of course userID with your user ID and sessionID with your API key (Sesskey), rowIDtoUpdate with the row ID and fieldID1, fieldID2, fieldID3 and fieldID4 with the correct column IDs (fields):
Note : it is recommended to pass the parameters in POST rather than GET but for the example it is easier to test.
Comments
0 comments
Please sign in to leave a comment.