hosting
POST /v1/sites/{siteId}/sitemap
Start a sitemap crawl.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה 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