In this article
Categories

How do I get a JSON response from Conduit [Version 4]

Print

Conduit is a service running on the AlphaX system that allows simple import and export of data feed. The conduit service allows users to retrieve data in JSON format by simple GET request from a webpage. See below for example usage.

Conduit Endpoint Location: https://app.alphax.cloud/conduitv4
Conduit Parameters:

token [REQUIRED]: The unique security token for each user. This is available from the User window in AlphaX. This parameter is required to access the conduit service, if confused about how to get token, contact Minnovation Team.


id [OPTIONAL]: The network ID that is used to register and track the device in the AlphaX system. This parameter is optional, if not defined, you will get data values for all devices the user has site access to.


ch [OPTIONAL]: The individual channel ID that is assigned within the AlphaX system. This parameter is optional, if not defined, you will get data values for all the channels of the requested devices.


fcdt [OPTIONAL]: From Created Date Time, the starting range timestamp in seconds. This parameter is optional, if not defined, you will get data values of last one hour. This parameter definition requires ‘tcdt’ parameter definition to work as desired.


tcdt [OPTIONAL]: To Created Date Time, the ending range timestamp in seconds. This parameter is optional, if not defined, you will get data values of last one hour. This parameter definition requires ‘fcdt’ parameter definition to work as desired.

Note: Reterival of data values with single GET request is limited to 1000. Only one request per minute is allowed.


Returns JSON. Example:
{
“channel”:4,
“networkID”:”21eea42dd37b”,
“value”:0.278,
“timestamp”:”1537406384″
}

Example Usage:
https://app.alphax.cloud/conduitv4?id=21xxx42xx37x&ch=1&token=xxxxxxxxxxxxxxxxxxxxxx

Returns last one hour data for Channel: 1 of Device: 21xxx42xx37x

https://app.alphax.cloud/conduitv4?token=xxxxxxxxxxxxxxxxxxxxxx&fcdt=1539792000&tcdt=1539840604

Returns all data values from date 1539792000 to 1539840604 for all devices the user has site access to.

https://app.alphax.cloud/conduitv4?token=xxxxxxxxxxxxxxxxxxxxxx

Returns last one hour data values for each device the user has site access to.