Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso sites.panel_access; una clave que no lo tenga se rechazará con un código 403, no 404.
Este endpoint no requiere ningún id de organización. Su clave ya identifica la organización a la que pertenece, y la respuesta está delimitada a ella.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/sitemap \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
⛔ **`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`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
siteId (path) | Uuid | Sí | Site ID (UUIDv7). |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
frequency | string<always, hourly, daily, weekly, monthly, never, yearly> | No | The `changefreq` written into the generated XML. A guideline to search engines, not a guarantee. |
upload | boolean | No | Overwrite `sitemap.xml` in the webspace when the crawl finishes. |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
ever_run | boolean | Sí | Has a crawl ever been run for this site? |
running | boolean | Sí | 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 | Sí | The vendor's own job state, verbatim. Empty when none has run. |
created_at | string | Sí | When the most recent crawl started. Empty when none has run. |
output | string | Sí | The crawler's own output, if it produced any. |
upload | boolean | Sí | Whether the crawl writes `sitemap.xml` into the webspace. |
frequencies | string[] | Sí | The change frequencies this site's crawler accepts. |
Errores que este endpoint puede devolver
401 · 403 · 404 · 422 · 429 · 503