List Chats (v1.0.0)

Retrieve a list of chat sessions

Overview

The List Chats query allows users to retrieve a list of chat sessions. This is useful for displaying all active or historical chats in the user interface, enabling users to select a chat session to view its messages.

Architecture

Behavior

The List Chats query follows these steps:

  1. Validates the pagination parameters
  2. Queries the chat repository to fetch a paginated list of chat sessions.
  3. Maps the chat sessions to a DTO using the configured auto-mapper.
  4. Returns the list of chat sessions with a 200 OK status code.

GET /api/v1/chats

Parameters

  • Name (query) (optional) - The name of the chat session to filter by.
  • UserId (query) (optional) - The unique identifier (GUID) of the user to filter chats by.
  • IncludeMessages (query) (optional) - A boolean flag to include messages in the response. Defaults to false.

Request Body

This query does not require a request body.

Response

200 OK

400 Bad Request

Schema does not contain any properties.

type string
title string
status integer <int32>
detail string
instance string
errors object