Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na sites.panel_access; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/sitemap \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
⛔ **`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`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
siteId (path) | Uuid | Oo | Site ID (UUIDv7). |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
frequency | string<always, hourly, daily, weekly, monthly, never, yearly> | Hindi | The `changefreq` written into the generated XML. A guideline to search engines, not a guarantee. |
upload | boolean | Hindi | Overwrite `sitemap.xml` in the webspace when the crawl finishes. |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
ever_run | boolean | Oo | Has a crawl ever been run for this site? |
running | boolean | Oo | 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 | Oo | The vendor's own job state, verbatim. Empty when none has run. |
created_at | string | Oo | When the most recent crawl started. Empty when none has run. |
output | string | Oo | The crawler's own output, if it produced any. |
upload | boolean | Oo | Whether the crawl writes `sitemap.xml` into the webspace. |
frequencies | string[] | Oo | The change frequencies this site's crawler accepts. |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 422 · 429 · 503