/api/drd/user/delete

GET

Deletes the caller's record from the Distributed Resource Directory on every RAIDA server. AN-authenticated — only the coin's owner can delete its record. Servers that already have no record answer status 193, which counts as deleted (already_deleted_count).

Parameters

Name Type Required Description
sn integer No Serial number of the coin that authenticates the request. The coin is loaded from the wallet's Bank or Fracked folder. Omit to use the QMail identity coin instead.
denomination integer No Optional safety check when sn is given: must match the denomination of the coin found for that serial number (-8 to 6).
wallet_path string No Wallet holding the auth coin. Defaults to the Default wallet. Only used together with sn.

Responses

Success Response (200)

The fan-out fields are shared by every DRD endpoint: pass_count / fail_count / no_response_count total 25, quorum is true when 13 or more RAIDA servers accepted, and raida_results holds one entry per server (25 entries; truncated in the examples below). Status 250 is success; failed entries include an error string.

{
    "command": "drd-user-delete",
    "success": true,
    "denomination": 1,
    "serial_number": 9840,
    "already_deleted_count": 0,
    "pass_count": 25,
    "fail_count": 0,
    "no_response_count": 0,
    "quorum": true,
    "raida_results": [
        { "raida": 0, "success": true, "status": 250 },
        { "raida": 1, "success": true, "status": 250 }
    ]
}

Error Responses

404 Not Found

The auth coin was not found in the wallet.

{
    "error": true,
    "message": "Auth coin not found in wallet (Bank/Fracked)",
    "code": 404
}

502 Bad Gateway

No RAIDA server accepted the request. The body names the dominant failure status and includes the full per-server detail.

{
    "error": true,
    "message": "No RAIDA accepted the delete",
    "code": 502,
    "raida_status_code": 200,
    "detail": "Invalid AN",
    "pass_count": 0,
    "fail_count": 25,
    "no_response_count": 0,
    "quorum": false,
    "raida_results": [
        { "raida": 0, "success": false, "status": 200, "error": "Invalid AN" }
    ]
}

Examples

cURL Example

curl -X GET "http://localhost:8080/api/drd/user/delete?sn=9840"

JavaScript Example

fetch(`http://localhost:8080/api/drd/user/delete?sn=9840`)
    .then(r => r.json())
    .then(data => {
        if (data.success) {
            console.log(`Deleted on ${data.pass_count} servers ` +
                        `(${data.already_deleted_count} were already clear)`);
        }
    });

Python Example

import requests

url = 'http://localhost:8080/api/drd/user/delete'
data = requests.get(url, params={'sn': 9840}).json()
print('Deleted' if data.get('success') else f"Error: {data.get('message')}")

Notes

  • Requests fan out to all 25 RAIDA servers in parallel; the client owns consistency. On partial success (pass_count < 25), re-issue the same request to bring stragglers up to date.
  • This operation is AN-authenticated: the auth coin's per-RAIDA Authenticity Numbers are sent with the request, and each server verifies them against its coin database (status 200 = wrong AN, 40 = unknown coin).
  • Without an sn parameter the QMail identity coin from the Mail wallet is used, so QMail users manage their directory entry with their mail identity.
  • Deleting resets created_at: a later repost starts the account age from zero. Prefer updating (re-posting) over delete + repost if account age matters.
  • Status 193 from a server means the record was already gone there — reported in already_deleted_count and treated as success.
  • White/black list entries are stored separately and are NOT removed by this call; use /api/drd/list/remove.