Get information about the structure of a data set, its data points and any linked data sets.
GET https://sub-domain.cloudtables.io/api/1/dataset/:id/schema
curl \
-G \
-d 'key=:apiKey' \
https://sub-domain.cloudtables.io/api/1/dataset/:id/schema
Get the structure of a given 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.key
).role
but allows multiple roles to be specified.N/A
The JSON result from the server will contain the following information about a data set:
{
"computed": [ // Array of computed values owned by this data set
{
"description": string, // Description
"id": string, // c-{number} - id of the computed value
"name": string // Name of the computed value
}
],
"datapoints": [ // Array of data points owned by this data set
{
"description": string, // Description
"id": string, // dp-{number} - id of the data point
"name": string, // Data point name
"type": string // Data point type (number, sequence, etc)
}
],
"description": string, // Data set description
"links": [{ // Array of links from this data set
"description": string, // Description
"id": string, // l-{number} - id of the link
"name": string, // Link name
"target": {
"id": string // Linked data set's id (UUID)
},
"computed": [], // Array of computed values - as above
"datapoints": [], // Array of data points - as above
"links": [] // Array of linked values - as above
}],
"name": string, // Data set name
"table": [ // Column information about the table to be displayed
{
"data": string, // Location of the data for the data to be displayed in dotted object notation
"id": string, // Data point name to show in this column
"link": null | string, // Link id if the data belongs to a linked data set. Comma delimited
"name": string // Name of the column
}
]
}
The following example shows an API return for a CloudTables application that has two data sets available, one which contains information about Airports and another about Flights:
{
"computed": [],
"datapoints": [{
"id": "dp-11",
"name": "Flight number"
}],
"description": "",
"links": [{
"id": "l-5",
"name": "From",
"target": {
"id": "f8b948bc-d409-11eb-b875-1b15216b0d99"
},
"computed": [],
"datapoints": [{
"id": "dp-8",
"name": "Name"
}],
"links": []
}, {
"id": "l-6",
"name": "Destination",
"target": {
"id": "f8b948bc-d409-11eb-b875-1b15216b0d99"
},
"computed": [],
"datapoints": [{
"id": "dp-8",
"name": "Name"
}],
"links": []
}],
"name": "Flights",
"table": [{
"data": "dp-11",
"id": "dp-11",
"link": null,
"name": "Flight number"
}, {
"data": "l-5[].dp-8",
"id": "dp-8",
"link": "l-5",
"name": "Departure Airport"
}, {
"data": "l-6[].dp-8",
"id": "dp-8",
"link": "l-6",
"name": "Arrival Airport"
}],
"success": true
}