# Heartbeat Expression Body Content

**URL:** https://discuss.elastic.co/t/heartbeat-expression-body-content/309134
**Category:** Elastic Observability
**Created:** [July 7, 2022, 5:41pm UTC](https://discuss.elastic.co/t/heartbeat-expression-body-content/309134 "2022-07-07T17:41:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rossana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rossana/32/94216_2.png) [@Rossana](https://discuss.elastic.co/u/Rossana)
#### Post date: [July 7, 2022, 5:41pm UTC](https://discuss.elastic.co/t/heartbeat-expression-body-content/309134/1 "2022-07-07T17:41:12Z")

</div>

Hi,

I am trying to monitor an endpoint but I need check if in the json response body exists this expression: **"status":"Success"** or only the word **"Success"** at least.

This is my test:

Json Response:

```auto
{
    "latest_run": {
        "id": "202207070400044877",
        "name": "202207070400044877",
        "status": "Success",
        "start_time": "2022-07-07T04:00:04.4877111Z",
        "end_time": "2022-07-07T04:02:32.5619149Z",
        "duration": "00:02:28.0742038",
        "output_url": "url",
        "error_url": null,
        "url": "url",
        "job_name": "AppCargaRFC",
        "trigger": "Schedule - 0 0 4 * * *"
    },
    "history_url": "url",
    "scheduler_logs_url": "log_url",
    "name": "AppCargaRFC",
    "run_command": "AppCargaRFC.exe",
    "url": "url",
    "extra_info_url": "url",
    "type": "triggered",
    "error": null,
    "using_sdk": false,
    "settings": {
        "schedule": "0 0 4 * * *"
    }
}

```

This is my configuration:

```auto
- type: http
  id: estado
  name: appportal
  schedule: '@every 180s'
  hosts: ["url"]
  username: "$AppPortal"
  password: "blablabla"
  check.request:
    method: GET
  check.response:
    status: [200]
    json:
      - description: check status
        expression: '"Success"'

```

An this was the error.message form elastic:

```
json:
  - description: check status
    expression: '"Success"'

```

`JSON body did not match 1 expressions or conditions 'rule 'check status'("Success") not matched.'. Received JSON...`

```auto
  json:
      - description: check status
        expression: '"status": "Success"'

```

`job could not be initialized: could not load JSON check: could not compile gval expression '"status": "Success"': parsing error: "status": "Success"	:1:9 - 1:10 unexpected ":" while scanning operator`

**Could you help me. Pls!** 😬

---

<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: [November 4, 2022, 8:36am UTC](https://discuss.elastic.co/t/heartbeat-expression-body-content/309134/2 "2022-11-04T08:36:09Z")

</div>


