.Dataset().Schema()
Task<TSchema> api
.Dataset(...)
.Schema()
Get information about the structure of a data set, its data points and any linked data sets.
This async method returns a Task
which resolves to a TSchema
object that describes the data points, computed values and links in the data set.
If the schema is requested for a data set which does not exist, the return error
property in the returned object will be set.
class TSchema {
public TComputed[] computed; // Array of computed values owned by this data set
public TDatapoints[] datapoints; // Array of data points owned by this data set
public string description; // Data set description
public string error; // If no error, then null
public TLinks[] links; // Array of links from this data set
public string name; // Data set name
public bool success;
public TApiColumn[] table; // Column information about the table to be displayed
}
class TApiColumn {
public string data; // Location of the data for the data to be displayed in dotted object notation
public string id; // Data point name to show in this column
public string link; // Link id if the data belongs to a linked data set. Comma delimited
public string name; // Name of the column
}
class TComputed {
public string id; // c-{number} - id of the computed value
public string name; // Name of the computed value
}
class TDatapoints {
public string id; // dp-{number} - id of the data point
public string name; // Data point name
}
class TLinkTarget {
public string id; // Linked data set's id (UUID)
}
class TLinks {
public TComputed[] computed; // Array of computed values owned by the linked data set
public TDatapoints[] datapoints; // Array of data points owned by the linked
public string id; // l-{number} - id of the link
public string name; // Link name
public TLinkTarget target;
public TLinks[] links; // Array of links from the linked
}
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:
var api = new CloudTables.Api("sub-domain", ":apiKey");
var result = await api.Dataset(":id").Schema();