hosting
PUT /v1/sites/{siteId}/crawler-policy
Set a site's SEO-crawler-blocking policy.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.crawler.manage; uma chave sem ela é recusada com 403, e não 404.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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[]> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
siteId (path) | Uuid | Sim | Site ID (UUIDv7). |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
blocked | string[] | Sim | 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 | Não | — |
ip_deny | boolean | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
site_id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
policy | CrawlerPolicy | Sim | — |
available_crawlers | CrawlerCatalogEntry[] | Sim | — |
rendered | CrawlerPolicyRendered | Sim | The rendered rule artifacts for the worker / Zinn® plugin to write. |
enforcement | CrawlerEnforcement | Não | 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… |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422 · 429