Skip to main content

updateSitemap

Update the sitemap of the project. 🔐 This method requires authorization.

Description

This method updates the sitemap of the project, regenerating it based on the current page structure. It returns a Promise that resolves to an array of updated ISitemapEntity objects.

Sitemap.updateSitemap(

body*, body.baseUrls, body.url, body.lastmod, body.changefreq, body.priority

);

Parameters schema

Schema

body(required): ISitemapQuery
Sitemap body params (e.g. { baseUrls: { en_US: "https://…" } })

body.baseUrls: Record<string, string>
Base URLs per language for sitemap generation.
example: { "en_US": "https://example.com/" }

body.url: string
URL of a single sitemap entry.

body.lastmod: string
Last modification date of the entry.

body.changefreq: string
Frequency of changes for the entry.

body.priority: number
Priority of the entry.

Examples

Minimal example


const body = [
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
}
];

const response = await Sitemap.updateSitemap(body);

Example response

[
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
},
{
"url": "https://your-project.oneentry-cloud.com/catalog",
"lastmod": "2025-05-15T00:00:00.000Z",
"changefreq": "weekly",
"priority": 0.8
}
]

Response schema

Schema: ISitemapEntity[]

url: string
The full URL of the page.
example: "https://your-project.oneentry-cloud.com/catalog"

lastmod: string
Date when the page was last modified (ISO 8601 format).
example: "2025-06-01T00:00:00.000Z"

changefreq: string
How frequently the page is likely to change. Possible values: "always", "hourly", "daily", "weekly", "monthly", "yearly", "never".
example: "weekly"

priority: number
The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0.
example: 0.8