Threads, REST: Thread.List
List threads in a specific folder.
HTTP request
GET https://rest-assistant.api.cloud.yandex.net/assistants/v1/threads
Query parameters
Request message for listing threads in a specific folder.
Field |
Description |
folderId |
string Required field. Folder ID from which to list threads. |
pageSize |
string (int64) Maximum number of threads to return per page. |
pageToken |
string Token to retrieve the next page of results. |
Response
HTTP Code: 200 - OK
{
"threads": [
{
"id": "string",
"folderId": "string",
"name": "string",
"description": "string",
"defaultMessageAuthorId": "string",
"createdBy": "string",
"createdAt": "string",
"updatedBy": "string",
"updatedAt": "string",
"expirationConfig": {
"expirationPolicy": "string",
"ttlDays": "string"
},
"expiresAt": "string",
"labels": "object",
"tools": [
{
// Includes only one of the fields `searchIndex`, `function`
"searchIndex": {
"searchIndexIds": [
"string"
],
"maxNumResults": "string"
},
"function": {
"name": "string",
"description": "string",
"parameters": "object"
}
// end of the list of possible fields
}
]
}
],
"nextPageToken": "string"
}
Response message for the list operation.
Field |
Description |
threads[] |
List of threads in the specified folder. |
nextPageToken |
string Token to retrieve the next page of results. |
Thread
Field |
Description |
id |
string Unique identifier of the thread. |
folderId |
string ID of the folder that the thread belongs to. |
name |
string Name of the thread. |
description |
string Description of the thread. |
defaultMessageAuthorId |
string Default user ID that will be used as the author for thread messages if no other author is specified. |
createdBy |
string Identifier of the subject who created this thread. |
createdAt |
string (date-time) Timestamp representing when the thread was created. String in RFC3339 To work with values in this field, use the APIs described in the |
updatedBy |
string Identifier of the subject who last updated this thread. |
updatedAt |
string (date-time) Timestamp representing the last time this thread was updated. String in RFC3339 To work with values in this field, use the APIs described in the |
expirationConfig |
Configuration for the expiration of the thread, defining when and how the thread will expire. |
expiresAt |
string (date-time) Timestamp representing when the thread will expire. String in RFC3339 To work with values in this field, use the APIs described in the |
labels |
object (map<string, string>) Set of key-value pairs that can be used to organize and categorize the thread. |
tools[] |
List of tools that are available for assistants to use in this thread. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum (ExpirationPolicy)
|
ttlDays |
string (int64) |
Tool
Represents a general tool that can be one of several types.
Field |
Description |
searchIndex |
SearchIndexTool tool that performs search across specified indexes. Includes only one of the fields |
function |
Function tool that can be invoked by the assistant. Includes only one of the fields |
SearchIndexTool
Configures a tool that enables Retrieval-Augmented Generation (RAG) by allowing the assistant to search across a specified search index.
Field |
Description |
searchIndexIds[] |
string A list of search index IDs that this tool will query. Currently, only a single index ID is supported. |
maxNumResults |
string (int64) The maximum number of results to return from the search. |
FunctionTool
Represents a function tool that can be invoked by the assistant.
Field |
Description |
name |
string The name of the function. |
description |
string A description of the function's purpose or behavior. |
parameters |
object A JSON Schema that defines the expected parameters for the function. |