# 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 %}
