brewlytics API Guide
API Docs
Section titled “API Docs”Full API documentation can be found on the API Reference page.
Authentication
Section titled “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
Section titled “Generating a token”Personal tokens can be generated from your own profile — open the user menu in the top-right of the app and select Credentials.
Note: Your token will run all operations as you; you should safeguard it closely.
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();conn.setRequestProperty("X-REQUEST-TOKEN", "<your_token>");JavaScript
Section titled “JavaScript”fetch(url, { method: 'GET', headers: {'X-REQUEST-TOKEN': '<your_token>' }})Python
Section titled “Python”headers = {'X-REQUEST-TOKEN': '<your_token>'}req = requests.get(url, headers=headers)curl --header "X-REQUEST-TOKEN: <your_token>" {url}Executing workflows via REST
Section titled “Executing workflows via REST”brewlytics Workflows become their own RESTful endpoints.
The behavior of the REST endpoint is dependent on:
- What your workflow is set up to accomplish
- The Workflow’s Variables
- The Workflow’s Outputs
You can view the REST execution URL from the Workflow Toolbar on the Build canvas.
Ad-hoc Functional Execution
Section titled “Ad-hoc Functional Execution”For quick tests or lightweight integrations, a single functional can be run synchronously without wiring it into a full workflow. POST /api/director/functionals/{uuid}/execute creates a transient, one-component model, executes it, and returns the outputs inline — nothing to build or tear down. (This is the Director-fronted path integrators should call; it forwards internally to the AMEE-side /api/functionals/{uuid}/execute, which isn’t reachable directly from outside the cluster.)
- Send scalar/list inputs as a JSON body (
{"inputs": {...}}), or usemultipart/form-datawhen one of the inputs is a CSV to be ingested as aCV_Table. - An optional
outputsarray filters the response down to just the output names you care about. - An optional
options.timeoutMsbounds how long the call waits before failing; it’s clamped server-side (default 60s, max 600s). - Table outputs aren’t inlined — the response carries their schema and row count plus a
fetchUrlyou call separately to stream the CSV.
curl --header "X-REQUEST-TOKEN: <your_token>" \ --header "Content-Type: application/json" \ --data '{"inputs": {"name": "world"}}' \ {url}/api/director/functionals/{uuid}/executeSee the API Reference for the full request/response schema, including the multipart form and the table-output fetch endpoint.