Request and Response Formats

The HydroTel Web Service uses HTTP GET requests with key-value parameters in the query portion of the URL. All requests must include the eg:

https://data.kisters.co.nz/api/hydapi.dll/GetTreeItems?Level=Site&ParentID=10

All correctly formed and authorised requests return a JSON Object with the first JSON pair "result". "result" will be either a JSON Object or a JSON Array depending on the request. For most requests, it will be a JSON Object if there are 0 or 1 results in the data set, otherwise it will be a JSON Array.

{
    "result":[
        {
            "Site":2657,
            "Name":"KISTERS NZ Office",
            "LongName":"",
            "TreeIndex":1
        },
        {
            "Site":2922,
            "Name":"Waikato Innovation Park Demo",
            "LongName":null,
            "TreeIndex":null
        }
    ]
}

Requests that return an empty data set will show as an empty JSON Object in the "result" pair or in some cases as an empty JSON Array.

{
    "result":{
    }
}

{
    "result":[
    ]
}

All Dates and Times are returned in ISO8601 format with no milliseconds and no reference to time zone (times in HydroTe are not referenced to a specific time zone).

Authentication

The HydroTel Web Service only accepts HTTP Basic Authentication. The username and password are the same as the ones used for the HydroTel Client.

Code Examples

All code examples are real URLs. Use the username guest and password guest to access the data in these examples.