hosting
POST /v1/private-network/devices
Enrol a device and return its configuration once.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem 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> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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.
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
label | string | Ja | — |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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… |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422