Get started

     API Endpoint
 
         https://api.bushlinx.au/
                 

The BushLinx API provides programmatic access to read BushLinx data.

To use this API, you need an API key. Please contact us at tim@integratedirrigation.com.au to get your own API key.

Get Access Token


 # Here is a python example

  url = 'https://api.bushlinx.au/api/login'
  auth_token = '{your_token}'
  params = {'token':auth_token}
  x = requests.get(url, params = params)
  json = x.json()

                 

To get an access token you need to make a GET call to the following url using your API token as an Authorization Header:https://api.bushlinx.au/api/login. Access tokens have a timeout of 15 minutes.



 Result example :
 
{
    accessToken: '{access_token}'
}
                 

QUERY PARAMETERS

Field Type Description
token String Your access token.

Errors

The BushLinx API uses the following error codes for Access:

Error Code Meaning
400 Some parameters are missing. This error appears when you don't pass every mandatory parameters.
401 Unknown or invalid token. This error appears if you use an unknown API key or if your API key expired.

Authorization

Authorization: Bearer {token}

Get Sites


# Here is a python example

 url = 'https://api.bushlinx.au/api/sites'

 params= {"BLID":[1,2]}

 x = requests.get(url,params,headers = 
 {"Authorization": 'Bearer ' + accessToken +'' , 
 'Accept': 'application/json', 
 'Content-Type': 'application/json'}
 )
 json = x.json()

                

To get a site you need to make a GET call to the following url :
https://api.bushlinx.au/api/sites



Result example :

[
  {
    name: 'One AWS',
    BLID: 1,
    RTU_ID: 1,
    timezone: 'Australia/Adelaide',
    latitude: '-35.3470376',
    longitude: '143.8588471',
    latest_date: '2025-01-13T00:15:00.000Z'
  },
  {
    name: 'Two AWS',
    BLID: 2,
    RTU_ID: 2,
    timezone: 'Australia/Melbourne',
    latitude: '-37.1049804',
    longitude: '142.3781529',
    latest_date: '2025-01-13T00:15:00.000Z'
  }
]
                

QUERY PARAMETERS

Field Type Description
BLID String || Int || Array BLID is either a single id, '*' for all available, or array of id's. If the paramater is not set, all available sites will be returned.

Errors

The BushLinx API uses the following error codes for Sites:

Error Code Meaning
400 Some parameters are missing. This error appears when you have an invalid parameter.
401 Unknown or invalid token. This error appears if you use an unknown API key or if your API key expired.

Request Data


# Here is a python example

 url = 'https://api.bushlinx.au/api/data'

 start = "2025-01-06T01:30"
 end = "2025-01-06T01:30"
 body = {'BLID':1,'startDate':start,'endDate':end}

 x = requests.post(url,body,headers = 
 {"Authorization": 'Bearer ' + accessToken +'' , 
 'Accept': 'application/json', 
 'Content-Type': 'application/json'}
 )
 json = x.json()

                

To request data you need to make a POST call to the following url :
https://api.bushlinx.au/api/data



Result example :

{
    "device":{
        "name": 'One AWS',
        "BLID": 1,
        "RTU_ID": 1,
        "timezone": 'Australia/Adelaide',
        "latitude": '-35.3470376',
        "longitude": '143.8588471',
        "latest_date": '2025-01-13T00:15:00.000Z'
    },
    "data":[
       {
          "id":2,
          "sensor":"Humidity",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"85.50"
             }
          ]
       },
       {
          "id":1,
          "sensor":"Air Temp",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"16.60"
             }
          ]
       },
       {
          "id":11,
          "sensor":"Rain",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"0.00"
             }
          ]
       },
       {
          "id":16,
          "sensor":"Wind Dir",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"316.77"
             }
          ]
       },
       {
          "id":71,
          "sensor":"Dew Point",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"14.10"
             }
          ]
       },
       {
          "id":12,
          "sensor":"HFDI",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"5.30"
             }
          ]
       },
       {
          "id":13,
          "sensor":"Delta-T",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"1.70"
             }
          ]
       },
       {
          "id":8,
          "sensor":"Wind Gust",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"35.23"
             }
          ]
       },
       {
          "id":7,
          "sensor":"Wind Avg",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"24.27"
             }
          ]
       },
       {
          "id":31,
          "sensor":"Baro",
          "data":[
             {
                "date":"2025-01-06T01:30:00.000Z",
                "value":"994.00"
             }
          ]
       }
    ]
 }

                

QUERY PARAMETERS

Field Type Description
BLID String || Int || Array BLID is either a single id, '*' for all available, or array of id's. If the paramater is not set, all available sites will be returned.
startDate || endDate String The preferred format for a datetime is "2025-01-06T01:30" , any acceptable format complying with ISO8601 will also work. Dates used in paramaters and responses are all in UTC time. The date time specified in startDate is the first time slot that will be returned, the endDate is the last date time of data that is returned - up to 100 timeslots maximum per call.

Errors

The BushLinx API uses the following error codes for Data:

Error Code Meaning
400 Some parameters are missing or there is no data. This error appears when you have an invalid parameter or there isn't any data to be viewed.
401 Unknown or invalid token , unauthorized privileges. This error appears if you use an unknown API key or if your API key expired, or you dont have privileges to view the data.