# License extend

**URL:** <https://discuss.elastic.co/t/license-extend/70877>\
**Category:** Elasticsearch\
**Created:** [January 8, 2017, 1:53pm UTC](https://discuss.elastic.co/t/license-extend/70877 "2017-01-08T13:53:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssasporta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssasporta/32/13695_2.png) [@ssasporta](https://discuss.elastic.co/u/ssasporta)\
**Post date:** [January 8, 2017, 1:53pm UTC](https://discuss.elastic.co/t/license-extend/70877/1 "2017-01-08T13:53:06Z")

</div>

I downloaded an extend trail license that I received from Elastic and I am trying to install it on my Elasticsearch cluster.

I am getting an error and unable to do it.

```
mpswrk1@eaasrt!MPS:mpswrk1> curl -XPUT -u elastic:<pass> 'http://localhost:9200/_license' -d @license.json
Warning: Couldn't read data from file "license.json", this makes an empty
Warning: POST.
{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"parse_exception","reason":"Failed to derive xcontent"},"status":400}mpswrk1@eaasrt!MPS:mpswrk1>

```

Any idea?

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [January 8, 2017, 2:54pm UTC](https://discuss.elastic.co/t/license-extend/70877/2 "2017-01-08T14:54:05Z")

</div>

Hi Sharon,

Instead of `@license.json` in the command, you should refer to your license file name, which you downloaded, so it may look something like this:

```auto
curl -XPUT -u elastic:<pass> 'http://localhost:9200/_license' -d @/path/to/your/license_file_name.json

```

Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![ssasporta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssasporta/32/13695_2.png) [@ssasporta](https://discuss.elastic.co/u/ssasporta)\
**Post date:** [January 8, 2017, 3:17pm UTC](https://discuss.elastic.co/t/license-extend/70877/3 "2017-01-08T15:17:22Z")

</div>

That work.

So, I need to understand what does the \_license or \_xpack/license in the documents stand for?

I was thinking this is the path of the license file.

Thanks  
Sharon

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [January 8, 2017, 4:00pm UTC](https://discuss.elastic.co/t/license-extend/70877/4 "2017-01-08T16:00:41Z")

</div>

Great, glad that works!

In 5.0+, the API endpoint for specifying the license is /\_xpack/license, while in 2.x it is /\_license.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 5, 2017, 4:00pm UTC](https://discuss.elastic.co/t/license-extend/70877/5 "2017-02-05T16:00:54Z")

</div>

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