hosting
PUT /v1/sites/{siteId}/crawler-policy
Set a site's SEO-crawler-blocking policy.
Doğrulama
API açarını bearer token kimi göndərin. Açar sites.crawler.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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[]> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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`.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
siteId (path) | Uuid | Bəli | Site ID (UUIDv7). |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
blocked | string[] | Bəli | Crawler 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_txt | boolean | Xeyr | — |
ip_deny | boolean | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
site_id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
policy | CrawlerPolicy | Bəli | — |
available_crawlers | CrawlerCatalogEntry[] | Bəli | — |
rendered | CrawlerPolicyRendered | Bəli | The rendered rule artifacts for the worker / Zinn® plugin to write. |
enforcement | CrawlerEnforcement | Xeyr | Whether 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… |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 422 · 429