Skip to content

Record a setup step

POST
/setup/step
curl --request POST \
--url http://127.0.0.1:7700/api/setup/step \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": "network", "data": { "wired": true } }'

Owner only. Marks a step as taken. suggested in GET /setup lists the usual ids. data is at most 4 KB and holds answers, never keys; keys go to PUT /vault/{name}. The log records the step id only.

Media typeapplication/json
object
id
required
string
/^[a-z][\w-]{0,31}$/
data

Answers for this step. At most 4 KB as JSON.

Example

{
"id": "network",
"data": {
"wired": true
}
}

The setup state.

Media typeapplication/json
object
done
required
boolean
finishedAt
string | null format: date-time
migrated

The box already ran tasks when setup arrived

boolean
steps
required
object
key
additional properties
object
at
string format: date-time
data
suggested
required
Array<string>

Example

{
"suggested": [
"welcome",
"network",
"safety",
"folders",
"apps",
"keys",
"updates",
"phone"
]
}

A bad step id, or data over 4 KB.

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.