Skip to main content

Restore profile from wastebasket

Description: This method returns a deleted browser profile from the wastebasket to the main screen in the specified folder, preserving all profile data.

Request parameters:​

ParameterTypeFormatDefaultDescription
profileIdstringuuid(required)Identifier of the profile to restore, passed in the request path.
folderIdstringuuid(required)Target folder: a local folder for a local profile or a cloud folder for a cloud profile.
workspaceIdintegerint64-1Workspace identifier. -1 means the default workspace.

Request example:​

POST
CURL:

curl 'http://localhost:8160/v1/profiles/123e4567-e89b-12d3-a456-426614174000/restore?folderId=223e4567-e89b-12d3-a456-426614174000&workspaceId=-1' \
--request POST \
--header 'Api-Token: YOUR_SECRET_TOKEN'

C#:

using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("http://localhost:8160/v1/profiles/123e4567-e89b-12d3-a456-426614174000/restore?folderId=223e4567-e89b-12d3-a456-426614174000&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/{profileId}/restore?folderId=FOLDER_ID&workspaceId=-1

API response:​

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

Error response (500):

{
"message": null
}