> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataturner.io/llms.txt
> Use this file to discover all available pages before exploring further.

# query_objects

> Read or aggregate records from one Model Atlas object.

| Scope | Access | Description |
| - | - | - |
| `atlas:read` | Read-only | Read or aggregate records from one Model Atlas object. |

## Parameters

| Name | Required | Description |
| - | - | - |
| fields | No | Fields |
| filters | No | Filters |
| group\_by | No | Group By |
| identity\_ref | No | Identity Ref |
| limit | No | Limit |
| measures | No | Measures |
| model\_checksum | No | Model Checksum |
| object | Yes | Object |
| operation | Yes | Operation |
| order | No | Order |
| search | No | Search |
| time\_field | No | Time Field |
| time\_grain | No | Time Grain |

## Input schema

```json theme={null}
{
  "$defs": {
    "ConditionFilter": {
      "additionalProperties": false,
      "properties": {
        "condition": {
          "pattern": "^[a-z][a-z0-9_]{0,79}$",
          "title": "Condition",
          "type": "string"
        },
        "negate": {
          "default": false,
          "title": "Negate",
          "type": "boolean"
        }
      },
      "required": [
        "condition"
      ],
      "title": "ConditionFilter",
      "type": "object"
    },
    "FieldFilter": {
      "additionalProperties": false,
      "properties": {
        "field": {
          "pattern": "^[a-z][a-z0-9_]{0,79}$",
          "title": "Field",
          "type": "string"
        },
        "op": {
          "enum": [
            "eq",
            "ne",
            "in",
            "gt",
            "gte",
            "lt",
            "lte",
            "between",
            "is_null",
            "not_null"
          ],
          "title": "Op",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "values": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "maxItems": 50,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Values"
        }
      },
      "required": [
        "field",
        "op"
      ],
      "title": "FieldFilter",
      "type": "object"
    },
    "MeasureSpec": {
      "additionalProperties": false,
      "properties": {
        "alias": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_]{0,79}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Alias"
        },
        "field": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_]{0,79}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Field"
        },
        "op": {
          "enum": [
            "count",
            "sum",
            "min",
            "max",
            "avg"
          ],
          "title": "Op",
          "type": "string"
        }
      },
      "required": [
        "op"
      ],
      "title": "MeasureSpec",
      "type": "object"
    },
    "OrderKey": {
      "additionalProperties": false,
      "properties": {
        "direction": {
          "enum": [
            "asc",
            "desc"
          ],
          "title": "Direction",
          "type": "string"
        },
        "field": {
          "pattern": "^[a-z][a-z0-9_]{0,79}$",
          "title": "Field",
          "type": "string"
        }
      },
      "required": [
        "field",
        "direction"
      ],
      "title": "OrderKey",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "fields": {
      "default": [],
      "items": {
        "maxLength": 120,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 40,
      "title": "Fields",
      "type": "array"
    },
    "filters": {
      "default": [],
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/FieldFilter"
          },
          {
            "$ref": "#/$defs/ConditionFilter"
          }
        ]
      },
      "maxItems": 16,
      "title": "Filters",
      "type": "array"
    },
    "group_by": {
      "default": [],
      "items": {
        "maxLength": 120,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 2,
      "title": "Group By",
      "type": "array"
    },
    "identity_ref": {
      "anyOf": [
        {
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Identity Ref"
    },
    "limit": {
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    },
    "measures": {
      "default": [],
      "items": {
        "$ref": "#/$defs/MeasureSpec"
      },
      "maxItems": 4,
      "title": "Measures",
      "type": "array"
    },
    "model_checksum": {
      "anyOf": [
        {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Model Checksum"
    },
    "object": {
      "maxLength": 120,
      "minLength": 1,
      "title": "Object",
      "type": "string"
    },
    "operation": {
      "enum": [
        "lookup",
        "list",
        "count",
        "measure",
        "group",
        "time_series"
      ],
      "title": "Operation",
      "type": "string"
    },
    "order": {
      "default": [],
      "items": {
        "$ref": "#/$defs/OrderKey"
      },
      "maxItems": 2,
      "title": "Order",
      "type": "array"
    },
    "search": {
      "anyOf": [
        {
          "maxLength": 120,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Search"
    },
    "time_field": {
      "anyOf": [
        {
          "pattern": "^[a-z][a-z0-9_]{0,79}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Time Field"
    },
    "time_grain": {
      "anyOf": [
        {
          "enum": [
            "day",
            "week",
            "month"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Time Grain"
    }
  },
  "required": [
    "object",
    "operation"
  ],
  "title": "QueryIn",
  "type": "object"
}
```

## Example request

Replace the example identifier with one you can read.

```json theme={null}
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "object": "example_object",
      "operation": "list"
    },
    "name": "query_objects"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.