hosting

PUT /v1/sites/{siteId}/crawler-policy

Set a site's SEO-crawler-blocking policy.

Semua titik akhir hosting

Autentikasi

Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin sites.crawler.manage; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.

Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.

Coba

Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/crawler-policy \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "blocked": <string[]> }'

Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API

Detail

Set which SEO crawlers to block (`blocked` is a list of crawler keys from the catalog). An unknown key is a `422`; a search engine has no key, so it can never be blocked. Publishes `site.crawler_policy_changed` so the server-level rules are re-written. Requires `sites.crawler.manage`.

Parameter

NamaJenisWajibTentang apa ini
siteId (path)UuidYaSite ID (UUIDv7).

Isi permintaan

NamaJenisWajibTentang apa ini
blockedstring[]YaCrawler keys to block (from the catalog's `available_crawlers`). An unknown key is a 422; a search engine has no key and can never be blocked.
robots_txtbooleanTidak
ip_denybooleanTidak

Tanggapan

NamaJenisWajibTentang apa ini
site_idUuidYaUUIDv7 identifier — sortable by creation time (docs/02 §8).
policyCrawlerPolicyYa
available_crawlersCrawlerCatalogEntry[]Ya
renderedCrawlerPolicyRenderedYaThe rendered rule artifacts for the worker / Zinn® plugin to write.
enforcementCrawlerEnforcementTidakWhether the stored crawler policy is actually a rule on a web server, and if not why not (#1954, D8300). ⛔ These are two different questions and collapsing them is the defect th…

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 403 · 404 · 422 · 429