---
title: "Deprecated queries"
description: "Find the Analytics GraphQL queries that Moveo removed or deprecated, and the replacement query to use for each one."
---

# Deprecated queries

> Find the Analytics GraphQL queries that Moveo removed or deprecated, and the replacement query to use for each one.

## Overview

This page lists GraphQL queries that have been removed, and queries that are deprecated and will be removed in a future release. Both sections name the replacement to use.

:::warning Migration required
Removed queries now return an error. Update your integrations to use the replacements below.
:::

## Removed queries

These queries backed the retired analytics pages and no longer exist.

| Removed query                           | Replacement                                                                        |
| --------------------------------------- | ---------------------------------------------------------------------------------- |
| `get_agents_performance`                | [`agents_performance`](https://docs.moveo.ai/api/analytics/agent-performance.md)                                          |
| `counts_per_brain`                      | [`counts_per_brain_fast`](https://docs.moveo.ai/api/analytics/counts-per-ai-agent-fast.md)                                |
| `get_meaningful_sessions_count_by_hour` | [`get_meaningful_sessions_count_by_hour_range`](https://docs.moveo.ai/api/analytics/meaningful-sessions-by-hour-range.md) |
| `counts_per_desk_fast`                  | None. Use [`list_sessions`](https://docs.moveo.ai/api/analytics/list-sessions.md) with `deskIds`.                         |

What changes when you switch:

- `agents_performance` returns every field `get_agents_performance` returned, except the account field is named `account_id` rather than `_account_id`. It also adds reply counts, first-response times, and close times.
- `counts_per_brain_fast` returns the same fields but accepts fewer filters: `deskIds`, `brainIds`, and `isTest` only. `integrationIds`, `brainVersions`, `channels`, `minNumUserMessages`, and `tags` are not available.
- `get_meaningful_sessions_count_by_hour_range` takes `startDate` and `endDate` instead of a single `hour`.

## Deprecated queries and replacements

| Deprecated Query           | Replacement Query     | Documentation                                   |
| -------------------------- | --------------------- | ----------------------------------------------- |
| `logs_sessions_preview_v2` | `list_sessions`       | [Check the new query](https://docs.moveo.ai/api/analytics/list-sessions.md)            |
| `log_session_content_v2`   | `get_session`         | [Check the new query](https://docs.moveo.ai/api/analytics/get-session.md)              |
| `get_sessions`             | `list_sessions`       | [Check the new query](https://docs.moveo.ai/api/analytics/list-sessions.md)            |
| `get_session_content`      | `get_session`         | [Check the new query](https://docs.moveo.ai/api/analytics/get-session.md)              |
| `get_sessions_count`       | `list_sessions_count` | [Check the new query](https://docs.moveo.ai/api/analytics/list-sessions.md#pagination) |

## Key improvements

The new queries include several improvements:

1. **Simplified naming**: More intuitive function names
2. **Better performance**: Optimized database queries for faster response times
3. **Enhanced filtering**: More filtering options for precise data retrieval
4. **Built-in pagination**: `list_sessions` supports `row_limit` / `row_offset` and pairs with `list_sessions_count` for total row counts

## Troubleshooting

If you need assistance to migrate from deprecated queries:

1. Check the linked documentation for each replacement query
2. Review the migration examples on this page
3. Contact support if you have questions or need custom migration guidance
