compute
POST /v1/compute/ssh-keys
Register a public key so a future order can install it.
प्रमाणन
बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास billing.payment.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।
जहां आपकी संगठन आईडी आती है
यह एंडपॉइंट org_id को एक क्वेरी पैरामीटर के रूप में लेता है। इसे छोड़ दें और कॉल आपकी पूरी टेनेंसी सबट्री को कवर करेगी; कॉल को किसी एक संगठन तक सीमित करने के लिए इसे भेजें।
आपकी ऑर्गनाइजेशन आईडी आपके डैशबोर्ड पर एपीआई कीज़ स्क्रीन पर, की के ठीक बगल में मौजूद है। यह आपके द्वारा की जाने वाली हर कॉल में समान आईडी होती है।
इसे आज़माएँ
कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।
curl -X POST https://api.zinndigital.com/v1/compute/ssh-keys \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "public_key": <string> }'साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें
विवरण
The provider is asked **first** and our row is written from its answer. A row written optimistically and then refused by the provider is a key the customer can select in the order form and that no machine can be built with — the refusal arriving after payment. ⛔ The **public** half only. A private key is refused `422` with a sentence telling the customer to treat it as compromised and rotate it, rather than quietly stripped: somebody who has just pasted a private key needs to know they exposed it. ⛔ A key already registered on the account is `422`. Key names and fingerprints are unique account-wide at the provider, which our tenancy cannot change, so this is a collision the screen has to explain rather than hide. Requires `billing.payment.manage`.
पैरामीटर
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
org_id (query) | Uuid | नहीं | — |
अनुरोध बॉडी
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
name | string | हाँ | What to call it. Unique within the organisation. |
public_key | string | हाँ | The **public** half — the one-line file ending `.pub`. ⛔ A private key is refused `422` with a sentence telling the customer to treat it as compromised and rotate it, rather tha… |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
id | string | हाँ | The provider's id — what an order sends in `ssh_keys`. |
name | string | हाँ | What the customer calls it. |
fingerprint | string | हाँ | The **provider's** fingerprint, verbatim. ⛔ Never recompute it: ours disagreeing with theirs is indistinguishable, on a screen, from the customer having uploaded the wrong key. |
public_key | string | हाँ | The public half, as registered. The private half never reaches us. |
त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है
401 · 403 · 422 · 429 · 503