Skip to main content

Deleting Multiple Threads

Description: This method stops multiple execution threads.

Request parameters:

ParameterTypeFormatDefaultDescription
workspaceIdintegerint64-1Workspace identifier. -1 means the default workspace.

Request body:

FieldTypeFormatRequiredDescription
bodyarray[string](optional)Target execution thread tokens Example: ["uuid1", "uuid2"].

Example request:

DELETE
CURL:

curl 'http://localhost:8160/v1/threads/delete_bulk?workspaceId=-1' \
--request DELETE \
--header 'Api-Token: YOUR_SECRET_TOKEN' \

--header 'Content-Type: application/json' \
--data '[
"string"
]'

C#:

using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("http://localhost:8160/v1/threads/delete_bulk?workspaceId=-1"),
Headers =
{
{ "Api-Token", "YOUR_SECRET_TOKEN" },
},
};
request.Content = new StringContent("[\n \"string\"\n]", Encoding.UTF8, "application/json");
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}

Cube:

http://localhost:8160/v1/threads/delete_bulk?workspaceId=-1

Body (JSON):

[
"threadToken1",
"threadToken2"
]

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

Response API:

Response codeResult
200 OKOK
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
500 Internal Server ErrorInternal Server Error

Success Response (200 OK):

No response body.

Error Response (500):

{
"message": null
}