'Elastic search Analyse API response with error

I installed an Elastic Search Server (ES server), version 7.16.3, and I can't use (or play with) the analyse API mentioned here :

Test an analyser

I've got the response:

{
    "error": "Incorrect HTTP method for uri [/_analyse] and method [POST], allowed: [HEAD, PUT, GET, DELETE]",
    "status": 405
}

with their first request :

POST _analyze
{
  "analyzer": "whitespace",
  "text":     "The quick brown fox."
}

How do I make their example working on my local ES server ?



Solution 1:[1]

Correct endpoint for analyze API is localhost:9200/_analyze not localhost:9200/_analyse, and you are using the wrong name in the endpoint which is causing the issue.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1