Skip to main content

Getting Execution Threads

Description: This method retrieves the list of execution threads for the specified workspace.
Threads can be filtered by token or type, limited by number of results, and sorted optionally.

Request parameters:

ParameterTypeFormatDefaultDescription
workspaceIdintegerint64-1Workspace identifier. -1 means the default workspace.
startintegerint320Starting index for pagination.
totalintegerint321000Maximum number of threads to return.
thread_tokenstring(empty)Filter by certain thread token (optional).
typestring enum(empty)Filter by token type (Manual, BrowserInstance) (optional).
sortingstring(empty)Sorting parameters: CreatedAt, ThreadToken, Type, WorkspaceId (optional).

Example request:

GET
CURL:

curl 'http://localhost:8160/v1/threads?workspaceId=&start=0&total=1000&thread_token=&type=&sorting=' \
--header 'Api-Token: YOUR_SECRET_TOKEN'

C#:

using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("http://localhost:8160/v1/threads?workspaceId=&start=0&total=1000&thread_token=&type=&sorting="),
Headers =
{
{ "Api-Token", "YOUR_SECRET_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}

Cube:

http://localhost:8160/v1/threads?workspaceId=&start=&total=&thread_token=&=&sorting=

Additionally:
User-Agent: {-Profile.UserAgent-}
Api-Token: Token from UserArea2.

Response API:

Response codeResult
200 OKSuccess
500 ErrorInternal Server Error

Success Response (200 OK):

{
"totalCount": 1,
"items": [
{
"workspaceId": 1,
"threadToken": null,
"type": "Manual",
"createdAt": "2025-07-25T09:34:29.768Z"
}
]
}

Error Response (500):

{
"message": null
}