# Dev console: max string length - 1996 characters?

**URL:** https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304
**Category:** Kibana
**Created:** [September 5, 2019, 6:09pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304 "2019-09-05T18:09:30Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [September 5, 2019, 6:09pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/1 "2019-09-05T18:09:30Z")

</div>

I just encountered a weird issue - the length of the string you can submit on the dev console is limited:

```auto
PUT my_index/_doc/1
{
  "text": """..............<max text length = 1996 chars>............."""
}

```

If the text length is longer than 1996 chars, then the following error occurs:

```auto
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "child \"method\" fails because [\"method\" must be one of [HEAD, GET, POST, PUT, DELETE]]. child \"path\" fails because [\"path\" is not allowed to be empty]",
  "validation": {
    "source": "query",
    "keys": [
      "method",
      "path"
    ]
  }
}

```

Expected behavior?

Thanks!

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [September 5, 2019, 7:52pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/2 "2019-09-05T19:52:47Z")

</div>

You need to properly escape the quotes with a backslash:

```auto
PUT my_index/_doc/1
{
  "text": "\"\"..............<max text length = 1996 chars>.............\"\""
}

```

---

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [September 5, 2019, 7:56pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/3 "2019-09-05T19:56:11Z")

</div>

fyi: no need to escape, when a string is surrounded by `"""`

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [September 5, 2019, 8:14pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/4 "2019-09-05T20:14:23Z")

</div>

That is not valid JSON.

---

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [September 5, 2019, 8:16pm UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/5 "2019-09-05T20:16:53Z")

</div>

Did I say, the JSON was valid? 🙂  
This syntax is supported by Kibana, but apparently not for long strings.

---

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [September 6, 2019, 5:56am UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/6 "2019-09-06T05:56:14Z")

</div>

does it make sense to open a github ticket? Since the response panel can display long strings surrounded by `"""`, it would be good, if the command panel could digest the same data too, as 2k limit is quite small.

---

<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: [October 4, 2019, 5:56am UTC](https://discuss.elastic.co/t/dev-console-max-string-length-1996-characters/198304/7 "2019-10-04T05:56:16Z")

</div>

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