hosting
POST /v1/sites/{siteId}/ssh-keys
Authorise a public key for SSH on a site.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग sites.view अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/ssh-keys \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "handle": <string>, "key": <string> }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Files one public key under a handle and returns the key as it was stored. 201 and the created key rather than the whole list, because the list is re-read anyway: can_create is a property of the collection and the vendor's own key count moves with it. ⛔ What makes a key valid is checked in the service, not in this schema, and the sentence the customer reads is the same whichever door they came through — including the one that says "that is your private key". A line that is not a public key we accept, a handle outside [A-Za-z0-9][A-Za-z0-9._-]{0,63}, a duplicate handle, or a package type that does not include SSH are all 422 with our wording, before the vendor is called. 404 for a site with no vendor hosting package, or one that is not the caller's. Requires sites.view and sites.panel_access — this write grants a shell.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
siteId (path) | Uuid | हुन्छ | Site ID (UUIDv7). |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
handle | string | हुन्छ | What to file the key under. Constrained to [A-Za-z0-9][A-Za-z0-9._-]{0,63}; anything else is refused with our wording rather than the vendor's. |
key | string | हुन्छ | The public key line, as OpenSSH writes it. |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
handle | string | हुन्छ | The name the key is filed under, ours and the vendor's, and what deleteSiteSshKey addresses. Constrained to [A-Za-z0-9][A-Za-z0-9._-]{0,63}. |
key | string | हुन्छ | The public key line, in full and never truncated. It is a public key — publishing it is what it is for — and a shortened one would stop a customer confirming that the key on… |
algorithm | string | हुन्छ | The key type parsed out of the line. "" when the stored line does not parse as one of the algorithms we accept, which is possible for a key added at the vendor before this… |
comment | string | हुन्छ | The trailing comment on the key line. Often an email address, often empty. |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 404 · 422 · 429 · 503