احراز هویت
یک کلید 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 زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول 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). |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
frequency | string<always, hourly, daily, weekly, monthly, never, yearly> | خیر | The `changefreq` written into the generated XML. A guideline to search engines, not a guarantee. |
upload | boolean | خیر | Overwrite `sitemap.xml` in the webspace when the crawl finishes. |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
ever_run | boolean | بله | Has a crawl ever been run for this site? |
running | boolean | بله | 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. |
state | string | بله | The vendor's own job state, verbatim. Empty when none has run. |
created_at | string | بله | When the most recent crawl started. Empty when none has run. |
output | string | بله | The crawler's own output, if it produced any. |
upload | boolean | بله | Whether the crawl writes `sitemap.xml` into the webspace. |
frequencies | string[] | بله | The change frequencies this site's crawler accepts. |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 404 · 422 · 429 · 503