hosting

POST /v1/sites/{siteId}/sitemap

Start a sitemap crawl.

Tất cả các điểm cuối hosting

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.panel_access; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

⛔ **`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`.

Tham số

TênLoạiBắt buộcNội dung này là gì
siteId (path)UuidSite ID (UUIDv7).

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
frequencystring<always, hourly, daily, weekly, monthly, never, yearly>KhôngThe `changefreq` written into the generated XML. A guideline to search engines, not a guarantee.
uploadbooleanKhôngOverwrite `sitemap.xml` in the webspace when the crawl finishes.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
ever_runbooleanHas a crawl ever been run for this site?
runningbooleanIs 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.
statestringThe vendor's own job state, verbatim. Empty when none has run.
created_atstringWhen the most recent crawl started. Empty when none has run.
outputstringThe crawler's own output, if it produced any.
uploadbooleanWhether the crawl writes `sitemap.xml` into the webspace.
frequenciesstring[]The change frequencies this site's crawler accepts.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 422 · 429 · 503