# How to have CURL command equivalent of triple quotes?

**URL:** <https://discuss.elastic.co/t/how-to-have-curl-command-equivalent-of-triple-quotes/248332>\
**Category:** Elasticsearch\
**Created:** [September 11, 2020, 1:27pm UTC](https://discuss.elastic.co/t/how-to-have-curl-command-equivalent-of-triple-quotes/248332 "2020-09-11T13:27:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [September 11, 2020, 1:27pm UTC](https://discuss.elastic.co/t/how-to-have-curl-command-equivalent-of-triple-quotes/248332/1 "2020-09-11T13:27:49Z")

</div>

hi,  
we have a watcher code which contains

```auto
  "actions": {
    "index_alert": {
        "transform": {
            "script": {
            "source": """
                return [
                'watch_id': ctx.watch_id,
                '@timestamp': ctx.execution_time,
                'scheduled_time': ctx.trigger.scheduled_time
                ]
              """,
            "lang": "painless"
            }

```

which works correctly if we do via Kibana DEV console.

But if the same code is part of CURL payload, it fails with below error due to Triple quotes

```auto
{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[56:23] [script] failed to parse object"}],"type":"x_content_parse_exception","reason":"[56:23] [script] failed to parse object","caused_by":{"type":"json_parse_exception","reason":"Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n a

```

How to ensure both CURL and Kibana DEV tools work with such scenarios?

---

<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 9, 2020, 1:27pm UTC](https://discuss.elastic.co/t/how-to-have-curl-command-equivalent-of-triple-quotes/248332/2 "2020-10-09T13:27:51Z")

</div>

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