Skip to content

Set the owner

PUT
/owner
curl --request PUT \
--url http://127.0.0.1:7700/api/owner \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "user": "alex" }'

Preview, owner only. Makes an existing account the owner. It must be a person’s account: uid 1000 to 29999 or 40000 and up, not root, a system account or a task user. The choice is saved in BOX_HOME/owner.json and survives a restart, and the box then reports itself as GurtOS Personal. Once an owner is set, changing it takes the box’s Unix socket or a phone paired as the owner.

Media typeapplication/json
object
user
required

The account name.

string

Example

{
"user": "alex"
}

The new owner.

Media typeapplication/json
object
user
required
string
uid
required

The account’s uid

integer | null
home
required
string

Example generated

{
"user": "example",
"uid": 1,
"home": "example"
}

No such account, or a system account.

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 the box's own screen or the owner's paired device can do this"
}

GurtOS is open source under the Apache License 2.0.Source code on GitHub.