Skip to main content

List Formats

Retrieve supported dataset file formats using the Knowledgator TypeScript SDK.


Example Usage​

import { createClient } from '@knowledgator/typescript-sdk';

const kg = createClient();

const formats = await kg.datasets.listFormats();
console.log(formats.data);

Expected Output​

The API returns a response object containing an array of supported format strings in its data property:

{
"data": [
"json",
"jsonl"
]
}
// Iterating through supported formats
for (const format of formats.data) {
console.log('Supported format:', format);
}