Interfaces with multiple Cannabis APIs (BioTrack, CCRS, Leafdata, Metrc). Normalizes to the OpenTHC API interfaces and data-models.
- Clone this Repository to somewhere clever
git clone $REPO /opt/openthc/bong
- Update the Apache Config (use
etc/apache2-example.conf
as a template) - Create the Base Database from
etc/00-schema.sql
and add the triggers. - Configure in
etc/config.php
You can use BONG through it's normal web-interface to view objects in real time or view logs.
BONG also provides an API -- so that other services can consume the data from the different back-ends easier.
curl --header "Bearer: jwt/$JWT" $BONG/auth/open
curl --cookie=cookie-file.dat $BONG/auth/open
The APIs that BONG interfaces with don't all agree on how to do pages of data, or sorting, or filtering. BONG has tools that work in the background to pull and cache data.
GET $BONG/status
GET $BONG/inventory/status
A low level, GET and POST/PUT interface exists.
GET https://$BONG/license
GET https://$BONG/license/current/status
GET https://$BONG/license/$ID/status
GET /crop
GET /crop?filter=(active|wet-collect|dry-collect|done|dead)
GET /crop?filter=and&f-[n0]=[v0]&f-[n1]=[v1]
GET /crop?filter=or&f-[n0]=[v0]&f-[n1]=[v1]
GET /inventory
GET /inventory?filter=(active)
GET /inventory?filter=and
GET /inventory?filter=or
GET /b2b
GET /b2b/outgoing?filter=(active)
GET /b2b/incoming?filter=(active)
GET /b2b?filter=and
GET /b2b?filter=or