# Brew Sessions

## Search All My Brew Sessions

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/brewsessions`

This endpoint allows you to get your brew sessions.

#### Query Parameters

| Name               | Type   | Description                                                                                                                   |
| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| group\_id          | string | Group ID                                                                                                                      |
| brewer\_author\_id | string | Brewer Author ID                                                                                                              |
| sort               | string | <p>created\_at, updated\_at or batchcode<br><strong>Formatted:</strong> created\_at:1 for ASC and created\_at:-1 for DESC</p> |
| id                 | number | Brew Session id                                                                                                               |
| folder\_id         | number | Brew Session folder id                                                                                                        |
| keyword            | string | Searches brew session batch and phase                                                                                         |
| updated\_from      | string | <p>Brew Sessions updated date start in the format<br>YYYY-MM-DD</p>                                                           |
| updated\_to        | string | <p>Brew Sessions updated date end in the format <br>YYYY-MM-DD</p>                                                            |
| created\_from      | string | <p>Brew Sessions created date start in the format <br>YYYY-MM-DD</p>                                                          |
| created\_to        | string | <p>Brew Sessions created date end in the format <br>YYYY-MM-DD</p>                                                            |
| limit              | number | Defaults to 20                                                                                                                |
| offset             | number | Defaults to 0                                                                                                                 |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 Brew Session successfully retrieved." %}

```javascript
{
  "message": "success",
  "count": "66",
  "brewsessions": [
    {
      "id": "196351",
      "loginid": "119823",
      "recipeid": "578357",
      "folder_id": null,
      "brewstepprofileid": "1",
      "phase": "Planning",
      "userdate": "2019-06-17",
      "batchcode": "00009",
      "chillmethod": "Plate Chiller",
      "mash_water_unit": null,
      "totalwater": "290.211",
      "starting_mash_thickness": null,
      "userunit": "metric",
      "equipment_profile_id": "119209",
      "waterprofile_volume": null,
      "waterprofile_dilution": null,
      "waterprofile_selected": null,
      "waterprofilesource_selected": null,
      "source_ca": null,
      "source_mg": null,
      "source_so4": null,
      "source_na": null,
      "source_cl": null,
      "source_hco3": null,
      "target_ca": null,
      "target_mg": null,
      "target_so4": null,
      "target_na": null,
      "target_cl": null,
      "target_hco3": null,
      "addition_caco3": null,
      "addition_nahco3": null,
      "addition_caso4": null,
      "addition_cacl2": null,
      "addition_mgso4": null,
      "addition_nacl": null,
      "deleted": "0",
      "updated_at": "2019-06-17 21:45:30",
      "created_at": "2019-06-17 15:45:30",
      "session_notes": null,
      "tilt_active": "0",
      "tilt_color": null,
      "tilt_updated": null,
      "addition_mgcl2": null,
      "addition_caoh2": null,
      "addition_naoh": null,
      "folder_name": null,
      "recipe_title": "Big IPA",
      "device_reading": "{\"last_reading\":{\"SG\":\"1.050\",\"Temp\":\"60.0\",\"Color\":\"RED\",\"Timepoint\":\"43306.54155361111\",\"Beer\":\"IPA Test\",\"Comment\":\"Better comment\"}}",
      "device_updated_at": "2019-06-28 16:29:01",
      "device_active": null,
      "device_id": "58"
    }
  ]
}
```

{% endtab %}

{% tab title="401 Could not find a cake matching this query." %}

```javascript
{
    "message": "unauthorized",
    "detail": "invalid api key"
}
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/brewsessions`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 " %}

```javascript
current_stats
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes`

#### Query Parameters

| Name | Type   | Description                                                                                              |
| ---- | ------ | -------------------------------------------------------------------------------------------------------- |
| sort | string | <p>created\_at, updated\_at or title<br>Formatted: created\_at:1 for ASC and created\_at:-1 for DESC</p> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/recipes`

#### Query Parameters

| Name | Type   | Description                                                                                              |
| ---- | ------ | -------------------------------------------------------------------------------------------------------- |
| sort | string | <p>created\_at, updated\_at or title<br>Formatted: created\_at:1 for ASC and created\_at:-1 for DESC</p> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

```javascript
curl -H "X-API-Key: 535ad06757dd29bd83be1e635ec10530407a8XAVTX" \
https://api.brewersfriend.com/v1/brewsessions
```

## Get One Brew Session

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/brewsessions/:brew_session_id`

This endpoint allows you to get one brew session.  Replace *:brew\_session\_id* with the brew session id.

#### Path Parameters

| Name              | Type   | Description     |
| ----------------- | ------ | --------------- |
| brew\_session\_id | number | Brew Session id |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "message": "success",
  "count": "1",
  "brewsessions": [
    {
      "id": "196351"
      ...,
      "current_stats": {
        "og": 17.5,
        "og_unit": "P",
        "fg": 1.012,
        "fg_unit": "G",
        "abv": 7.86908202907592,
        "abv_alt": 8.269363738779216,
        "ph": "",
        "temp": "",
        "temp_unit": "F",
        "updated": "2020-08-12T17:45:09+00:00"
      },
      "recipe": {
        "id": "578357",
        ...
      }
    }
  ]
}
```

{% endtab %}
{% endtabs %}

```javascript
curl -H "X-API-Key: 535ad06757dd29bd83be1e635ec10530407a8XAVTX" \
https://api.brewersfriend.com/v1/brewsessions/196351
```

## Get Brew Session Logs

<mark style="color:blue;">`GET`</mark> `https://api.brewersfriend.com/v1/brewsessions/:brew_session_id/logs`

This endpoint allows you to get a brew sessions logs.  Replace *:brew\_session\_id* with the brew session id.

#### Path Parameters

| Name              | Type   | Description     |
| ----------------- | ------ | --------------- |
| brew\_session\_id | number | Brew Session id |

#### Headers

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| X-API-KEY | string | Your API key. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "message": "success",
  "count": "1",
  "brewsessions": [
    {
      "id": "196351"
      ...,
      "current_stats": {
        "og": 17.5,
        "og_unit": "P",
        "fg": 1.012,
        "fg_unit": "G",
        "abv": 7.86908202907592,
        "abv_alt": 8.269363738779216,
        "ph": "",
        "temp": "",
        "temp_unit": "F",
        "updated": "2020-08-12T17:45:09+00:00"
      },
      "recipe": {
        "id": "578357",
        ...
      }
    }
  ]
}
```

{% endtab %}
{% endtabs %}

```javascript
curl -H "X-API-Key: 535ad06757dd29bd83be1e635ec10530407a8XAVTX" \
https://api.brewersfriend.com/v1/brewsessions/196351/logs
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brewersfriend.com/api/brew-sessions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
