hosting
POST /v1/private-network/devices
Enrol a device and return its configuration once.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja tačka ne navodi specifičnu dozvolu u specifikaciji, zato dodelite svom ključu minimum potrebnih ovlašćenja i proverite odgovor umesto da pretpostavljate.
Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X POST https://api.zinndigital.com/v1/private-network/devices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "label": <string> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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.
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
label | string | Da | — |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
seat | PrivateNetworkDevice | Da | — |
config | string | Da | 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… |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 422