Record a setup step
POST
/setup/step
const url = 'http://127.0.0.1:7700/api/setup/step';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"network","data":{"wired":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id
required
string
data
Answers for this step. At most 4 KB as JSON.
Example
{ "id": "network", "data": { "wired": true }}Responses
Section titled “Responses”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.