hosting
POST /v1/private-network/devices
Enrol a device and return its configuration once.
Authenticatie
Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/private-network/devices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "label": <string> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
Gated on `network.private.manage` in addition to `sites.view`. ⛔⛔ **The `config` in the response is shown ONCE and can never be retrieved again.** The private key is generated in memory and is never stored — not in the database and not in Vault — so there is no endpoint that could return it a second time. A customer who loses it rotates the device, which is the correct handling of a lost secret. 422 when the device allowance is spent, when the label is blank, or when the organisation's dedicated address has not finished being assigned.
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
label | string | Ja | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
seat | PrivateNetworkDevice | Ja | — |
config | string | Ja | The complete WireGuard configuration file. ⛔⛔ Returned ONCE, on this response only. It contains the device's private key, which is generated in memory and never stored anywhere… |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422