# Read API

There are many types of reads possible based on the type of data.

## Read Device Value from IoT Device

<mark style="color:blue;">`GET`</mark> `http://app.openioe.in/api/showdevicevalue`

**Format:** <http://app.openioe.in/api/_showdevicevalue/\\><APIKey>/\<DeviceID>/\<DevicePIN>\_

#### Path Parameters

| Name                                           | Type    | Description                 |
| ---------------------------------------------- | ------- | --------------------------- |
| \<DevicePin><mark style="color:red;">\*</mark> | Integer | e.g.,: 957                  |
| \<DeviceID><mark style="color:red;">\*</mark>  | Integer | e.g.,: 25                   |
| \<APIKey><mark style="color:red;">\*</mark>    | String  | e.g.,: pnHEmHgjFl0PT247Eae9 |

{% tabs %}
{% tab title="200: OK Successfully returned value from read API" %}
Read API:&#x20;

```
http://app.gnanodaya.org/openioe/api/showdevicevalue/pnHEmHgjFl0PT247Eae9/25/957
```

Response:

```
29.70
```

{% endtab %}
{% endtabs %}

## Read Device JSON from IoT Device

<mark style="color:blue;">`GET`</mark> `http://app.openioe.in/api/showdevicejson`

**Format:** <http://app.openioe.in/api/_showdevicejson/\\><APIKey>/\<DeviceID>/\<DevicePIN>\_

#### Path Parameters

| Name                                           | Type    | Description                 |
| ---------------------------------------------- | ------- | --------------------------- |
| \<DevicePin><mark style="color:red;">\*</mark> | Integer | e.g.,: 634                  |
| \<DeviceID><mark style="color:red;">\*</mark>  | Integer | e.g.,: 28                   |
| \<APIKey><mark style="color:red;">\*</mark>    | String  | e.g.,: pnHEmHgjFl0PT247Eae9 |

{% tabs %}
{% tab title="200: OK Successfully returned JSON from read API" %}
Read API:

```
http://app.gnanodaya.org/openioe/api/showdevicejson/pnHEmHgjFl0PT247Eae9/28/634 
```

Response:

```
{}
```

{% endtab %}
{% endtabs %}

## Read Device XML from IoT Device

<mark style="color:blue;">`GET`</mark> `http://app.openioe.in/api/showdevicexml`

**Format:** <http://app.openioe.in/api/_showdevicexml/\\><APIKey>/\<DeviceID>/\<DevicePIN>\_

#### Path Parameters

| Name                                           | Type    | Description                 |
| ---------------------------------------------- | ------- | --------------------------- |
| \<APIKey><mark style="color:red;">\*</mark>    | String  | e.g.,: pnHEmHgjFl0PT247Eae9 |
| \<DeviceID><mark style="color:red;">\*</mark>  | Integer | e.g.,: 25                   |
| \<DevicePin><mark style="color:red;">\*</mark> | Integer | e.g.,: 957                  |

{% tabs %}
{% tab title="200: OK " %}
Read API:&#x20;

```
http://app.gnanodaya.org/openioe/api/showdevicxml/pnHEmHgjFl0PT247Eae9/25/957
```

Response:

```
<data>29.70</data>
```

{% endtab %}
{% endtabs %}


---

# 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://doc.openioe.in/api-references/read-api.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.
