Focusing Browser Instance
Please read the Material Usage Rules on this site.
Description: This method brings the browser window of the specified profile to the foreground.
Request parameters:
| Parameter | Type | Format | Default | Description |
|---|---|---|---|---|
| profileId | string | uuid | (required) | The unique identifier of the profile whose browser window should be focused. |
| workspaceId | integer | int64 | -1 | Workspace ID. Use -1 for the default workspace. |
Example request:
POST
CURL:
curl 'http://localhost:8160/v1/browser_instances/123e4567-e89b-12d3-a456-426614174000/focus?workspaceId=-1' \
--request POST \
--header 'Api-Token: YOUR_SECRET_TOKEN'
C#:
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("http://localhost:8160/v1/browser_instances/123e4567-e89b-12d3-a456-426614174000/focus?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/browser_instances/123e4567-e89b-12d3-a456-426614174000/focus?workspaceId=-1
Additionally:
User-Agent: {-Profile.UserAgent-}
Api-Token: Token from UserArea2.
Response API:
| Response code | Result |
|---|---|
200 OK | OK |
401 Unauthorized | Unauthorized |
403 Forbidden | Forbidden |
500 Internal Server Error | Internal Server Error |
Success Response (200 OK):
No response body.
Error Response (500):
{
"message": null
}