# Using Conduit V7

{% hint style="danger" %}
SECURITY NOTE: Conduit V7 uses GET method so request data forms part of the URL. This means your security token could potentially be stored in browser history or in web server logs.
{% endhint %}

#### Pre-requisites

Before you can access the API endpoint, ensure that:

* You have a valid token for authentication.
* If you haven’t activated your token yet, please refer to <https://minnovation.com.au/knowledge-base/how-to-enable-conduit-for-a-user/> on how to enable Conduit for a user

#### HTTP Method

GET Request&#x20;

#### Base URL

```url
https://api.alphax.cloud/conduitv7
```

### API Parameters

<table data-full-width="false"><thead><tr><th width="359">Parameter</th><th width="379">Description</th><th width="109">Input</th><th>Required</th></tr></thead><tbody><tr><td>token</td><td>The unique security token for each user. This is available from the User window in AlphaX.</td><td>String</td><td>Required</td></tr><tr><td>fcdt</td><td><p>From Created Date Time, the starting range timestamp in seconds.</p><p>If not defined, you will get data of last one hour.</p><p>This parameter definition requires valid ‘tcdt’ parameter definition to work as desired.</p></td><td>10 digits Integer</td><td>Optional</td></tr><tr><td>tcdt</td><td><p>To Created Date Time, the ending range timestamp in seconds.</p><p>If not defined, you will get data of last one hour.</p><p>This parameter definition requires valid ‘fcdt’ parameter definition to work as desired</p></td><td>10 digits Integer</td><td>Optional</td></tr><tr><td>timerange</td><td><p>Date time range in seconds.</p><p>Valid Values:</p><p><code>3600</code>(Last 1 Hour), <code>86400</code>(Last 24 Hours),</p><p><code>604800</code>(Last 7 Days), <code>2592000</code>(Last 30 Days)</p></td><td>Integer</td><td>Optional</td></tr><tr><td>id</td><td><p>The network ID that is used to register and track the device in the AlphaX system.</p><p>If not defined, you will get data values for all devices the user has site access to.</p></td><td>String</td><td>Optional</td></tr><tr><td>ch</td><td><p>The individual channel ID that is assigned within the AlphaX system.</p><p>If not defined, you will get data values for all the channels of the requested devices.</p></td><td>Integer</td><td>Optional</td></tr><tr><td>siteid</td><td><p>The id of Entity(Heirarchy). You will get data values for all devices that assigned to the site and its sub sites.</p><p>If not defined, you will get data values for all devices the user has site access to.</p></td><td>String</td><td>Optional</td></tr><tr><td>showhidech</td><td><p>If true, include channels marked as hidden in the AlphaX platform.</p><p>Default functionality is to not provide channels that are hidden.</p></td><td>boolean</td><td>Optional</td></tr><tr><td>tagfilter</td><td>If defined, retrieve only the devices whose tags include the input string.</td><td>String</td><td>Optional</td></tr><tr><td>status</td><td>If defined, retrieve only the devices whose status(labelName) include the input string.</td><td>String</td><td>Optional</td></tr><tr><td>limit</td><td><p>Maximum amount of datapoints per sensor(channel).</p><p>If is 0 or not defined, the limit is 100000.</p></td><td><p>Integer</p><p>(0-100000)</p></td><td>Optional</td></tr><tr><td>timezone</td><td><p>Output timezone.</p><p>If not defined, use the timezone of the token.</p><p>If the timezone of the token is not defined, use ‘GMT’.</p></td><td>String</td><td>Optional</td></tr><tr><td>groupby</td><td><p>Group type.</p><p>If not defined, group &#x26; aggregate are disabled. You will get live data values.</p></td><td>String</td><td>Optional</td></tr><tr><td>aggregateby</td><td><p>aggregate type.</p><p>If not defined, group &#x26; aggregate are disabled. You will get live data values.</p></td><td>String</td><td>Optional</td></tr><tr><td>pregroup1</td><td>Pre group type#1</td><td>String</td><td>Optional</td></tr><tr><td>preaggregate1</td><td>Pre aggregate type #1</td><td>String</td><td>Optional</td></tr><tr><td>pregroup2</td><td>Pre group type#2</td><td>String</td><td>Optional</td></tr><tr><td>preaggregate2</td><td>Pre aggregate type #2</td><td>String</td><td>Optional</td></tr><tr><td>pregroup3</td><td>Pre group type#3</td><td>String</td><td>Optional</td></tr><tr><td>preaggregate3</td><td>Pre aggregate type #3</td><td>String</td><td>Optional</td></tr></tbody></table>

#### Date Ranges

{% hint style="warning" %}
When `timerange` Applied and Valid Conduit will return the data from current date/time minus `timerange` in seconds. If `timerange`Not Applied or timerange not valid ConduitV7 will return data for last 1 hour.
{% endhint %}

{% hint style="warning" %}
When `fcdt` & `tcdt` applied and valid, conduit will override timerange and return the data from `fcdt`to `tcdt`as long as they remain within the limit set and/or [rate limt of the API](/rate-limits.md).
{% endhint %}

### Data Format

The response from the API will be in the JSON format. Below is the structure of the data you will receive.

```json
[{
    "channelDescription": "",
    "id": "",
    "chid": "",
    "netid": "",
    "data": [
        {"timestamp": "", "value": ""},
        {"timestamp": "", "value": ""} // Repeats for all valid data
    ],
    "deviceName": "",
    "labelColor": "",
    "labelName": "",
    "location": "",
    "locationSensor": "",
    "tag": "",
    "unit": "",
    "timezone": "",
    "siteid": "",
    "sensorType": "",
    "limitData": "",
    "limitOutput": "",
    "cal": "",
    "offset": "",
    "maxVal": "",
    "minVal": ""
}]
```

### Field Descriptions

* **channelDescription**: Description of the channel.
* **id**: Unique identifier for the sensor.
* **chid**: Channel identifier.
* **netid**: Network identifier.
* **data**: Array of data points, each containing a timestamp and value.
* **deviceName**: Name of the device.
* **labelColor**: Color assigned to the label.
* **labelName**: Name of the label.
* **location**: Information about the location of sensors.
* **locationSensor**: Location sensor information for virtual channels.
* **tag**: Tag related to the device.
* **unit**: Measurement unit of the data.
* **timezone**: The timezone in which the data is represented.
* **siteid**: Entity identifier.
* **sensorType**: Type of sensor.
* **limitData**: Indicates if the input record limit has been reached (maximum of 843000 datapoints).
* **limitOutput**: Indicates if the request data limit has been reached (maximum of 105120 datapoints).
* **cal**: Data calibration factor.
* **offset**: Data calibration offset.
* **maxVal**: Maximum data value.
* **minVal**: Minimum data value.


---

# 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://apidocs.alphax.cloud/http/retrieve-data/conduit-v7/using-conduit-v7.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.
