Spaces method and path for this operation:
Refer to Spaces for more information.
Get a list of all conversations for the current user. This endpoint allows users to search, filter, sort, and paginate through their conversations.
Query parameters
-
A list of fields to include in the response. If omitted, all fields are returned.
-
A search query to filter the conversations. Can match against titles, messages, or other conversation attributes.
-
The field by which to sort the results. Valid fields are
created_at,title, andupdated_at.Values are
created_at,title, orupdated_at. -
The order in which to sort the results. Can be either
ascfor ascending ordescfor descending.Values are
ascordesc. -
The page number of the results to retrieve. Default is 1.
Minimum value is
1. Default value is1. -
The number of conversations to return per page. Default is 20.
Minimum value is
0. Default value is20. -
Whether to return conversations that the current user owns. If true, only conversations owned by the user are returned.
Default value is
false.
curl \
--request GET 'http://localhost:5601/api/security_ai_assistant/current_user/conversations/_find?page=1&per_page=20' \
--header "Authorization: $API_KEY"
{
"data": [
{
"category": "assistant",
"createdAt": "2023-10-31T12:00:00Z",
"createdBy": {
"id": "user1",
"name": "John Doe"
},
"excludeFromLastConversationStorage": false,
"id": "conv-abc123",
"messages": [],
"namespace": "default",
"replacements": {},
"title": "Security Discussion",
"updatedAt": "2023-10-31T12:05:00Z",
"users": [
{
"id": "user1",
"name": "John Doe"
}
]
}
],
"page": 1,
"perPage": 20,
"total": 5
}
{
"error": "Bad Request",
"message": "Invalid filter parameter.",
"statusCode": 400
}