Documentation
PoolNode Project and Website Administration API
Embedded PoolNode project activation, ports, endpoints, website, TLS, certificate, template, and app configuration endpoints.
PoolNode Project and Website Administration API
These /api/poolnode/* endpoints are called by the RustMinerSystem administration UI. They are different from the PoolNode user-facing /api/user/* API and are intended for node owners.
PoolNode calls commonly return { status, error, data }. The UI extracts data and treats status: 4 as “project not activated.”
Project application and activation
| Method | Path | Body/purpose |
|---|---|---|
| GET | /api/poolnode/project/info |
Read project state, name, and coin fee configuration. |
| POST | /api/poolnode/project/apply |
Apply with { name, token }. |
| POST | /api/poolnode/project/active |
Activate with { code, token, captcha_token }. |
| POST | /api/poolnode/project/unactive |
Deactivate the current project. |
Deactivation clears project, fee, and port state in the frontend. Back up settlement and website data first.
Node ports and endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/poolnode/ports |
Read PoolNode ports. |
| POST | /api/poolnode/port/new |
Create a port across node servers. |
| POST | /api/poolnode/extra/{port} |
Change public mode and unified wallet for a listen port. |
| DELETE | /api/port/{id} |
Delete a node port through the shared port endpoint. |
| GET | /api/poolnode/endpoints |
Read regions/upstream node endpoints. |
| GET | /api/poolnode/ping/{id} |
Measure endpoint latency. |
| GET | /api/poolnode/project/stats?k={coin} |
Read statistics for one node currency. |
| GET | /api/poolnode/sync/info |
Read sync success, failure, and detail data. |
Some coin checks append ?k=KAS. A create body resembles the normal port payload and includes:
{
"port": 3333,
"name": "Pool Port",
"currency": "PI-BTC",
"pool_address": "<JSON string containing endpoint ID>",
"mode": 1,
"protocol": 0,
"category": "poolnode",
"proxy_addr": ""
}
Extra settings body:
{
"mode": 1,
"proxy_addr": "<public-mode wallet or subaccount>"
}
Website access
| Method | Path | Request/purpose |
|---|---|---|
| GET | /api/poolnode/index/port |
Read the website port. |
| POST | /api/poolnode/index/port |
Change it with { "r": 8080 }. |
| GET | /api/poolnode/route |
Read the website safe route. |
| POST | /api/poolnode/route |
Change it with { "k": "route" }. |
| GET | /api/poolnode/enable/index |
Read public-access state. |
| POST | /api/poolnode/enable/index/{flag} |
Toggle public access; the backend flag is inverted relative to the UI boolean. |
| GET | /api/poolnode/index/tls |
Read TLS state. |
| POST | /api/poolnode/index/tls/{flag} |
Set TLS state. |
Port, route, and TLS changes can restart the service. Be ready to reconnect to the new URL.
Website certificate
| Method | Path | Purpose |
|---|---|---|
| GET | /api/poolnode/cert |
Read the current certificate type. |
| POST | /api/poolnode/cert/upload |
Upload the website PEM certificate and private key. |
| POST | /api/poolnode/cert/reset |
Restore the bundled website certificate. |
The upload body is { pem, key }; both values are Base64-encoded UTF-8 text.
Branding and templates
| Method | Path | Purpose |
|---|---|---|
| GET | /api/poolnode/webconfig |
Read name, logo, notice, and branding data. |
| POST | /api/poolnode/webconfig |
Save website configuration. |
| GET | /api/poolnode/pool/asset/selected |
Read the active template. |
| GET | /api/poolnode/pool/assets |
Read all available templates. |
| GET | /api/poolnode/pool/asset/status |
Read template download state. |
| POST | /api/poolnode/pool/asset |
Select a template. |
| POST | /api/poolnode/pool/asset/reset |
Restore the default template. |
Website configuration is a Base64-encoded JSON document:
{
"k": "<Base64(JSON.stringify(config))>"
}
Template selection:
{
"asset_id": 1,
"item_id": 2
}
App communication configuration
| Method | Path | Purpose |
|---|---|---|
| GET | /api/poolnode/project/url |
Read app API URL, name, and invitation code. |
| POST | /api/poolnode/project/url |
Save the app communication URL. |
{
"api_url": "https://pool.example.com/safe-route",
"refresh": 0
}
Complete response models
PoolNode commonly uses:
{
"status": 0,
"error": null,
"data": {}
}
status=0 is success, status=4 means the project is not active, error contains the failure description, and data is the business value. A few reused proxy-port endpoints return arrays or scalars directly.
Project
GET /api/poolnode/project/info returns data with:
| Field | Type | Meaning |
|---|---|---|
cid |
number | Project/customer ID. |
name |
string | Project name. |
created_at |
string | Creation time. |
config |
array | Per-currency fee configuration. |
config[].coin |
string | PoolNode currency code. |
config[].email |
string | Revenue email; redact it. |
config[].r |
string/number | Fee ratio as a 0–1 fraction. |
Apply and activate return business-state objects. Unactivate returns a success envelope and changes project state.
Endpoints, ports, statistics, and synchronization
/api/poolnode/endpoints returns enveloped Endpoint[], each with id, coin, name, and nullable url. The create-port pool_address is not a hostname: use an endpoint whose coin matches currency, then send JSON.stringify(endpoint.id). Ping uses the same endpoint id and returns latency milliseconds in data.
/api/poolnode/ports returns port rows directly. server follows the common port model; its pool_address contains the endpoint ID string. Node stat contains port, online, conn, offline, delay, and coin. Create returns an ID or success scalar; edit and delete should be followed by a list refresh.
/api/poolnode/project/stats?k={coin} returns enveloped { hashrate, hashrate1440, online, conn }; the first three can be null.
/api/poolnode/sync/info returns:
{
"summary": { "sc": 0, "fl": 0, "ty": 0, "lt": "..." },
"details": [
{ "sc": 1, "fl": 0, "ty": 0, "lt": "..." }
]
}
sc is success count/flag, fl is failure count, ty is sync type, and lt is the latest sync time.
Web, TLS, and certificate state
The GET responses are enveloped values: index/port returns a number, route a string, and enable/index, index/tls, and cert numbers. The frontend interprets enable/index.data=0 as public access enabled, and cert.data=0 as the built-in certificate. Writes return status=0; port, route, TLS, and certificate changes may restart the site.
Site configuration and templates
webconfig.data is a Base64-encoded JSON string, with direct-object compatibility. After decoding, the frontend treats logo, title, title1, title2, rotate, title3, bottom, and fee as strings.
pool/asset/selected.data is an array whose first two values are asset_id and item_id; tolerate additional state values. pool/asset/status.data is { is_downloading: number }.
Each entry in pool/assets.data contains:
| Field | Type | Meaning |
|---|---|---|
id |
number | Template asset ID. |
cid |
number | Project/category ID. |
theme |
string | Template name. |
cover |
string | Preview image URL. |
uid |
number/null | Publisher ID. |
created_at / updated_at |
string | Timestamps. |
items |
array | Available versions. |
items[].id |
number | Version item ID. |
items[].version |
string | Version string. |
items[].zip_url |
string/null | Download URL, which may not be public. |
Select asset_id and item_id from the same template. Select/reset succeeds only when data="Ok".
App configuration
GET returns { invite_code, name, url }, either directly or under data. invite_code may be numeric, so convert it to text for display. POST should be followed by GET to read the canonical url.
