Sitemaps

Get a Sitemap’s Index

Required scope: public-api:read

Description

This endoint returns a sitemap index containing links to individual sitemap files. The Sitemap Guide explains how to setup sitemaps for a Livingdocs delivery.

Use Cases
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://server.livingdocs.io/api/v1/sitemaps/index?baseUrl=https://livingdocs.io" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET api/v1/sitemaps/index

Parameters

NameTypeRequiredNotes
:baseUrlstringxBase url of the delivery host. Example: ?baseUrl=https://livingdocs.io/
:contentTypesstringA comma-separated list of contentTypes to include in the sitemap. Example: ?contentTypes=regular,pages
:entriesPerPagestringOptional sitemap entry page size. Default 20000

Response

200
OK
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.livingdocs.io/sitemap.2020-01.xml</loc>
    <lastmod>2020-01-31T22:54:23.125Z</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.livingdocs.io/sitemap.2020-02.xml</loc>
    <lastmod>2020-02-29T21:07:31.544Z</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.livingdocs.io/sitemap.2020-02.2.xml</loc>
    <lastmod>2020-02-29T21:07:31.544Z</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.livingdocs.io/sitemap.2020-02.3.xml</loc>
    <lastmod>2020-02-29T21:07:31.544Z</lastmod>
  </sitemap>
</sitemapindex>

Get a Sitemap’s Entries

Required scope: public-api:read

Description

Use Cases
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://server.livingdocs.io/api/v1/sitemaps/entries?baseUrl=https://livingdocs.io&date=2021-05" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET api/v1/sitemaps/entries

Parameters

NameTypeRequiredNotes
:baseUrlstringxBase url of the delivery host. Example: ?baseUrl=https://livingdocs.io/
:datestringxDate for the specific month matching the schema from the sitemap index file. Example: ?date=2021-06 or ?date=2021-06.2
:contentTypesstringA comma-separated list of contentTypes to include in the sitemap. Example: ?contentTypes=regular,pages
:entriesPerPagestringOptional sitemap entry page size. Default 20000

Response

200
OK
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.livingdocs.io/category/title-li.1</loc>
    <lastmod>2021-05-01T04:56:50.276Z</lastmod>
  </url>
  <url>
    <loc>https://www.livingdocs.io/category/title-li.2</loc>
    <lastmod>2021-05-01T05:35:32.920Z</lastmod>
  </url>
</urlset>