Edit an individual object with a complete or partial update:
PUT https://sub-domain.cloudtables.io/api/1/dataset/:id/:row
curl \
-X PUT \
-d key=:apiKey \
https://sub-domain.cloudtables.io/api/1/dataset/:id/:row
This method will update the information for an individual row and allows for either a full or partial update, where:
:apiKey
is the API key to use for access (see below):id
is the data set id (a UUID), per the /datasets
API. The data set ID can also be found in the Data set inspector of the Data tab for the data set.Note that you will need to pass other parameters as well to set values. The specific names of these parameters depend upon your data set schema. Please see below.
clientId
will be an integer or UUID which mean you'd need to look up the user to understand who made what changes. Note that while the clientId
should be unique per client and not change - the clientName
can change and will be updated to reflect the latest value given (e.g. if a user modifies their name in your own system).
Similar to role
but allows multiple roles to be specified.dp-{number}
parameters will depend upon the number of data points configured for the data set. Each is optional and if not given the existing value will be retained.key
).id
property of the data set entries you wish to link to. Note that to remove all links, you must send an empty array for the link property.role
but allows multiple roles to be specified.The JSON result will contain the data object for the row, if there are no errors, in the same structure as the individual row request route. 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, used else where in this documentation, to update a single text field:
curl \
-X PUT \
-d key=:apiKey \
-d dp-11=CloudTablesAirlines \
https://sub-domain.cloudtables.io/api/1/dataset/:id
Will result in the following JSON return:
{
"data": {
"id": 27,
"dv": 1,
"dp-11": "CloudTablesAirlines",
"l-5": [{
"id": 11,
"dp-8": "Aberdeen"
}],
"l-6": [{
"id": 3,
"dp-8": "Bristol"
}]
},
"success":true
}