Browsers API
The browsers API operates on web browsers on a canvas.
List Browsers
Gets all web browsers of the specified canvas.
GET /canvases/:id/browsers
Attribute Type Required Description
id (path) uuid yes ID of the canvas
subscribe (query) boolean no See api_streaming
curl -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/d098152c-8abf-4ebd-8a33-2fdf3ffe0214/browsers
Example response:
[
{
"depth": 0,
"id": "82796808-84e4-4309-8d76-bd0cee281a22",
"location": {
"x": 4932.95068359375,
"y": 2223.86572265625
},
"main_frame_scroll_offset": {
"x": 0,
"y": 0
},
"parent_id": "51e47ebf-bab1-4412-a48a-5f635ed22f33",
"pinned": false,
"scale": 1,
"size": {
"height": 800,
"width": 1200
},
"state": "normal",
"title": "",
"transparent_mode": false,
"url": "https://www.google.com/",
"widget_type": "Browser"
}
]
Single Browser
Gets a single browser.
GET /canvases/:id/browsers/:browser_id
Attribute Type Required Description
id (path) uuid yes ID of the canvas
browser_id (path) uuid yes ID of the browser to get
subscribe (query) boolean no See api_streaming
curl -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/d098152c-8abf-4ebd-8a33-2fdf3ffe0214/browsers/82796808-84e4-4309-8d76-bd0cee281a22
Example response:
{
"depth": 0,
"id": "82796808-84e4-4309-8d76-bd0cee281a22",
"location": {
"x": 4932.95068359375,
"y": 2223.86572265625
},
"main_frame_scroll_offset": {
"x": 0,
"y": 0
},
"parent_id": "51e47ebf-bab1-4412-a48a-5f635ed22f33",
"pinned": false,
"scale": 1,
"size": {
"height": 800,
"width": 1200
},
"state": "normal",
"title": "",
"transparent_mode": false,
"url": "https://www.google.com/",
"widget_type": "Browser"
}
Create Browser
Creates a browser.
POST /canvases/:id/browsers
Attribute Type Required Description
id (path) uuid yes ID of the canvas
depth number no Depth of the browser compared to its siblings
location object no Location of the browser relative to its parent
parent_id uuid no ID of the browser\'s parent
pinned boolean no Is the browser pinned or not
scale number no Scale of the browser
size object no Size of the browser
title string no Title of the browser
transparent_mode boolean no Is the browser in transparent mode
main_frame_scroll_offset object no Scroll offset for the main frame in the browser
url string no URL of the web browser
curl -X POST -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/d098152c-8abf-4ebd-8a33-2fdf3ffe0214/browsers
Example response:
{
"depth": 0,
"id": "cb1f6489-13c0-4f8a-b94e-3b56ddbd2aba",
"location": {
"x": 5010.69287109375,
"y": 2646.39794921875
},
"main_frame_scroll_offset": {
"x": 0,
"y": 0
},
"parent_id": "51e47ebf-bab1-4412-a48a-5f635ed22f33",
"pinned": false,
"scale": 1,
"size": {
"height": 800,
"width": 1200
},
"state": "normal",
"title": "",
"transparent_mode": false,
"url": "https://www.google.com/",
"widget_type": "Browser"
}
Update Browser
Updates a browser.
PATCH /canvases/:id/browsers/:browser_id
Attribute Type Required Description
id (path) uuid yes ID of the canvas
browser_id (path) uuid yes ID of the browser to update
depth number no Depth of the browser compared to its siblings
location object no Location of the browser relative to its parent
parent_id uuid no ID of the browser\'s parent
pinned boolean no Is the browser pinned or not
scale number no Scale of the browser
size object no Size of the browser
title string no Title of the browser
transparent_mode boolean no Is the browser in transparent mode
main_frame_scroll_offset object no Scroll offset for the main frame in the browser
url string no URL of the web browser
curl -X PATCH -H "Private-Token: <access token>" -d '{"url":"www.multitaction.com"}' https://canvus.example.com/api/v1/canvases/d098152c-8abf-4ebd-8a33-2fdf3ffe0214/browsers/82796808-84e4-4309-8d76-bd0cee281a22
Example response:
{
"depth": 0,
"id": "82796808-84e4-4309-8d76-bd0cee281a22",
"location": {
"x": 4932.95068359375,
"y": 2223.86572265625
},
"main_frame_scroll_offset": {
"x": 0,
"y": 0
},
"parent_id": "51e47ebf-bab1-4412-a48a-5f635ed22f33",
"pinned": false,
"scale": 1,
"size": {
"height": 800,
"width": 1200
},
"state": "normal",
"title": "",
"transparent_mode": false,
"url": "www.multitaction.com",
"widget_type": "Browser"
}
Delete Browser
Deletes a browser.
DELETE /canvases/:id/browsers/:browser_id
Attribute Type Required Description
id (path) uuid yes ID of the canvas
browser_id (path) uuid yes ID of the browser to delete
curl -X DELETE -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/d098152c-8abf-4ebd-8a33-2fdf3ffe0214/browsers/82796808-84e4-4309-8d76-bd0cee281a22