Skip to content

About

Simple Python server for exposing your Unraid JSON API (by CyanLabs) without needing auth.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

unraid-json-api-external

Simple Python server that exposes Unraid's emhttp .ini state files as JSON without needing auth.

It reads the files directly from /var/local/emhttp (the same output the CyanLabs JSON API plugin used to give), since Unraid 7 puts the plugin's endpoint behind the web UI login.

Usage

  1. Install this docker container and mount /var/local/emhttp (host) to /emhttp (container) read-only
  2. Fetch the API at http://<unraid_ip>:<docker_port>/{query}

Only disks.ini is served by default. Set ALLOWED_FILES to a comma-separated list to expose more.

System metrics

GET /metrics returns CPU, memory, network and temperature data from Unraid's built-in GraphQL API. It runs one fixed, read-only query, so the API key stays inside the container and is never part of a response.

  1. Create a key that can only read system info: unraid-api apikey --create --name dashboard --roles GUEST --permissions INFO:READ_ANY (--roles GUEST is needed because the CLI rejects keys without a role; GUEST only allows reading the key's own profile.)
  2. Set UNRAID_API_URL (e.g. http://127.0.0.1/graphql with host networking) and UNRAID_API_KEY on the container. Mark the key as masked in the Unraid template.

Without both variables /metrics returns 404.

Available queries

  • cpuload.ini
  • devs.ini
  • diskload.ini
  • disks.ini
  • monitor.ini
  • network.ini
  • sec.ini
  • sec_afp.ini
  • sec_nfs.ini
  • shares.ini
  • users.ini
  • var.ini

About

Simple Python server for exposing your Unraid JSON API (by CyanLabs) without needing auth.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages