hosting

POST /v1/sites/{siteId}/sitemap

Start a sitemap crawl.

Всички крайни точки в hosting

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.panel_access; ключ без него се отхвърля с 403, а не с 404.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/sitemap \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

⛔ **`202`, and the returned state describes a job that has STARTED.** A crawler walks the whole site and may take minutes; the sitemap does not exist when this returns. Poll `getSiteSitemap` until `running` is false. Answering `200` here would be the status-code equivalent of telling the customer their sitemap is ready. `upload` writes `sitemap.xml` into the webspace, overwriting any existing file. Requires `sites.panel_access`.

Параметри

ИмеТипЗадължителноКакво представлява
siteId (path)UuidДаSite ID (UUIDv7).

Тяло на заявката

ИмеТипЗадължителноКакво представлява
frequencystring<always, hourly, daily, weekly, monthly, never, yearly>НеThe `changefreq` written into the generated XML. A guideline to search engines, not a guarantee.
uploadbooleanНеOverwrite `sitemap.xml` in the webspace when the crawl finishes.

Отговор

ИмеТипЗадължителноКакво представлява
ever_runbooleanДаHas a crawl ever been run for this site?
runningbooleanДаIs a crawl in progress? ⛔ Computed as *not in a terminal state*, so a state we have never seen reads as still working rather than as finished.
statestringДаThe vendor's own job state, verbatim. Empty when none has run.
created_atstringДаWhen the most recent crawl started. Empty when none has run.
outputstringДаThe crawler's own output, if it produced any.
uploadbooleanДаWhether the crawl writes `sitemap.xml` into the webspace.
frequenciesstring[]ДаThe change frequencies this site's crawler accepts.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429 · 503