.dataset(...).insert(data: Dictionary): Dictionary

Insert a new row into a a given data set.


  • data dictionary
    The data that should be inserted into the data set for the new row's values. This will be a dictionary that contains properties who's names start dp- for data points and l- for links. To get the data point ids please use the .dataset().schema() method or refer to the "ID" for the data point which can be found in the Data set inspector of the Data tab for the data set. The number of dp-{number} parameters will depend upon the number of data points configured for the data set. Each is optional (unless a "Required" validator is set for the data point) and will take the default value if not specified.


This method returns a dictionary containing a data object with the data for the new row, if there are no errors, in the same structure as .dataset().data() method. Additionally, if any errors are reported there may be error and fieldError properties. If there are no errors, the error properties will not be present.

    "data": {
        "id": number,
        "dv": number,
        // ... data values
    "error": string,         // General error information
    "fieldErrors": [
            "name": string,  // Name of the data point in error
            "status": string // Error message


Consider the following being sent to our example data set for flights. It has a string field for the flight name and two links for the departure and arrival airports, in keeping with the example use for the data fetch examples:

api = CloudTablesApi(':apiKey', subdomain='sub-domain')
result = api.dataset(':id').insert({
	'dp-11': 'My Flight',
	'l-5': 11,
	'l-6': 3

Will result in the following JSON being stored in result:

	"data": {
		"id": 27,
		"dv": 0,
		"dp-11": "MyFlight",
		"l-5": [{
			"id": 11,
			"dp-8": "Aberdeen"
		"l-6": [{
			"id": 3,
			"dp-8": "Bristol"