Skip to content

Get Dataset

Get dataset details by ID. Requires a dataset ID.


GET /datasets/<dataset_id>

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.dataset("dataset_id").describe()
curl --location 'https://marqtune.marqo.ai/datasets/{dataset_id}' \
     --header 'x-api-key: {api_key}'

Response: 200 (OK)

Dataset details returned.

{
    "statusCode": 200,
    "body": {
        "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: 400 (Invalid format)

Dataset id format is not UUID

{
  "statusCode": 400,
    "body": {
      "message": "Invalid dataset id"
    }
}

Response: 401 (Unauthorised)

Unauthorised. Check your API key and try again.

{
  "message": "Unauthorized."
}

Response: 404 (Not found)

Dataset not found

{
  "statusCode": 404,
    "body": {
      "message": "dataset not found"
    }
}

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.