hosting

POST /v1/site-imports

Restore a site from a web archive, or migrate one in.

सभी hosting एंडपॉइंट्स

सभी डेवलपर दस्तावेज़

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास hosting.import.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

जहां आपकी संगठन आईडी आती है

यह एंडपॉइंट JSON बॉडी में एक फ़ील्ड के रूप में org_id लेता है।

आपकी ऑर्गनाइजेशन आईडी आपके डैशबोर्ड पर एपीआई कीज़ स्क्रीन पर, की के ठीक बगल में मौजूद है। यह आपके द्वारा की जाने वाली हर कॉल में समान आईडी होती है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

curl -X POST https://api.zinndigital.com/v1/site-imports \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "source": <SiteImportSource>, "output": <SiteImportOutput>, "source_domain": <string> }'

साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें

विवरण

Starts a durable, resumable import workflow and returns the new job state, never a bare acknowledgement. A Wayback restore must name snapshot_day: the most recent capture of an expired domain is usually a parking page, so there is no safe default (422 without it). The output is either a static HTML document root or a WordPress import — both are supported and neither is a default. A site with an import already running returns 409. ⚠️ ownership_attested is recorded, not enforced: the platform's obligation here is to know who requested what. Requires hosting.import.manage.

पैरामीटर

नामप्रकारआवश्यकयह क्या है
Idempotency-Key (header)stringनहींClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

अनुरोध बॉडी

नामप्रकारआवश्यकयह क्या है
org_idUuidनहींWhich organisation this import belongs to. Only needed by an account that acts for more than one and is not naming a site_id — when a site is named, the site decides,…
sourceSiteImportSourceहाँWhere the content comes from. ⛔ Deliberately not the same enum as a site's source: that one records what a site was built from, for ever, while this selects a fetch strategy and…
outputSiteImportOutputहाँWhat the import produces. Both are supported; neither is a default.
source_domainstringहाँThe domain whose archive to restore, or — for archive_url — the URL of the archive to migrate in.
target_domainstringनहींThe domain the result is served on. Defaults to source_domain.
site_idUuidनहींRestore into an existing site. Omit to produce a bundle and choose the target later.
snapshot_daystringनहींWhich day's snapshot to restore. Required for wayback — the most recent capture of an expired domain is usually a parking page, so there is no safe default.
crawl_depthintegerनहीं
request_budgetintegerनहींThe hard ceiling on requests this job may make against the source. Bounded per job so one 400,000-capture domain cannot consume the platform's whole archive allowance.
ownership_attestedbooleanनहीं⚠️ The customer's assertion that they control the domain, recorded because it cannot be reconstructed afterwards. It is not a legal control and is not presented as one.

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
idUuidहाँUUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idstringनहींThe site this import lands on, or empty. Empty is a real outcome, not an error: an aged-domain restore produces a downloadable bundle and the customer picks the target afterwards.
sourceSiteImportSourceहाँWhere the content comes from. ⛔ Deliberately not the same enum as a site's source: that one records what a site was built from, for ever, while this selects a fetch strategy and…
outputSiteImportOutputहाँWhat the import produces. Both are supported; neither is a default.
statusSiteImportStatusहाँfetching and building are separate states rather than one running because they fail for opposite reasons and the customer's next action differs — a stall in fetching is…
status_reasonstringनहींA machine code the dashboard renders through its own catalogue — never an English sentence composed by the engine, which could not be shown to the other 57 locales.
source_domainstringहाँ
target_domainstringनहीं
snapshot_daystringनहीं
crawl_depthintegerनहीं
urls_totalintegerहाँ
urls_doneintegerहाँ
urls_failedintegerहाँ
detected_platformstringनहींWhat the archived site was built on, once the crawl has seen a page — the same codes as ArchivePlatform.platform. ⛔ Empty means not established, never plain HTML; the two…
pre_restore_backup_idstringनहींThe safety backup taken of the target site immediately before this restore overwrote it. ⚖️ Owner ruling 2026-09-08: a restore onto a site that already has content is gated behind…
progress_percentintegerहाँFor a progress bar only. The per-URL counters are the primary display, because a percentage cannot say which step.
requests_spentintegerहाँ
request_budgetintegerहाँ
budget_exhaustedbooleanहाँTrue when the job stopped because it ran out of requests. Surfaced deliberately — it otherwise looks identical to a job that finished, and the customer's next action depends on…
bundle_bytesintegerनहीं
created_atstringहाँ
started_atstringनहीं
finished_atstringनहीं
can_cancelbooleanहाँ

त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है

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