hosting

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

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

Todos os endpoints de hosting

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

NomeTipoObrigatórioO que é
siteId (path)UuidSimSite ID (UUIDv7).

Corpo da requisição

NomeTipoObrigatórioO que é
blockedstring[]SimCrawler 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_txtbooleanNão
ip_denybooleanNão

Resposta

NomeTipoObrigatórioO que é
site_idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
policyCrawlerPolicySim
available_crawlersCrawlerCatalogEntry[]Sim
renderedCrawlerPolicyRenderedSimThe rendered rule artifacts for the worker / Zinn® plugin to write.
enforcementCrawlerEnforcementNãoWhether 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