Inserting site map

Use this API to insert site map in the site map list.

Requirement: OpenSearchServer v1.5

Call parameters

URL: /services/rest/index/{index_name}/crawler/web/sitemap

Method: PUT

HTTP Header:

  • Content-Type (required): application/json
  • Accept (optional returned type): application/json or application/xml

URL parameters:

  • index_name (required): The name of the index.
  • site_map_url (required): It's the url or the url's array injected in database.

Raw data (PUT):
An array of site map.


Success response

The patterns has been inserted.

HTTP code:

Content (application/json):

"successful": true,
"info": "2 patterns injected"

Error response

The insertion failed. The reason is provided in the content.

HTTP code:

Sample call

Using CURL:

curl -XPUT -H "Content-Type: application/json" \

Using jQuery:

type: "PUT",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/crawler/web/sitemap?site_map_url= console.log(data);

View/edit on GitHub