Skip to main content

Deleting Proxies (Bulk)

Description: This method sends a bulk delete request to the API to remove the specified proxies. Ensure that the provided proxy IDs are valid and exist in the specified workspace.

Request parameters:

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

Request body:

FieldTypeFormatRequiredDescription
bodyarray[string]uuid(optional)The array of UUIDs containing the proxies to be deleted. Must not be null or empty.
note

The list of proxies to delete should be specified as an array in the request body using the following format:

[
"884d8f8d-9a4e-4b1e-9dd3-a028d3ae419b",
"d24eba34-12d6-4412-ab20-80fae618c264"
]

Example request:

DELETE
CURL:

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

--header 'Content-Type: application/json' \
--data '[
"123e4567-e89b-12d3-a456-426614174000"
]'

C#:

using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("http://localhost:8160/v1/proxies/delete_bulk?workspaceId=-1"),
Headers =
{
{ "Api-Token", "YOUR_SECRET_TOKEN" },
},
};
request.Content = new StringContent("[\n \"123e4567-e89b-12d3-a456-426614174000\"\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/proxies/delete_bulk?workspaceId=

Body (JSON):

[
"123e4567-e89b-12d3-a456-426614174000"
]

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
}