Next: , Previous: , Up: Control API   [Contents][Index]


C.5 /runlevel

This URI is active when pies runs as init process (see Init Process). It supports two requests:

Request: GET /runlevel

Returns the current state of the program as a JSON object with the following attributes:

Attr: string runlevel

Current runlevel. See Runlevels.

Attr: string prevlevel

Previous runlevel (‘N’ if none).

Attr: string bootstate

Boot state. See startup states.

Attr: string initdefault

Default runlevel.

Request: PUT /runlevel/{"runlevel":L}

Initiates transition from the current runlevel to runlevel L (see Runlevels).