> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Metric Entries

> Documentation for the Search Metric Entries action for Healthie

![images/healthie.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/healthie.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=d168a24dbae69f2202ca63dd7aa2e1f3)

# Parameters

**Action** `Parameters`

**parameters**

**Patient ID** `string` *required*

`ID`
This field maps to the destination API `patient_id` field.

**Description** `string` *required*

This field maps to the destination API `description` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "metric_entries": [
      {
        "added_by_user": "901234",
        "category": "Breakfast",
        "created_at": "2023-04-01T14:30:00Z",
        "description": "Banana and protein smoothie after workout",
        "emotions": "Happy",
        "id": "890123",
        "name": "Morning Smoothie",
        "type": "FoodEntry",
        "value": 450
      }
    ]
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "metric_entries": {
      "added_by_user": "ID of user that added the entry",
      "category": "The category of this entry",
      "created_at": "The time at which this entry was created",
      "description": "The description for the entry",
      "emotions": "The users emotions towards the meal",
      "id": "The unique identifier of the entry",
      "name": "The name for this entry",
      "type": "The type for this entry, options are - FoodEntry, WorkoutEntry, MirrorEntry, SleepEntry, NoteEntry, WaterIntakeEntry, PoopEntry', null: false",
      "value": "The `metric_stat` value of the metric entry"
    }
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**MetricEntries** `Fetch Action Response Object`

**fields**

**metric\_entries** `[]object` *required*

List of metric entries

```json CEL theme={null}
$result_object_key.metric_entries
```

```json Example theme={null}
[
{
"added_by_user": "901234",
"category": "Breakfast",
"created_at": "2023-04-01T14:30:00Z",
"description": "Banana and protein smoothie after workout",
"emotions": "Happy",
"id": "890123",
"name": "Morning Smoothie",
"type": "FoodEntry",
"value": 450
}
]
```

**metric\_entries.map(x, x.id)** `[]string` *required*

Mapped array of: The unique identifier of the entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.id)
```

```json Example theme={null}
[
"890123"
]
```

**metric\_entries.map(x, x.type)** `[]string` *required*

Mapped array of: The type for this entry, options are - FoodEntry, WorkoutEntry, MirrorEntry, SleepEntry, NoteEntry, WaterIntakeEntry, PoopEntry', null: false

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.type)
```

```json Example theme={null}
[
"FoodEntry"
]
```

**metric\_entries.map(x, x.added\_by\_user)** `[]string` *required*

Mapped array of: ID of user that added the entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.added_by_user)
```

```json Example theme={null}
[
"901234"
]
```

**metric\_entries.map(x, x.category)** `[]string` *required*

Mapped array of: The category of this entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.category)
```

```json Example theme={null}
[
"Breakfast"
]
```

**metric\_entries.map(x, x.emotions)** `[]string` *required*

Mapped array of: The users emotions towards the meal

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.emotions)
```

```json Example theme={null}
[
"Happy"
]
```

**metric\_entries.map(x, x.name)** `[]string` *required*

Mapped array of: The name for this entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.name)
```

```json Example theme={null}
[
"Morning Smoothie"
]
```

**metric\_entries.map(x, x.description)** `[]string` *required*

Mapped array of: The description for the entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.description)
```

```json Example theme={null}
[
"Banana and protein smoothie after workout"
]
```

**metric\_entries.map(x, x.created\_at)** `[]timing.v1.Timestamp` *required*

Mapped array of: The time at which this entry was created

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.created_at)
```

```json Example theme={null}
[
"2023-04-01T14:30:00Z"
]
```

**metric\_entries.map(x, x.value)** `[]float64 (double)` *required*

Mapped array of: The `metric_stat` value of the metric entry

```json CEL theme={null}
$result_object_key.metric_entries.map(x, x.value)
```

```json Example theme={null}
[
450
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.