@@ -42,6 +42,7 @@ nodepass "master://0.0.0.0:9090/admin?log=info&tls=1"
4242| ` /instances/{id} ` | DELETE | Delete instance |
4343| ` /events ` | GET | SSE real-time event stream |
4444| ` /info ` | GET | Get master service info |
45+ | ` /info ` | POST | Update master alias |
4546| ` /tcping ` | GET | TCP connection test |
4647| ` /openapi.json ` | GET | OpenAPI specification |
4748| ` /docs ` | GET | Swagger UI documentation |
@@ -900,6 +901,7 @@ The response contains the following system information fields:
900901
901902` ` ` json
902903{
904+ " alias" : " dev" , // Master alias
903905 " os" : " linux" , // Operating system type
904906 " arch" : " amd64" , // System architecture
905907 " cpu" : 45 , // CPU usage percentage (Linux only)
@@ -1145,6 +1147,28 @@ await fetch(`${API_URL}/instances/abc123`, {
11451147- **Authentication**: Requires API Key
11461148- **Response**: Contains system information, version, uptime, CPU and RAM usage, etc.
11471149
1150+ #### POST /info
1151+ - **Description**: Update master alias
1152+ - **Authentication**: Requires API Key
1153+ - **Request body**: ` { " alias" : " new alias" }`
1154+ - **Response**: Complete master information (same as GET /info)
1155+ - **Example**:
1156+ ` ` ` javascript
1157+ // Update master alias
1158+ const response = await fetch (` ${ API_URL } /info` , {
1159+ method: ' POST' ,
1160+ headers: {
1161+ ' Content-Type' : ' application/json' ,
1162+ ' X-API-Key' : apiKey
1163+ },
1164+ body: JSON .stringify ({ alias: ' My NodePass Server' })
1165+ });
1166+
1167+ const data = await response .json ();
1168+ console .log (' Updated alias:' , data .alias );
1169+ // Response contains full system info with updated alias
1170+ ` ` `
1171+
11481172#### GET /tcping
11491173- **Description**: TCP connection test, checks connectivity and latency to target address
11501174- **Authentication**: Requires API Key
0 commit comments