-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added commands to enable/disable via management API
- Loading branch information
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"humao.rest-client" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# This file can be used with the VSCode Rest Client extension (https://marketplace.visualstudio.com/items?itemName=humao.rest-client) to play with the browser block API. | ||
@baseUrl=http://your-device-hostname:5011 | ||
|
||
### Ping the browser block | ||
GET {{baseUrl}}/ping | ||
|
||
### Refresh the currently displayed page | ||
POST {{baseUrl}}/refresh | ||
|
||
### Automatically refresh the browser window every 30 seconds | ||
POST {{baseUrl}}/autorefresh/30 | ||
|
||
### Disable automatic refresh | ||
POST {{baseUrl}}/autorefresh/0 | ||
|
||
### Re-scan for local HTTP or HTTPS services | ||
POST {{baseUrl}}/scan | ||
|
||
### Get the URL currently being displayed | ||
GET {{baseUrl}}/url | ||
|
||
### Set the URL to be displayed | ||
PUT {{baseUrl}}/url | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
url=http://www.balena.io | ||
|
||
### Set the URL with GPU and Kiosk settings | ||
PUT {{baseUrl}}/url | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
url=http://www.balena.io&gpu=1&kiosk=1 | ||
|
||
### Get the status of the GPU | ||
GET {{baseUrl}}/gpu | ||
|
||
### Enable the GPU | ||
PUT {{baseUrl}}/gpu/1 | ||
|
||
### Disable the GPU | ||
PUT {{baseUrl}}/gpu/0 | ||
|
||
### Get the status of Kiosk mode | ||
GET {{baseUrl}}/kiosk | ||
|
||
### Enable Kiosk mode | ||
POST {{baseUrl}}/kiosk/1 | ||
|
||
### Disable Kiosk mode | ||
POST {{baseUrl}}/kiosk/0 | ||
|
||
### Get the flags Chromium was started with | ||
GET {{baseUrl}}/flags | ||
|
||
### Get the version of Chromium | ||
GET {{baseUrl}}/version | ||
|
||
### Take a screenshot of the Chromium window | ||
GET {{baseUrl}}/screenshot | ||
|
||
### Get the display state | ||
GET {{baseUrl}}/display | ||
|
||
### Set the display state to on | ||
POST {{baseUrl}}/display | ||
Content-Type: application/json | ||
|
||
{ | ||
"state": "on" | ||
} | ||
|
||
### Set the display state to off | ||
POST {{baseUrl}}/display | ||
Content-Type: application/json | ||
|
||
{ | ||
"state": "off" | ||
} | ||
|
||
### Set the display state to on using PUT | ||
PUT {{baseUrl}}/display | ||
Content-Type: application/json | ||
|
||
{ | ||
"state": "on" | ||
} | ||
|
||
### Set the display state to off using PUT | ||
PUT {{baseUrl}}/display | ||
Content-Type: application/json | ||
|
||
{ | ||
"state": "off" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters