Dev console: max string length - 1996 characters?

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

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:

  "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": [

Expected behavior?


You need to properly escape the quotes with a backslash:

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

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

That is not valid JSON.

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

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.

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