WGDashboard Documentation Help

Download All Peers

Download all peers in a WireGuard configuration

Request

GET /api/downloadAllPeers/<configName>

Response

200 - OK

If request success, it will return list of objects inside data containing the content of the .conf file for this peer as well as the file name for .conf file

{ "data": [ { "file": "[Interface]\nPrivateKey = EB/izbtDPJ/Wk+XBg1+UD10Mt4lL4hkjWLIyw/XL6GY=\nAddress = 10.24.0.4/32\nMTU = 1420\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = mCP70rKd4iumKptwTgzvAR3g8/D74ZDkwR0EuI10uk4=\nAllowedIPs = 0.0.0.0/0\nEndpoint = 10.0.2.2:56767\nPersistentKeepalive = 21\nPresharedKey = 4ODtONbsAM+HS8Ek9f195vBNVN4w9u4fhO2WqLNr02Q=\n", "fileName": "BulkPeer#3_20240918_235236_wg88" }, { "file": "[Interface]\nPrivateKey = EB/izbtDPJ/Wk+XBg1+UD10Mt4lL4hkjWLIyw/XL6GY=\nAddress = 10.24.0.4/32\nMTU = 1420\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = mCP70rKd4iumKptwTgzvAR3g8/D74ZDkwR0EuI10uk4=\nAllowedIPs = 0.0.0.0/0\nEndpoint = 10.0.2.2:56767\nPersistentKeepalive = 21\nPresharedKey = 4ODtONbsAM+HS8Ek9f195vBNVN4w9u4fhO2WqLNr02Q=\n", "fileName": "BulkPeer#3_20240918_235236_wg88" }, { "file": "[Interface]\nPrivateKey = EB/izbtDPJ/Wk+XBg1+UD10Mt4lL4hkjWLIyw/XL6GY=\nAddress = 10.24.0.4/32\nMTU = 1420\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = mCP70rKd4iumKptwTgzvAR3g8/D74ZDkwR0EuI10uk4=\nAllowedIPs = 0.0.0.0/0\nEndpoint = 10.0.2.2:56767\nPersistentKeepalive = 21\nPresharedKey = 4ODtONbsAM+HS8Ek9f195vBNVN4w9u4fhO2WqLNr02Q=\n", "fileName": "BulkPeer#3_20240918_235236_wg88" } ], "message": null, "status": true }

If configuration does not exist

{ "data": null, "message": "Configuration does not exist", "status": false }
Last modified: 28 September 2024