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


C.1 /instance

This endpoint controls the state of the running pies instance and accepts the following HTTP requests: GET, DELETE, POST (or PUT).

Request: GET /instance

Retrieves information about the current instance. The response body is a JSON object with the following attributes:

PID

PID of the running daemon.

argv

Array of the command line arguments. ‘argv[0]’ is the program name.

binary

Name of the pies binary.

instance

The instance name. See instances.

package

Package name (the string ‘GNU Pies’).

version

Package version

Any of these can be used in the URI to request the information about that particular attribute, e.g.:

GET /instance/argv ⇒ {"argv":["pies", "-x2"]}
Request: DELETE /instance/PID

Stops the current pies instance.

Request: PUT /instance/PID
Request: POST /instance/PID

Restarts the current pies instance.