Community Home Community Customer Suggestions API Reply To: API

#76817
aydh
Participant

Smart watering is an awesome idea, but I think the algorithm needs some work – e.g. it’d be nice to water additional minutes early morning when the temperature is going to be over 40C. A simple public API to switch watering on for a device for x minutes could be called from IFTTT. For all the technically minded out there, it’s possible to use chrome developer tools and postman to infer the rest endpoints that sit behind the tech support site. There doesn’t appear to be one to initiate manual watering – that appears to be done via web sockets. Here’s the fruits of my labour below:

FIRST ESTABLISH A SESSION – GETS API KEY FOR ALL FUTURE CALLS
=============================================================
POST https://api.orbitbhyve.com/v1/session

HEADER TAGS FOR SESSION CALL
============================

orbit-app-id=Orbit Support Dashboard
Content-Type=application/json

REQUEST

{
    "session": {
        "email": "{your email/account_id}",
        "password": "{your password}"
    }
}

RESPONSE

{
    "orbit_api_key": "{orbit_api_key}",
    "user_id": "{user_id}",
    "user_name": "{Your Name}",
    "bhyve_account_id": null,
    "bhyve_account_roles": null,
    "bhyve_account_groups": null,
    "roles": null
}

HEADER TAGS FOR ALL CALLS BELOW
===============================

orbit-app-id=Orbit Support Dashboard
orbit-api-key={orbit_api_key returned from session call}
Content-Type=application/json

VARIOUS CALLS TO GET INFO
=========================

GET https://api.orbitbhyve.com/v1/users/{user_id}
GET https://api.orbitbhyve.com/v1/user_feedback?user_id={user_id}
GET https://api.orbitbhyve.com/v1/devices?user_id={userid}
GET https://api.orbitbhyve.com/v1/sprinkler_timer_programs?device_id={device_id}
GET https://api.orbitbhyve.com/v1/device_history/{device_id}
GET https://api.orbitbhyve.com/v1/zone_reports/{device_id}
GET https://api.orbitbhyve.com/v1/watering_events/{device_id}
GET https://api.orbitbhyve.com/v1/landscape_descriptions/{device_id}
GET https://api.orbitbhyve.com/v1/event_logs/{device_id}
GET https://api.orbitbhyve.com/v1/meshes/{mesh_id}
Spread the love!