hosting

POST /v1/sites/{siteId}/databases

Create a database on a site.

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

प्रमाणीकरण

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

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

प्रयत्न करा

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

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/databases \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

Creates a database and its user, and returns the generated password **exactly once**. The password is generated by this platform rather than chosen by the caller, because it is a machine-to-machine credential that nobody types and a human-chosen one is the weakest link in a stack the customer cannot patch. It is not stored in our records, not logged, and cannot be read back by any endpoint — a customer who loses it creates another database. The effective ceiling is applied before the vendor is called: a package type that does not permit databases, and an allowance that is already spent, are both `422` with a sentence the customer can act on. A name the package already carries is `409`. The vendor prefixes names per package, so the returned `name` is rarely the name that was asked for and the client must show the returned value. `404` for a site with no vendor hosting package. Requires `sites.manage`.

पॅरामीटर्स

नावप्रकारआवश्यकहे काय आहे
siteId (path)UuidहोयSite ID (UUIDv7).

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

नावप्रकारआवश्यकहे काय आहे
namestringहोयThe name to ask for. The server's own name is returned in `SiteHostingDatabase.name` and may differ; there is deliberately no password field here, because the platform generates…

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
databaseSiteHostingDatabaseहोयThe created database, exactly as `listSiteDatabases` will report it.
passwordstringहोयThe generated password, shown once. Deliberately carries no example — a documented example of a credential field is the shape people copy.

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

401 · 403 · 404 · 409 · 422 · 429 · 503