API for Thunix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Blade of Darkness 27615bac37 Fix ImportError: No module named flask 2 years ago
.vscode finished uptime endpoint 3 years ago
endpoints Added ipv6 to ip_info 3 years ago
.gitignore cleanup .gitignore 3 years ago
.pylintrc Pylint fixups 3 years ago
LICENSE Initial commit 3 years ago
README.md Matching documentation with the "1" to "v1" change 3 years ago
requirements.txt Add requirements.txt 3 years ago
thunix_api.py Fix ImportError: No module named flask 2 years ago


Thunix API

This is the working spec for the Thunix API. Until finalization, the spec will be consider v1. v1 of the API shall be considered unstable, and a work in progress. The API should be agnostic to linux distros, and flavors of *Nix OS's (ie, BSD, etc) whenever possible.

The API will be authenticated, at all times, using the user's credentials sent in the host headers.

The API shall return a 200 for successful requests, with the JSON paylod.

The API shall return a 400 for any endpoint not existent.

The API shall return a 401 for unauthenticated requests to endpoints requiring authentication.

The API shall return a 403 for requests which are authenticated, but not permissible for the authenticated user.

The API shall return a 418 for requests to the "/teapot" endpoint.

The API shall return a 420 for requests exceeding the rate limits.

The API shall return a 501 for requests which exist in the spec, but have not been implmented yet.

API Format

The API is a RESTful API, and the following URIs will be used:


Informational APIs


This endpoint shall return a json struct containing interfaces, and IP addresses in CIDR format:



This will return a JSON payload of system uptime:



This will return a JSON payload containing information about the system memory, in bytes:

   "free" : 8668672000,
   "total" : 33638055936,
   "percent" : 74.2,
   "used" : 22686449664


This shall return a struct, describing the current tea making capabilities of the system: