ai
PUT /v1/ai/site-builds/{siteBuildId}/files
Replace one generated file's contents.
Autentifikimi
Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen sites.create; një çelës pa të refuzohet me 403, jo 404.
Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
curl -X PUT https://api.zinndigital.com/v1/ai/site-builds/{siteBuildId}/files \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "path": <string>, "content": <string> }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
Writes `content` to `path` in this draft, creating the file if it does not exist. Adding `robots.txt` to a generated site is the same act as correcting `index.html`, so both are allowed; the size and file-count caps are what bound it. The path goes through the same validator the builder's own output does — relative, no traversal, and a suffix a static host will serve and that cannot execute on our side. Images cannot be edited here because they are not text. **Refused on a published build** (`published`). A published draft's files are what visitors are seeing; editing them here would make the record disagree with the live site silently, until somebody republished for an unrelated reason. Requires `sites.create`.
Parametrat
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
siteBuildId (path) | Uuid | Po | — |
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
path | string | Po | Relative path inside the generated site, e.g. `index.html`. |
content | string | Po | The file's complete new contents. May be empty. |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
build | SiteBuild | Po | One "describe a site and we build it" run. `files` is present on the **detail** and create responses and absent from the **list**, deliberately: a generated tree can be a hundre… |
trial | SiteBuilderTrial | Jo | The **one-time** free allowance for the AI site builder. One grant per organization, for ever — not monthly, and not per site. `granted` is true because the credit was actually… |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 404 · 422 · 429