update docs

This commit is contained in:
Raven Scott
2025-12-26 17:34:30 -05:00
parent 9b68e728fd
commit 4465e9aa62
4 changed files with 78 additions and 5 deletions
+7 -2
View File
@@ -392,13 +392,17 @@ The P2NS (Peer-to-Peer Name System) admin backend API, hosted at `https://p2ns.a
```
### 17. POST /api/remove-domain
- **Description**: Removes a domain from the P2P network, `domains.json`, and associated resources (Holesail clients, virtual interfaces, DNS preferences).
- **Description**: Removes a domain. Behavior depends on consensus status:
- **Resolved Claimant**: Performs full cleanup removing all claims and votes for the domain, broadcasts `remove_domain:` to trigger other peers to clean up
- **Conflict Claim**: Removes only your own claim and votes, broadcasts `removeConflictDomainClaim:` notification (other peers preserve their claims)
- **Request Body**: JSON with `domain` (string).
- **Response**: Plain text `OK` on success, error message on failure.
- **Status Codes**:
- `200`: Success.
- `403`: No claim found for domain or peer not initialized.
- `500`: Failed to remove domain.
- **WebSocket Broadcast**: `update-database`, `update-holesail-clients`, `update-local-dns`.
- **Note**: Only the peer that created a claim can remove it. Ownership is strictly validated before removal.
- **Example**:
```bash
curl -X POST \
@@ -682,11 +686,12 @@ The P2NS (Peer-to-Peer Name System) admin backend API, hosted at `https://p2ns.a
```
### 31. POST /api/restart-holesail-clients-for-domain
- **Description**: Restarts all Holesail clients (both admin-managed and DNS-triggered) for a specific domain to use updated hash preferences. Closes existing connections and creates new ones with correct hashes.
- **Description**: Restarts all Holesail clients (both admin-managed and DNS-triggered) for a specific domain to use updated hash preferences. Closes existing connections and creates new ones with correct hashes. Ensures IP assignment exists before creating clients.
- **Request Body**: JSON with `domain` (string).
- **Response**: Plain text `OK` on success, error message on failure.
- **Status Codes**:
- `200`: Success.
- `500`: Failed to restart clients or resolve hash.
- `500`: Failed to restart Holesail clients.
- **WebSocket Broadcast**: `update-holesail-clients`.
- **Example**: