{"id":18411413,"url":"https://github.com/alfg/murmur-rest","last_synced_at":"2025-04-13T15:52:26.419Z","repository":{"id":12311626,"uuid":"14945228","full_name":"alfg/murmur-rest","owner":"alfg","description":":headphones: A RESTful API for administering virtual Mumble servers. Built with Flask and Ice.","archived":false,"fork":false,"pushed_at":"2024-07-05T10:46:44.000Z","size":137,"stargazers_count":79,"open_issues_count":5,"forks_count":33,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-27T06:44:56.474Z","etag":null,"topics":["mumble","mumble-servers","python"],"latest_commit_sha":null,"homepage":"https://github.com/alfg/murmur-rest","language":"Slice","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-05T05:54:27.000Z","updated_at":"2024-10-15T06:12:51.000Z","dependencies_parsed_at":"2024-11-06T03:37:22.581Z","dependency_job_id":null,"html_url":"https://github.com/alfg/murmur-rest","commit_stats":{"total_commits":94,"total_committers":8,"mean_commits":11.75,"dds":"0.35106382978723405","last_synced_commit":"594060264cd6ea594d5c07f40163782946f48eb2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fmurmur-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fmurmur-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fmurmur-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fmurmur-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfg","download_url":"https://codeload.github.com/alfg/murmur-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741148,"owners_count":21154249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mumble","mumble-servers","python"],"created_at":"2024-11-06T03:36:54.417Z","updated_at":"2025-04-13T15:52:26.388Z","avatar_url":"https://github.com/alfg.png","language":"Slice","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Murmur-rest API v1\n\n### Overview\n\nMurmur-REST is a RESTful web application wrapper over the Murmur SLICE API to administer virtual Mumble servers. The API allows you to develop your own application using the feature set and endpoints provided. This project was built to administer Mumble servers for [Guildbit.com](http://guildbit.com).\n\nIf you find any issues or would like to help contribute to the project, please report them via Github issues or send a pull request.\n\n**Check out my Mumble-Widget project! https://github.com/alfg/mumble-widget**\n\n![Docker Automated build](https://img.shields.io/docker/automated/alfg/murmur-rest)\n![Docker Pulls](https://img.shields.io/docker/pulls/alfg/murmur-rest)\n\n### Endpoints\n\n#### Servers\n\n| Endpoint | Description |\n| ---- | --------------- |\n| GET /servers/ | Get server list |\n| POST /servers/ | Create a new server, starts it, and returns details |\n| GET /servers/:serverid | Get server details |\n| POST /servers/:serverid/start | Start server |\n| POST /servers/:serverid/stop | Stop server |\n| DELETE /servers/:serverid | Delete server |\n| DELETE /servers/delete?id=1,2,3 | Delete multiple servers |\n| GET /servers/:serverid/logs | Get server logs |\n| GET /servers/:serverid/bans | Get list of banned users |\n| GET /servers/:serverid/conf | Get server configuration for specified id |\n| POST /servers/:serverid/conf?key=users\u0026value=100 | Set configuration variable 'users' to 100 |\n| POST /servers/:serverid/sendmessage | Send a message to all channels in a server. formdata: message |\n| POST /servers/:serverid/setsuperuserpw | Sets SuperUser password. formdata: password |\n\n#### Stats\n\n| Endpoint | Description |\n| ---- | --------------- |\n| GET /stats/ | Get all statistics |\n\n#### Users\n\n| Endpoint | Description |\n| ---- | --------------- |\n| GET /servers/:serverid/user | Get all users in a server |\n| GET /servers/:serverid/user/:userid | Get User |\n| POST /servers/:serverid/user | Create User, formdata:  username\u0026password |\n| DELETE /servers/:serverid/user/:userid | Delete User |\n| POST /servers/:serverid/kickuser?usersession=1 | Kick user with session #1 |\n| POST /servers/:serverid/user/:userid/mute | Mute User |\n| POST /servers/:serverid/user/:userid/unmute | Unmute User |\n| POST /servers/:serverid/user/:userid/update | Update registered username. formdata: username\n\n#### Channels\n\n| Endpoint | Description |\n| ---- | --------------- |\n| GET /servers/:serverid/channels | Get all channels in a server |\n| GET /servers/:serverid/channels/:channelid | Get a channel from a server by ID |\n| POST /servers/:serverid/channels | Create Channel, formdata:  name\u0026parent |\n| GET /servers/:serverid/channels/:channelid/acl | Get ACL list for channel ID |\n| DELETE /servers/:serverid/channels/:channelid | Delete Channel |\n\n\n### Development Setup\n\n* Python 3.7+ recommended\n\nAssuming you already have Murmur running and set up, follow the instructions below to run murmur-rest\nfor development. Tested on Ubuntu 18.04, but should be to run wherever Murmur and Zero Ice are supported.\n\nRunserver.py uses Flask's development server. This should be used for development only. See\nDeployment for Production for running in production mode. Python `venv` is highly recommended as well.\n\n1) Install required Zero Ice library\n\n`sudo apt-get install python-zeroc-ice zeroc-ice-compilers`\n\n2) Clone and install murmur-rest\n\n```\ngit clone git@github.com:alfg/murmur-rest.git\ncd /directory/to/murmur-rest\npip install -r requirements.txt\n```\n\n*Note*: If running in venv, use the `--system-site-packages` flag in order to import the Ice library.\n\n3) Set your environment variables:\n```\nAPP_HOST=0.0.0.0\nAPP_PORT=8080\nAPP_DEBUG=True\nENABLE_AUTH=True\nUSERS=admin:password,admin2:password2 # Only if auth is enabled.\nMURMUR_ICE_HOST=localhost\nMURMUR_ICE_PORT=6502\n```\n\n4) Run and test application\n\n```\n$ python runserver.py\n * Running on http://0.0.0.0:8080/\n * Restarting with reloader\n\n$ curl http://localhost:8080/servers/\n[\n    {\n        \"address\": \":::64739\",\n        \"channels\": 1,\n        \"humanize_uptime\": \"0:00:02\",\n        \"id\": 2,\n        \"log_length\": 35,\n        \"maxusers\": \"10\",\n        \"name\": \"\",\n        \"running\": true,\n        \"uptime\": 2,\n        \"users\": 0\n    }\n]\n```\n\n\n### Docker Setup\n\nA `docker-compose` and Dockerfile are provided to easily setup a local development setup. Install [Docker](https://docs.docker.com/engine/installation/) and run the following commands:\n\n#### `docker-compose`\n* Run docker-compose:\n```\ndocker-compose up\n```\n\nThis will start the `murmurd` and `murmur-rest` containers with the default configuration defined in `docker-compose.yml`.\n\nLoad `http://localhost:8080/servers/` into the browser to test and login with `admin/password`.\n\n#### `docker`\n* Configure `settings.py` or set environment variables:\n```\nAPP_HOST=0.0.0.0\nAPP_PORT=8080\nAPP_DEBUG=True\nENABLE_AUTH=True\nUSERS=admin:password,admin2:password2\nMURMUR_ICE_HOST=localhost\nMURMUR_ICE_PORT=6502\n```\n\n* Pull docker image and run:\n```\ndocker pull alfg/murmur-rest\ndocker run -it -p 8080:8080 --rm alfg/murmur-rest\n```\n\nor\n\n* Build and run container from source:\n```\ngit clone https://github.com/alfg/murmur-rest\ndocker build -t murmur-rest .\ndocker run -it -p 8080:8080 --rm murmur-rest\n```\n\n* Load `http://localhost:8080/servers/` into the browser to test.\n\n#### Disabling `userland-proxy`\nThe userland-proxy can eat up a lot of memory, especially when using a long range of ports.\nDisabling this option can reduce memory usage drastically.\n\nCreate `/etc/docker/daemon.json` and add:\n```json\n{\n    \"userland-proxy\": false\n}\n```\n\nRestart `dockerd`:\n```\nsudo systemctl restart docker\n```\n\nhttps://docs.docker.com/engine/reference/commandline/dockerd/\n\n### Volumes\nYou may want to persist your murmur database to a volume or mount your local configuration. Add to your `docker-compose`:\n```yaml\n    volumes:\n      - ./etc/murmur.ini:/etc/murmur/murmur.ini\n      - murmurdb:/var/lib/murmur/\n\nvolumes:\n  murmurdb\n```\n\n\n###  Deployment for Production\n\nFollowing the same steps for Deployment for Development, just use a Python WSGI application server\nsuch as [Gunicorn](http://gunicorn.org/) instead of the built-in Flask server. The provided `wsgi.py`\nfile is provided for this.\n\nFor example, if using Gunicorn and virtualenv:\n\n```\n/path/to/murmur-rest/env/bin/gunicorn -b 127.0.0.1:8080 wsgi:app\n```\n\n### TODO\n\n- Complete support for full Murmur SLICE API\n- API Documentation\n- Error Handling\n- Tests\n- Automate Let's Encrypt SSL Setup\n\n### Resources\n- [Murmur SLICE API](https://wiki.mumble.info/slice/Murmur.html)\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 github.com/alfg\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fmurmur-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfg%2Fmurmur-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fmurmur-rest/lists"}