Skip to main content

Empty profile wastebasket

Description: This method permanently deletes all profiles from the local and cloud wastebaskets in the specified workspace.

warning

The profiles and their data cannot be recovered after this operation.

Request parameters:​

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

Request example:​

DELETE
CURL:

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

C#:

using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("http://localhost:8160/v1/profiles/wastebasket?workspaceId=-1"),
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/profiles/wastebasket?workspaceId=-1

API response:​

Response codeResult
200 OKWastebasket emptied; response body is empty
401 UnauthorizedUnauthorized
403 ForbiddenAccess forbidden
500 Internal Server ErrorInternal server error

Error response (500):

{
"message": null
}