Update API docs with 4 missing endpoints

Added documentation for:
- getShopfloorPCs: List active shopfloor PCs
- getRecordedIP: Look up recorded IP by hostname
- updateWinRMStatus: Update WinRM enabled status
- updateMachinePositions: Bulk update map positions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-11 16:58:09 -05:00
parent 95bd2b591d
commit 3457028513

View File

@@ -183,6 +183,107 @@ This ASP API replaces the PHP api.php and provides the same functionality but ru
--- ---
### 5. `getShopfloorPCs`
**Purpose:** Returns list of all active shopfloor PCs for remote management
**Method:** GET
**Parameters:** None
**Response:**
```json
{
"success": true,
"count": 25,
"pcs": [
{
"machineid": 123,
"hostname": "SHOPFLOOR-PC-01",
"machinenumber": "2001",
"serialnumber": "ABC123",
"loggedinuser": "jsmith",
"lastupdated": "2025-12-11 10:30:00",
"ipaddress": "10.134.100.50",
"pctype": "Shopfloor"
}
]
}
```
---
### 6. `getRecordedIP`
**Purpose:** Look up recorded primary IP (10.134.*) for a hostname
**Method:** POST
**Parameters:**
- `hostname` - PC hostname
**Response:**
```json
{
"success": true,
"hostname": "SHOPFLOOR-PC-01",
"ipaddress": "10.134.100.50"
}
```
---
### 7. `updateWinRMStatus`
**Purpose:** Update WinRM enabled status for a PC
**Method:** POST or GET
**Parameters:**
- `hostname` - PC hostname
- `hasWinRM` - "1" or "0" (defaults to 1 if not specified)
**Response:**
```json
{
"success": true,
"message": "WinRM status updated",
"hostname": "SHOPFLOOR-PC-01",
"haswinrm": 1
}
```
---
### 8. `updateMachinePositions`
**Purpose:** Bulk update machine map positions (used by map editor)
**Method:** POST
**Parameters:**
- `changes` - JSON array of position changes
**changes Format:**
```json
[
{"id": 123, "newLeft": 450, "newTop": 200},
{"id": 124, "newLeft": 500, "newTop": 250}
]
```
**Response:**
```json
{
"success": true,
"message": "Updated 2 machine positions",
"updated": 2,
"errors": 0
}
```
---
## JSON Formats ## JSON Formats
### Network Interfaces Format ### Network Interfaces Format
@@ -821,7 +922,7 @@ Monitor these metrics:
--- ---
**Version:** 1.0 **Version:** 1.1
**Last Updated:** 2025-11-13 **Last Updated:** 2025-12-11
**Maintained By:** ShopDB Development Team **Maintained By:** ShopDB Development Team
**Support:** Review `/logs/api.log` for troubleshooting **Support:** Review `/logs/api.log` for troubleshooting