hosting

POST /v1/sites/{siteId}/ssh-keys

Authorise a public key for SSH on a site.

सर्व hosting एंडपॉइंट्स

प्रमाणीकरण

बेरर टोकन म्हणून API की पाठवा. की मध्ये sites.view परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.

या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

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 विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

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).

विनंती मुख्य भाग

नावप्रकारआवश्यकहे काय आहे
handlestringहोय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.
keystringहोयThe public key line, as OpenSSH writes it.

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
handlestringहोय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}`.
keystringहोय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…
algorithmstringहोय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 sur…
commentstringहोयThe trailing comment on the key line. Often an email address, often empty.

ही एंडपॉइंट परत करू शकेल अशा त्रुटी

401 · 403 · 404 · 422 · 429 · 503