Overview
The Get Chat query allows users to retrieve chat messages for a specific chat session. This is useful for displaying the conversation history in the user interface or for processing chat data.
Architecture
Behavior
The Get Chat query follows these steps:
- Validates the provided chat ID format.
- Queries the chat repository to fetch the chat session and its messages.
- If the chat session is not found, returns a 404 Not Found response.
- Maps the chat session and messages to a DTO using the configured auto-mapper.
- Returns the chat data with a 200 OK status code.
GET /api/v1/chats/{id}
Parameters
- id (path) (required) - The unique identifier (GUID) of the chat session to retrieve.
Request Body
This query does not require a request body.
Response
200 OK
404 Not Found
id string <uuid>
The unique identifier for the chat
name string
The name of the chat
userId string <uuid>
The unique identifier for the user who sent the chat message
messages array [object]
type string
title string
status integer <int32>
detail string
instance string