List all datasets
Retrieves all datasets.
GET /datasets
Example
from marqtune.client import Client
url = "https://marqtune.marqo.ai"
api_key = "{api_key}"
marqtune_client = Client(url=url, api_key=api_key)
marqtune_client.list_datasets()
curl --location 'https://marqtune.marqo.ai/datasets' \
--header 'x-api-key: {api_key}'
Response: 200 (OK)
Dataset details returned.
{
"statusCode": 200,
"body": {
"datasets": [
{
"datasetId": "idInSystem",
"datasetName": "nameInSystem",
"status": "currentStatus",
"secondaryStatus": "currentStatus",
"failureReason": "reasonForFailure", // Optional, present if status is failed
"datasetType": "datasetType",
"dataSchema": {
"my_image": "image_pointer",
"my_text": "text",
"my_query": "text",
"my_scores": "score" // Optional, present if datasetType is evaluation
},
"queryColumn": "query", // Optional, present if supplied
"resultColumns": ["my_image", "my_text"], // Optional, present if supplied
"imageDownloadHeaders": {"header": "value"} // Optional, present if supplied
}
]
}
}
Response: 400 (Invalid Request)
Request path or method is invalid.
{
"statusCode": 400,
"body": {
"message": "Invalid request method"
}
}
Response: 401 (Unauthorised)
Unauthorised. Check your API key and try again.
{
"message": "Unauthorized."
}
Response: 500 (Internal server error)
Internal server error. Check your API key and try again.
{
"message": "Internal server error."
}
Notes on Optional Fields
- failureReason: This field is included if the dataset's status is failed. It provides the reason for the failure.
- dataSchema.my_scores: This field is included if the datasetType is evaluation.
- queryColumn: This field is included if it was supplied during dataset creation.
- resultColumns: This field is included if it was supplied during dataset creation.
- imageDownloadHeaders: This field is included if specific headers for image download were supplied.