---
title: "Update Logs"
method: PUT
path: "/v0/logs"
tags: ["Logs"]
---

# Update Logs

`PUT /v0/logs`

Updates multiple logs with the provided entries. Each entry will be either added
or overridden in the specified logs.

The `logs` parameter can be either:
- A list of log IDs to update
- A filter dictionary to select logs matching specific criteria (requires `project` or `context`)

A dictionary of "explicit_types" can be passed as part of the `entries`.
If present, it will override the inferred type of any matching key in all logs.

## Request body

- UpdateLogRequest
  - `logs` union, required — List of log IDs or a dict of filter arguments to select logs. Filter dicts are passed as key:value pairs (e.g. `{"status": "done", "user_id": 12}`).
    - integer[]
    - object
  - `project_name` string, nullable — Name of the project. Required when using filter dict in `logs`. Omit when passing a list of IDs.
  - `context` union — Optional context path to update for the logs. Can use '/' for nested contexts (e.g. 'training/batch1'). Can be a string (which will be interpreted with description=None and is_versioned=False) or a ContextCreateRequest object. Required when using filter dict in `logs` if project is not provided.
    - ContextCreateRequest — Request model for creating a new context within a project.
      - `name` string, required — Context name, can be nested using '/' (e.g., 'parent/child'). Must contain only alphanumeric characters, underscores, and hyphens.
      - `description` string, nullable — Optional description of the context
      - `is_versioned` boolean — Whether the context should be versioned. If True, the context will be versioned and mutable.
      - `allow_duplicates` boolean — Whether duplicate log entries are allowed in this context. If False, attempts to add duplicate logs will be ignored.
      - `unique_keys` object, nullable — Unique key definition. Keys are column names, values are types ('str', 'int', 'float', 'bool', 'datetime', 'time', 'date', 'timedelta', 'dict', 'list').
      - `auto_counting` object, nullable — Auto-counting configuration. Keys are column names to auto-increment, values are parent counter names (None for independent counters).
      - `foreign_keys` ForeignKeyConfig[], nullable — Foreign key definitions for referential integrity
        - `name` string, required — Column name or path to nested field that references another context. Supports: - Simple column: 'department_id' - Array elements: 'images[*].image_id' - Nested object: 'metadata.user.user_id' - Mixed nesting: 'teams[*].members[*].user_id'
        - `references` string, required — Referenced context and column in format 'ContextName.column_name'
        - `on_delete` 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION' — Action to perform when referenced row is deleted
        - `on_update` 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION' — Action to perform when referenced row is updated
        - `default` unknown
        - `is_nested` boolean, nullable — Auto-set: True if this FK uses a nested path (contains . or [])
        - `path_segments` object[], nullable — Auto-set: Parsed path structure for nested FKs
    - string
    - union[]
      - union
        - ContextCreateRequest — Request model for creating a new context within a project.
          - `name` string, required — Context name, can be nested using '/' (e.g., 'parent/child'). Must contain only alphanumeric characters, underscores, and hyphens.
          - `description` string, nullable — Optional description of the context
          - `is_versioned` boolean — Whether the context should be versioned. If True, the context will be versioned and mutable.
          - `allow_duplicates` boolean — Whether duplicate log entries are allowed in this context. If False, attempts to add duplicate logs will be ignored.
          - `unique_keys` object, nullable — Unique key definition. Keys are column names, values are types ('str', 'int', 'float', 'bool', 'datetime', 'time', 'date', 'timedelta', 'dict', 'list').
          - `auto_counting` object, nullable — Auto-counting configuration. Keys are column names to auto-increment, values are parent counter names (None for independent counters).
          - `foreign_keys` ForeignKeyConfig[], nullable — Foreign key definitions for referential integrity
            - `name` string, required — Column name or path to nested field that references another context. Supports: - Simple column: 'department_id' - Array elements: 'images[*].image_id' - Nested object: 'metadata.user.user_id' - Mixed nesting: 'teams[*].members[*].user_id'
            - `references` string, required — Referenced context and column in format 'ContextName.column_name'
            - `on_delete` 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION' — Action to perform when referenced row is deleted
            - `on_update` 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION' — Action to perform when referenced row is updated
            - `default` unknown
            - `is_nested` boolean, nullable — Auto-set: True if this FK uses a nested path (contains . or [])
            - `path_segments` object[], nullable — Auto-set: Parsed path structure for nested FKs
              - …
        - string
  - `entries` union — Dictionary or list of dictionaries of key-value entry pairs to add or update in the logs. Supports nested path syntax using dot notation for object properties (e.g., 'metadata.author') and bracket notation for array indices (e.g., 'results[0]'). Complex paths like 'results[0].scores.accuracy' are also supported for deep updates.
    - object
    - object[]
  - `overwrite` boolean — Whether to overwrite existing logs

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Bad Request
- `404` — Log Not Found
- `422` — Validation Error

---

[API](https://skmtc.net/unify/apis/unifyai-http-api-reference.md) · [All operations](https://skmtc.net/unify/apis/unifyai-http-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unify/unifyai-http-api-reference/revisions/900377f918b6/schema)
