List Formats
Retrieve a list of available dataset formats.
Endpoint
GET https://api.platform.knowledgator.com/files/formats/datasets/
Headers
| Name | Type | Description |
|---|---|---|
Content-Type | String | application/json |
Note: This endpoint does not require authentication.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
offset | Integer | No | Pagination offset (default: 0, min: 0) |
limit | Integer | No | Maximum results per page (default: 100, max: 10000) |
Response
{
"formats": [
{
"name": "jsonl",
"description": "JSON Lines format"
},
{
"name": "csv",
"description": "Comma-Separated Values"
},
{
"name": "parquet",
"description": "Apache Parquet format"
},
{
"name": "json",
"description": "JSON format"
}
],
"total": 4,
"offset": 0,
"limit": 100
}
Response Fields
formats: Array of format objectsname: Format identifier (jsonl, csv, parquet, json)description: Human-readable format description
total: Total number of available formatsoffset: Current pagination offsetlimit: Current pagination limit
Error Codes
| Status Code | Description |
|---|---|
| 200 | OK – Request successful. |
| 400 | Bad Request – Invalid input or validation failed. |
| 500 | Internal Server Error – Server-side issue. |
Example Usage
SDK Usage
💡 Dedicated SDK Guides: See Python SDK | TypeScript SDK
TypeScript/JavaScript
import { createClient } from '@knowledgator/typescript-sdk';
const kg = createClient('YOUR_API_KEY');
const formats = await kg.datasets.listFormats();
console.log('Available formats:');
formats.formats.forEach(format => {
console.log(`- ${format.name}: ${format.description}`);
});
Python
from knowledgator import Knowledgator
kg = Knowledgator(api_key="YOUR_API_KEY")
formats = kg.datasets.list_formats()
print("Available formats:")
for format in formats.formats:
print(f"- {format.name}: {format.description}")
Python
import requests
url = "https://api.platform.knowledgator.com/files/formats/datasets/"
response = requests.get(url)
formats = response.json()
print(formats)
cURL
curl -X GET "https://api.platform.knowledgator.com/files/formats/datasets/"
Additional Information
- No Authentication Required: This is a public endpoint that doesn't require an API key
- Format Details:
- JSONL (JSON Lines): One JSON object per line, ideal for streaming and large datasets
- CSV: Comma-separated values, widely compatible with spreadsheet applications
- Parquet: Columnar storage format, efficient for analytics and large-scale data processing
- JSON: Standard JSON format, suitable for nested structures
- Use Cases:
- Discover supported dataset formats before creating a dataset
- Display format options in user interfaces
- Validate format compatibility