Closed daften closed 8 years ago
In api/info you can pass a parameter "dataset" to retrieve all of its information, including the formats. They are formatted in the following way:
formats : {
"CSV" : "csv",
"JSON" : "json"
}
the key => value is meant to be a mapping of the display name (can be altered to anyone's choosing) to the actual format name that TDT will understand.
Woudn't it be nice to have this information also available in api/definitions?
Hi @Jeroen005 the api/definitions URI is meant to store/edit/delete definitions, meaning data points that a user can control. The available formats however are data points that are derived based on the configuration of a dataset, meaning they are beyond the control of a user. I'd therefore just leave it to the api/info endpoint instead of api/definitions. But I understand why you'd intuitively want it there.
E.g. {csv, json} So an external application can show direct links to the different data formats.