One of the most common needs is to add a new line or modify the values of an existing line via the API.
To create or modify a row or the data of a row, the API request is createOrUpdateTableRow.
To create or modify multiple rows, or data from multiple rows, the API request is createOrUpdateTableRows.
1. Creating a new row
Once the identifiers of the columns (fields) of a table with getTableValues have been obtained, it is very easy to create a new line.
From the API site, 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):
2. Modify the values of one or more fields in an existing row
Once the identifiers of the columns (fields) and rows of a table with getTableValues have been obtained, it is easy to modify the values of an existing row.
From the API site, use the createOrUpdateTableRow. function by specifying the line ID 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), rowIDtoUpdate with the row ID and fieldID1, fieldID2, fieldID3 and fieldID4 with the correct column IDs (fields):
NB: In both cases, it is rather recommended to go through the parameters in POST rather than in GET. It was used in the example merely for practicality purposes.
Comments
0 comments
Please sign in to leave a comment.