list_ai_project_threads¶
- ArtificialIntelligenceApi.list_ai_project_threads(role_id, project_id, limit=None, offset=None, sortby=None, sortorder=None, filter_expression=None, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List threads in a project
Returns the conversation threads in a project that you are allowed to see: the threads you created, plus any thread another member has shared as public. You need at least read-only access to the project. Results are paged. Increase offset by limit while next_available is the string “yes” and stop when it is “no”.
- Parameters:
role_id (str) – Amorphic role used to authorize this request. (required)
project_id (str) – Identifier of the project whose threads you want. You must have at least read-only access to it. (required)
limit (int) – Maximum number of threads to return in one page. Defaults to 5000, which is also the highest value accepted.
offset (int) – 1-based index of the first thread to return. Defaults to 1.
sortby (str) – Thread field to sort on. Sorting is case-insensitive and treats every value as text, so timestamps sort chronologically only because they are stored in ISO order.
sortorder (str) – Direction to sort in. Defaults to newest first.
filter_expression (str) – Narrows the list, written as Field:Value pairs separated by commas, for example Title:Revenue*,Visibility:public. Repeating a field widens the match (OR); different fields must all match (AND). Values for Title may use * as a wildcard and ignore case; every other field must match exactly.
projection_expression (str) – Comma-separated list of thread fields to return, for example ChatId,Title,LastModifiedTime. Omit it to return every field. The thread identifier is stored as ChatId and returned as ThreadId, so ChatId must be in the list.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /ai/projects/{project_id}/threads
Success (HTTP 200)¶
The threads on this page, together with `count` (threads in this response), `total_count` (threads matching the request before paging) and `next_available`. Page through by increasing `offset` by `limit` while `next_available` is the string “yes”; stop when it is “no”. `next_available` is a string, not a boolean.
First page of threads
{
"threads": [
{
"ThreadId": "e2a91c5b-7d64-4f38-91ac-3b5e0d7f2c18",
"Title": "Q3 revenue analysis",
"CreationTime": "2026-07-14 09:12:44",
"LastModifiedTime": "2026-08-02 16:38:05",
"CreatedBy": "john.doe",
"Keywords": [
"revenue",
"forecast"
],
"Visibility": "private",
"AccessType": "owner"
},
{
"ThreadId": "4c8d1e07-2b93-4a15-8e6f-9d0c7a3b5e21",
"Title": "Supplier onboarding notes",
"CreationTime": "2026-06-30 11:02:19",
"LastModifiedTime": "2026-07-28 08:44:51",
"CreatedBy": "maria.lopez",
"Visibility": "public",
"AccessType": "read-only"
}
],
"count": 2,
"total_count": 2,
"next_available": "no"
}
Project has no threads you can see
{
"threads": [],
"count": 0,
"total_count": 0,
"next_available": "no"
}
Errors¶
Documented error codes: IPV-1002, AUTH-1012, AUTH-1001, AUTH-1030, IPV-1050, IPV-1004, GE-1008.
HTTP 400
The request was invalid or you do not have permission. The body is {“Message”: “<CODE> - <text>”}. Common cases include an unknown project (IPV-1002), no access to the project (AUTH-1012), a missing role_id header (AUTH-1001), the role lacking ai.view (AUTH-1030), a `limit` above 5000 (IPV-1050), or a malformed `filterExpression` (IPV-1004). Permission failures return 400, not 403.
Project does not exist
{
"Message": "IPV-1002 - Invalid ProjectId - 7b3f2c18-4a5d-4e91-9c0a-2d6e8f1b3a44, resource not found."
}
You have no access to the project
{
"Message": "AUTH-1012 - User: john.doe requires at least read-only access on the resource to perform this action."
}
Limit above the maximum
{
"Message": "IPV-1050 - Out of range for items per page, Limit is 5000"
}
HTTP 500
An unexpected server error. The body is {“Message”: “GE-1008 - Could not complete the request. Please try again.”}. A `sortby` or `projectionExpression` naming a field that some threads do not carry also surfaces here.
Request could not be completed
{
"Message": "GE-1008 - Could not complete the request. Please try again."
}