Start trial API | request body is required

Hello World!

I am trying to start trial by following Start Trial API | Elasticsearch Reference [6.3] | Elastic, yet running into following error:

# curl -X POST "localhost:9200/_license/start_trial?acknowledge=true&pretty"
{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "request body is required"
      }
    ],
    "type" : "parse_exception",
    "reason" : "request body is required"
  },
  "status" : 400
}
# 

Please advise.

Which version of Elasticsearch are you using? I.e. what does curl localhost:9200 report? I tried literally the same command on my local machine and it worked fine:

$ curl localhost:9200
{
  "name" : "node-0",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "ag49Av79S-6AR_sXF62Bvw",
  "version" : {
    "number" : "7.0.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "b7e28a7",
    "build_date" : "2019-04-05T22:55:32.697037Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
$ curl -X POST "localhost:9200/_license/start_trial?acknowledge=true&pretty"
{
  "acknowledged" : true,
  "trial_was_started" : true,
  "type" : "trial"
}

version is 6.3, here is my curl output:

# curl localhost:9200
{
  "name" : "x",
  "cluster_name" : "x",
  "cluster_uuid" : "x",
  "version" : {
    "number" : "6.3.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "053779d",
    "build_date" : "2018-07-20T05:20:23.451332Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
#

I followed Install Elasticsearch with Docker | Elasticsearch Reference [6.3] | Elastic prior starting trial.

Ah you've edited your original post which linked to the 7.0 documentation. The URI is different in 6.3: POST _xpack/license/start_trial?acknowledge=true.

Note that the 6.3 series is no longer maintained. If you're trying out new features, it'd be best to use the most recent version you can, either 7.0.1 (latest) or 6.7.2 (maintenance) at time of writing.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.