Retrieve the data for a data set, returning it in a structured JSON format.
GET https://ip-or-hostname/io/api/1/dataset/:id
curl \
-G \
-d 'key=:apiKey' \
https://ip-or-hostname/io/api/1/dataset/:id
Get the data for a specified data set 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.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).key
).role
but allows multiple roles to be specified.The returned JSON will be an object which contains a data
array. This array will hold one entry for each row in your data set, the exact structure of which will depend upon how your data set is configured, and any any data sets which are linked to it. The properties in the row objects are named based upon their data point ids. The prefix for the id can help identify what type it is:
dp-
- regular data pointc-
- computed valuesl-
- link (which will be an array of objects, in a similar structure, based upon the link).Each row object will also have the following properties:
id
- The identifier for that rowdv
- The data version of the row. Each edit will increment this value by one.The API will return the value of all data points that the role(s) have access to, regardless of the visibility of the data points in the table CloudTables creates.
To understand the structure of the JSON representation for each row, please use the /api/1/dataset/:id/schema
endpoint.
{
"data": [
{
"id": number,
"dv": number,
// ... data values
}
]
}
The following shows the return from an example data set for flight information which 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.
{
"data": [{
"id": 13,
"dv": 1,
"dp-11": "AA123",
"l-5": [{
"id": 2,
"dp-8": "Edinburgh"
}],
"l-6": [{
"id": 3,
"dp-8": "Bristol"
}]
}, {
"id": 14,
"dv": 0,
"dp-11": "AA234",
"l-5": [{
"id": 5,
"dp-8": "Heathrow"
}],
"l-6": [{
"id": 4,
"dp-8": "San Francisco"
}]
}],
"success": true
}