Skip to content
AlexandreToyer edited this page Sep 30, 2013 · 5 revisions

Use this API to check if a list of synonyms exists

Requirement: OpenSearchServer v1.5

Call parameters

URL: /services/rest/index/{index_name}/synonyms/{list_name}

Method: HEAD

URL parameters:

  • index_name (required): The name of the index.
  • list_name (required): The name of the list to check.

Success response

Returns HTTP code 200 if list exist, 404 otherwise.

Error response

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

HTTP code: 500

Sample call

Using CURL:

curl -XHEAD http://localhost:8080/services/rest/index/my_index/synonyms/my_list

Using jQuery:

$.ajax({ 
   type: "HEAD",
   dataType: "json",
   url: "http://localhost:8080/services/rest/index/my_index/synonyms/my_list"
}).done(function (data) {
   console.log(data);
});

Clone this wiki locally