brewlytics API¶
API Docs¶
API docs can be found here
Authentication¶
Authentication to the brewlytics APIs is done via a token which is supplied in the REST call using the X-REQUEST-TOKEN header.
Generating a token¶
Personal tokens can be generated here
Note: Your token will run all operations as you; you should safeguard it closely.
Java¶
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
conn.setRequestProperty("X-REQUEST-TOKEN", "<your_token>");
JavaScript¶
fetch(url, {
method: 'GET',
headers: {'X-REQUEST-TOKEN': '<your_token>' }
})
Python¶
headers = {'X-REQUEST-TOKEN': '<your_token>'}
req = requests.get(url, headers=headers)
curl¶
curl --header "X-REQUEST-TOKEN: <your_token>" {url}
Executing workflows via REST¶
brewlytics Workflows become their own RESTful endpoints.
The behavior of the REST endpoint is dependent on:
- What your workflow it set up to accomplish
- The Workflow's Variables
- The Workflow's Outputs
You can view the REST execution URL from the Canvas