Skip to content
GurtOS

Change what one app may do

PUT
/permissions/{id}
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.

id
required
string

The app’s id, its folder name.

Example

example
Media typeapplication/json
object
deny

The ids of the items to turn off, such as money or host:example.com. Replaces the list.

Array<string>
perDayCents

The most the app may spend in a day (UTC), in US cents. null for no daily limit.

integer | null
diskBytes

The most disk its tasks may hold, at least 1 MB. null for the default, 5 GB.

integer | null
>= 1048576

Example

{
"deny": [
"host:example.com"
],
"perDayCents": 500
}

The app’s permissions after the change.

Media typeapplication/json
object
app
required
string
title
required
string
answered
required

Whether the owner has answered the app’s first prompt.

boolean
perDayCents
required

The daily spending limit, or null for none.

integer | null
diskBytes
required

The most disk its tasks may hold. Default 5 GB.

integer
items
required
Array<object>
object
id
required

Such as key:NAME, money, strangers, shell, folders or host:example.com.

string
kind
required
string
Allowed values: key money strangers shell host folders
text
required
string
seen

The box saw the app use it.

boolean
allowed
required
boolean

Example

{
"items": [
{
"kind": "key"
}
]
}

A bad value.

Media typeapplication/json
object
error
required

What went wrong

string

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.

Media typeapplication/json
object
error
required

What went wrong

string

Example

{
"error": "only this computer's own screen or the owner's paired device can do this"
}

No app with this id.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}