Change what one app may do
const url = 'http://127.0.0.1:7700/api/permissions/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"deny":["host:example.com"],"perDayCents":500}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:7700/api/permissions/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "deny": [ "host:example.com" ], "perDayCents": 500 }'Owner only. Sends the owner’s answers for one app. Send only what changes. The app is marked
answered, and the change is a note event in the log.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The app’s id, its folder name.
Example
exampleRequest Bodyrequired
Section titled “Request Bodyrequired”object
The ids of the items to turn off, such as money or host:example.com. Replaces the list.
The most the app may spend in a day (UTC), in US cents. null for no daily limit.
The most disk its tasks may hold, at least 1 MB. null for the default, 5 GB.
Example
{ "deny": [ "host:example.com" ], "perDayCents": 500}Responses
Section titled “Responses”The app’s permissions after the change.
object
Whether the owner has answered the app’s first prompt.
The daily spending limit, or null for none.
The most disk its tasks may hold. Default 5 GB.
object
Such as key:NAME, money, strangers, shell, folders or host:example.com.
The box saw the app use it.
Example
{ "items": [ { "kind": "key" } ]}A bad value.
object
What went wrong
Example generated
{ "error": "example"}The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.
object
What went wrong
Example
{ "error": "only this computer's own screen or the owner's paired device can do this"}No app with this id.
object
What went wrong
Example generated
{ "error": "example"}