# Usage Examples

**How to Use The Examples**

1. Replace \`xxxxxxxxxxxxxxxxxxxx\` with your valid token.
2. Replace \`xxxxxxxxxx\` in \`fcdt\` and \`tcdt\` with your desired start and end time respectively in 10 digit unix timestamp format.
3. If you are accessing data for a specific entity, replace \`xxxxxxxxxxxxxxxxxx\` in \`siteid\` with your entity ID. Support Article here:  [https://minnovation.com.au/knowledge-base/how-to-find-the-id-of-an-entity-in-alphax/ ](https://minnovation.com.au/knowledge-base/how-to-find-the-id-of-an-entity-in-alphax/)

### ConduitV7 Examples

#### Get hourly sum from all channels of device xxx-cam-010 in a time range:

```url
https://api.alphax.cloud/conduitv7?token=xxxxxxxxxxxxxxxxxxxx&fcdt=xxxxxxxxxx&tcdt=xxxxxxxxxx&id=xxx-cam-010&groupby=hour&aggregateby=sum
```

#### Get hourly sum from channel 1 of device cos-cam-010 in a time range

```url
https://api.alphax.cloud/conduitv7?token=xxxxxxxxxxxxxxxxxxxx&fcdt=xxxxxxxxxx&tcdt=xxxxxxxxxx&id=xxx-cam-010&ch=1&groupby=hour&aggregateby=avg
```

#### Get raw data from all devices of an entity in the last 1 hour

```
https://api.alphax.cloud/getHourlyData?token=xxxxxxxxxxxxxxxxxxxx&siteid=xxxxxxxxxxxxxxxxxx
```

#### Get daily range of hourly average from all devices of the entity that the token is assigned to in a time range

```
https://api.alphax.cloud/conduitv7?token=xxxxxxxxxxxxxxxxxxxx&siteid=xxxxxxxxxxxxxxxxxx&fcdt=xxxxxxxxxx&tcdt=xxxxxxxxxx&aggregateby=range&groupby=day&preaggregate1=avg&pregroup1=hour
```
