> For the complete documentation index, see [llms.txt](https://docs.bierbot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bierbot.com/developer-section/bricks-api/connecting-displays.md).

# Connecting displays

BierBot Bricks exposes an API to query information about your currently ongoing brews. You will get the brew name, current and target temperatures, and (if the next step is due after a set amount of time and the temperature was reached) the time until the the next action.

## Endpoint for getting statistics about currently running brews.

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

#### Request Body

| Name                                                        | Type   | Description                                                                                                 |
| ----------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------- |
| apikey<mark style="color:red;">\*</mark>                    | String | your API key as for all other Bricks                                                                        |
| type<mark style="color:red;">\*</mark>                      | String | always has to be `display`                                                                                  |
| brand<mark style="color:red;">\*</mark>                     | String | always has to be `oss`                                                                                      |
| version<mark style="color:red;">\*</mark>                   | String | version of the display software running                                                                     |
| chipid<mark style="color:red;">\*</mark>                    | String | A uniquie identifier for this Brick. Can be the chip ID or also any other unique and always permanent value |
| d\_object\_information\_0<mark style="color:red;">\*</mark> | String | Specifies the shape of your display. I.e. `4x20` for a typical 4 by 20 display.                             |

{% tabs %}
{% tab title="200: OK If everything was OK. Sample response body can be found below." %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

A sample response looks like this:

```
{
    "result": "success",
    "error": 0,
    "error_text": "",
    "warning": 0,
    "warning_text": "",
    "settings": {
        "temperatureUnit": "celsius",
        "displayBrewEveryS": 5,
        "showLocalIP": false
    },
    "brews": [
        {
            "currentTemperatureC": {
                "na": -273,
                "primary": 10,
                "secondary": -273,
                "hlt": -273,
                "mlt": -273
            },
            "id": "T1muylAbPsxkZ389ha1z",
            "name": "Pils (TILT)",
            "targetTemperatureC": 10,
            "nextEvents": [
                {
                    "timeRemainingS": 85587.428,
                    "type": "step"
                }
            ]
        },
        {
            "currentTemperatureC": {
                "na": -273,
                "primary": 11.06,
                "secondary": -273,
                "hlt": -273,
                "mlt": -273
            },
            "id": "DcfimLZm4PFMaTErounA",
            "name": "Pils (iSpindel + Steuerung)",
            "targetTemperatureC": 14,
            "nextEvents": []
        }
    ],
    "next_request_ms": 15000
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bierbot.com/developer-section/bricks-api/connecting-displays.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
