Skip to content

Get Dataset Logs for a Time Period

Retrieve dataset logs for a specified time period. Requires a dataset ID.


GET datasets/<dataset_id>/logs?from=timestamp&to=timestamp

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).logs(from_time=1719456778, to_time=1719456800)
cURL --location 'https://marqtune.marqo.ai/datasets/{dataset_id}/logs?from=timestamp&to=timestamp' \
     --header 'x-api-key: {api_key}'

Response: 200 (OK)

Logs for the specified time period returned.

{
    "statusCode": 200,
    "body": {
        "logs": [
            {
                "timestamp": "timestamp",
                "message": "message"
            }
        ]
    }
}

Response: 400 (Invalid Request)

Request path or method is invalid.

{
    "statusCode": 400,
    "body": {
      "message": "Invalid request method"
    }
}

Response: 400 (Invalid timestamp)

Dataset id format is not UUID

{
  "statusCode": 400,
    "body": {
      "message": "Timestamp 'from' must be less than timestamp 'to'"
    }
}

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."
}