---
title: "Objs Query"
method: POST
path: "/objs/query"
tags: ["Objects"]
---

# Objs Query

`POST /objs/query`

## Request body

- ObjQueryReq
  - `project_id` string, required — The ID of the project to query
  - `filter` ObjectVersionFilter
    - `base_object_classes` string[], nullable — Filter objects by their base classes
    - `exclude_base_object_classes` string[], nullable — Exclude objects by their base classes
    - `leaf_object_classes` string[], nullable — Filter objects by their leaf classes
    - `object_ids` string[], nullable — Filter objects by their IDs
    - `is_op` boolean, nullable — Filter objects based on whether they are weave.ops or not. `True` will only return ops, `False` will return non-ops, and `None` will return all objects
    - `latest_only` boolean, nullable — If True, return only the latest version of each object. `False` and `None` will return all versions
  - `limit` integer, nullable — Maximum number of results to return
  - `offset` integer, nullable — Number of results to skip before returning
  - `sort_by` SortBy[], nullable — Sorting criteria for the query results. Currently only supports 'object_id' and 'created_at'.
    - `field` string, required
    - `direction` 'asc' | 'desc', required
  - `metadata_only` boolean, nullable — If true, the `val` column is not read from the database and is empty.All other fields are returned.
  - `include_storage_size` boolean, nullable — If true, the `size_bytes` column is returned.

## Response `200`

Successful Response

- ObjQueryRes
  - `objs` ObjSchema[], required
    - `project_id` string, required
    - `object_id` string, required
    - `created_at` string, date-time, required
    - `deleted_at` string, date-time, nullable
    - `digest` string, required
    - `version_index` integer, required
    - `is_latest` integer, required
    - `kind` string, required
    - `base_object_class` string, nullable, required
    - `leaf_object_class` string, nullable
    - `val` unknown, required
    - `wb_user_id` string, nullable — Do not set directly. Server will automatically populate this field.
    - `size_bytes` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/wandb/apis/fastapi.md) · [All operations](https://skmtc.net/wandb/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wandb/fastapi/revisions/56745769989b/schema)
