# ECE setName API do not support Chinese Character

**URL:** https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016
**Category:** Elastic Cloud Enterprise (ECE)
**Created:** [January 28, 2019, 3:04pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016 "2019-01-28T15:04:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rockybean](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rockybean/32/11443_2.png) [@rockybean](https://discuss.elastic.co/u/rockybean)
#### Post date: [January 28, 2019, 3:04pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/1 "2019-01-28T15:04:56Z")

</div>

Hi,

I'm testing ece api and try to update a deployment name by usign setName API.

[https://www.elastic.co/guide/en/cloud-enterprise/1.0/set-es-cluster-name.html](https://www.elastic.co/guide/en/cloud-enterprise/1.0/set-es-cluster-name.html)

But if I use Chinese words for new cluster name, this call will fail like below.

```
curl --request PUT --url https://x.x.x.x/api/v1/clusters/elasticsearch/9568df05c3a249b6b98e3bca425eb8db/metadata/name/%E4%B8%AD%E6%96%87%E5%90%8D%E7%A7%B0 

```

The new cluster name is 中文名称.

The response is as below:

```
    {
      "errors": [
        {
          "code": "root.method_not_allowed",
          "message": "HTTP method not allowed, supported methods: [GET]"
        }
      ]
    }

```

I think this should be a url path parameter decode problem and post here to let you guys know.

In addition, I know I can get this done by using set cluster metadata api but I have to get cluster metadata first which is a little redundant.

---

<div class="post-metadata">

### Author: ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)
#### Post date: [January 28, 2019, 3:19pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/2 "2019-01-28T15:19:38Z")

</div>

Interesting, thanks for the report

I think from 2.0 you can use this endpoint to update the name: [https://www.elastic.co/guide/en/cloud-enterprise/current/update-es-cluster-metadata-settings.html](https://www.elastic.co/guide/en/cloud-enterprise/current/update-es-cluster-metadata-settings.html) (and that in fact will be our recommended method, the `set-name` is going to get deprecated at some point)

Alex

---

<div class="post-metadata">

### Author: ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)
#### Post date: [January 28, 2019, 3:21pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/3 "2019-01-28T15:21:24Z")

</div>

Oh I just noticed you addressed the `set cluster metadata` but you said:

> but I have to get cluster metadata first which is a little redundant.

which isn't true, just

`curl -XPATCH -H <headers> $url -d { "name": "<json encoding of name>" }` should work?

---

<div class="post-metadata">

### Author: ![rockybean](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rockybean/32/11443_2.png) [@rockybean](https://discuss.elastic.co/u/rockybean)
#### Post date: [January 28, 2019, 3:24pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/4 "2019-01-28T15:24:44Z")

</div>

Seem not work.

```
curl --request PATCH \
  --url https://x.x.x.x/api/v1/clusters/elasticsearch/9568df05c3a249b6b98e3bca425eb8db/metadata/raw \

  --data '{
    "name": "中文集"
}'

```

This got following response.

```
{
  "errors": [
    {
      "code": "root.method_not_allowed",
      "message": "HTTP method not allowed, supported methods: [GET]"
    }
  ]
}
```

---

<div class="post-metadata">

### Author: ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)
#### Post date: [January 28, 2019, 3:25pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/5 "2019-01-28T15:25:58Z")

</div>

That's the `raw` endpoint, you don't want to go anywhere near that 🙂

`https://x.x.x.x/api/v1/clusters/elasticsearch/9568df05c3a249b6b98e3bca425eb8db/metadata/settings`

is what you want

---

<div class="post-metadata">

### Author: ![rockybean](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rockybean/32/11443_2.png) [@rockybean](https://discuss.elastic.co/u/rockybean)
#### Post date: [January 28, 2019, 3:27pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/6 "2019-01-28T15:27:19Z")

</div>

Big thanks!

This works!

---

<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 11, 2019, 3:27pm UTC](https://discuss.elastic.co/t/ece-setname-api-do-not-support-chinese-character/166016/7 "2019-02-11T15:27:30Z")

</div>

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