{"id":28536274,"url":"https://github.com/rfresh2/zenithproxywebapi","last_synced_at":"2026-04-10T06:04:30.943Z","repository":{"id":294147478,"uuid":"976825454","full_name":"rfresh2/ZenithProxyWebAPI","owner":"rfresh2","description":"HTTP API for ZenithProxy","archived":false,"fork":false,"pushed_at":"2026-01-12T18:35:28.000Z","size":119,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"mainline","last_synced_at":"2026-01-13T00:01:02.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rfresh2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-02T20:25:52.000Z","updated_at":"2026-01-12T18:32:02.000Z","dependencies_parsed_at":"2025-05-19T05:26:31.594Z","dependency_job_id":"5580b5c7-60e8-4295-a11d-e60a0333271e","html_url":"https://github.com/rfresh2/ZenithProxyWebAPI","commit_stats":null,"previous_names":["rfresh2/zenithproxywebapi"],"tags_count":6,"template":false,"template_full_name":"rfresh2/ZenithProxyExamplePlugin","purl":"pkg:github/rfresh2/ZenithProxyWebAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfresh2%2FZenithProxyWebAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfresh2%2FZenithProxyWebAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfresh2%2FZenithProxyWebAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfresh2%2FZenithProxyWebAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rfresh2","download_url":"https://codeload.github.com/rfresh2/ZenithProxyWebAPI/tar.gz/refs/heads/mainline","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfresh2%2FZenithProxyWebAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28497995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-06-09T17:35:38.621Z","updated_at":"2026-04-10T06:04:30.936Z","avatar_url":"https://github.com/rfresh2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZenithProxy Web API Plugin\n\nRuns a local web server that lets you interact with the ZenithProxy instance.\n\n# Commands\n\n## `webApi`\n\n* `webApi on/off` -\u003e default: on\n* `webApi port \u003cport\u003e` -\u003e default: 8080\n* `webApi auth \u003ctoken\u003e`\n* `webApi webUI on/off` -\u003e default: on\n* `webApi logRetentionEntries \u003centries\u003e` -\u003e default: 500\n* `webApi commandsAccountOwnerPerms on/off` -\u003e default: off\n* `webApi rateLimiter on/off` -\u003e default: on\n* `webApi rateLimitRequestsPerMinute \u003crate\u003e` -\u003e default: 30\n\n# Web UI\n\nYou can open the web UI from a browser: `http://\u003cproxy IP\u003e:\u003cport\u003e`\n\nThe web UI allows you to run commands and view live logs.\n\nAccess is authenticated with the same auth token.\n\n\u003cp align=\"left\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/rfresh2/ZenithProxyWebAPI/refs/heads/mainline/docs/web-ui.png\" alt=\"ZenithProxy Web UI\"\u003e\n\u003c/p\u003e\n\n# HTTP API\n\n## Authorization\n\nAll HTTP requests must have an `Authorization` header.\n\nA default auth token is generated on first launch.\n\nOr it can be set with the `webApi auth \u003ctoken\u003e` command.\n\n## POST `/api/command`\n\n### Request Body\n\n```json\n{\n  \"command\": \"status\"\n}\n```\n\n### Response\n\n```json\n{\n   \"embed\": \"\\nZenithProxy 0.0.0 - Unknown\\n\\nStatus\\nDisconnected\\nConnected Player\\nNone\\nOnline For\\nNot Online!\\nHealth\\n20.0\\nDimension\\nNone\\nPing\\n0ms\\nProxy IP\\nlocalhost\\nServer\\nconnect.2b2t.org:25565\\nPriority Queue\\nno [unbanned]\\nSpectators\\non\\n2b2t Queue\\nPriority: 15 [00:25:49]\\nRegular: 688 [07:49:27]\\nCoordinates\\n||[0, 0, 0]||\\nAutoUpdate\\non\",\n   \"embedComponent\": \"{\\\"color\\\":\\\"#E91E63\\\",\\\"extra\\\":[\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"text\\\":\\\"ZenithProxy 0.0.0 - Unknown\\\"},\\\"\\\\n\\\",\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Status\\\"},{\\\"extra\\\":[\\\"Disconnected\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Connected Player\\\"},{\\\"extra\\\":[\\\"None\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Online For\\\"},{\\\"extra\\\":[\\\"Not Online!\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Health\\\"},{\\\"extra\\\":[\\\"20.0\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Dimension\\\"},{\\\"extra\\\":[\\\"None\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Ping\\\"},{\\\"extra\\\":[\\\"0ms\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Proxy IP\\\"},{\\\"extra\\\":[\\\"localhost\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Server\\\"},{\\\"extra\\\":[\\\"connect.2b2t.org:25565\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Priority Queue\\\"},{\\\"extra\\\":[\\\"no [unbanned]\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Spectators\\\"},{\\\"extra\\\":[\\\"on\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"2b2t Queue\\\"},{\\\"extra\\\":[\\\"Priority: 15 [00:25:49]\\\\nRegular: 688 [07:49:27]\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"Coordinates\\\"},{\\\"extra\\\":[\\\"||[0, 0, 0]||\\\"],\\\"text\\\":\\\"\\\"},\\\"\\\\n\\\",{\\\"bold\\\":true,\\\"extra\\\":[\\\"\\\\n\\\"],\\\"text\\\":\\\"AutoUpdate\\\"},{\\\"extra\\\":[\\\"on\\\"],\\\"text\\\":\\\"\\\"}],\\\"text\\\":\\\"\\\"}\",\n   \"multiLineOutput\": []\n}\n```\n\nThe `embedComponent` can be parsed back from json with [Kyori Adventure](https://docs.advntr.dev/getting-started.html)\n```java\nComponent c = GsonComponentSerializer.gson().deserialize(embedComponent);\n```\n\nOr with Minecraft's text components:\n```java\n// MC 1.21.1 mojmap\nMutableComponent component = Component.Serializer.fromJson(response.embedComponent(), Minecraft.getInstance().player.registryAccess());\n```\n\n### Example\n\n```bash\ncurl --location 'http://localhost:8080/api/command' \\\n--header 'Authorization: c05598ed-d123-4e8f-9aa7-40c11e657f23' \\\n--header 'Content-Type: application/json' \\\n--data '{\"command\":\"status\"}'\n```\n\n## GET `/api/logs`\n\nReturns recent log entries. Intended for use only with the web UI.\n\nOld log entries are evicted once the configured retention limit is reached.\n\n### Query Parameters\n\n* `from` - optional log cursor to continue from. Default: `0`\n* `limit` - optional maximum number of log entries to return. Default: `200`, max: `500`\n\n### Response\n\n```json\n{\n  \"baseIndex\": 1250,\n  \"fromIndex\": 1300,\n  \"nextIndex\": 1350,\n  \"retained\": 500,\n  \"lines\": [\n    \"[2026/04/09 16:25:53] [Proxy] [INFO] ZenithProxy started!\\n\"\n  ]\n}\n```\n\n### Response Fields\n\n* `baseIndex` - global index of the oldest retained log entry currently available\n* `fromIndex` - actual starting cursor used for this response\n* `nextIndex` - cursor to pass to the next `/api/logs` request\n* `retained` - number of log entries currently kept in memory\n* `lines` - log entries as an array of strings\n\nIf your requested `from` value is older than `baseIndex`, older log entries have already been evicted and the response begins at `baseIndex`.\n\n### Example\n\n```bash\ncurl --location 'http://localhost:8080/api/logs?from=0\u0026limit=100' \\\n--header 'Authorization: c05598ed-d123-4e8f-9aa7-40c11e657f23'\n```\n\n# FAQ\n\n## How do I call the API from the public internet?\n\nDepends on where and how you are hosting the ZenithProxy instance.\n\nIt's the same as accessing the ZenithProxy MC server from the public internet.\n\nSo if you had to change firewall settings, port forwarding, or set up tunneling you'd do the same for the web API's port.\n\n## I'm running multiple ZenithProxy instance on the same server, can they all have web APIs?\n\nYes, but each needs to be configured to use a different port: `webApi port \u003cport\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frfresh2%2Fzenithproxywebapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frfresh2%2Fzenithproxywebapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frfresh2%2Fzenithproxywebapi/lists"}