.dataset().row().data()
.dataset(...).row(...).data(): Dictionary
Get the data for a specific row in a given data set.
This method returns a dictionary containing either a data
object that holds the data row requested, or an error
message. This object is identical in construction to the data objects returned for multiple rows from .dataset().data()
.
If a row is requested which does not exist, the JSON return will contain an error
property with an error message.
{
"data": {
"id": number,
"dv": number,
// ... data values
},
"error": string // If no error, then undefined
}
The following shows the an example call to get the data from a flight information CloudTable for row id 13. The data set contains dp-11
the flight number, l-5
a link to an airports data set for the departure airport and l-6
for the link to the arrivals airport. Inside these two lines dp-8
is the airport name.
api = CloudTablesApi(':apiKey', options={'domain': ':domainOrIp'})
result = api.dataset(':id').row(13).data()
The resulting JSON structure is:
{
"data": {
"id": 13,
"dv": 1,
"dp-11": "AA123",
"l-5": [{
"id": 2,
"dp-8": "Edinburgh"
}],
"l-6": [{
"id": 3,
"dp-8": "Bristol"
}]
}
}