v1

latestOpenAPI 3.1.02026-07-13154170539.0 KB
Logs

Delete Logs

Deletes log entries based on specified criteria. Can delete both base logs and derived logs.

If a context is provided, logs will be removed from that context instead of being entirely deleted, unless it is the last context associated with the log. This allows logs to be shared across multiple contexts and only removed from specific contexts when needed.

Args: source_type: Controls which type of logs to delete: - 'all': Delete both base and derived logs (default) - 'base': Only delete base logs - 'derived': Only delete derived logs

delete/v0/logs

Request body

project_namestring required

Name of the project the logs belong to.

contextstring nullable

Optional context path to update for the logs. Can use '/' for nested contexts (e.g. 'training/batch1').

source_type'base' | 'derived' | 'all'

Specifies which type of logs to delete. Can be 'base' for base logs only, 'derived' for derived logs only, or 'all' to delete from both types.

delete_empty_logsboolean

Whether to delete logs which end up being empty as a result of the field deletion.

delete_empty_fieldsboolean

Whether to delete fields that have no data after log deletion.

Example request

{
  "project_name": "eval-project",
  "context": "experiment1/trial1",
  "ids_and_fields": [
    [
      123,
      "score"
    ],
    [
      [
        456,
        457
      ],
      [
        "score",
        "response"
      ]
    ],
    [
      [
        458,
        459,
        460
      ],
      "response"
    ],
    [
      {
        "score": "100"
      },
      null
    ],
    [
      null,
      "score"
    ]
  ],
  "source_type": "all",
  "delete_empty_logs": true,
  "delete_empty_fields": true
}

Response

Successful Response

{"stackTrail":"paths:/v0/logs:delete:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}