settles, which matches each payment to the open invoice that it settles (match one record to another), from July to September. You export the evaluations in that range, and each comes with:
- its context: the payment’s fields, and the invoices that it read
- its answer
- the judgment version: the version of the question
- the engine version
- the outcomes joined to it, such as the invoice that your team recorded
plan_required (HTTP 402).
Export evaluations
An export is a job:- Start the export for a namespace.
- Poll the job until its status is
done. - Download each file in
export.files.
acme/prod, which needs a key whose scope covers acme/prod (such as acme/*), since the key you got at sign-up cannot reach it, and only an organization with a card on file can create one that does (get an API key).
POST /namespaces/{ns}/evaluations/exports takes:
since: the earliestcreated_atto export, which the range includes. The default is 30 days beforeuntil.until: the end of the range, which the range does not include. The default is now, and Brussle uses now in place of a later time.judgments: export only these judgments. Leave it out to export each judgment that has evaluations in the namespace, deleted judgments included.
{} exports the last 30 days of each judgment. One export includes at most 366 days, so a longer history takes more than one export.
Start an export with a read_write key whose scope includes the namespace. Your audit log records the start as job.create.
The job is GET /jobs/{id} with type: "evaluation_export". While it runs, progress.documents_done and export.evaluations count the evaluations written so far, and you can pause, resume and cancel it like any job. When it is done, export.files lists its files:
- Each link works for one hour. A link needs no API key, so you can give it to the tool that downloads the file. Links are on the API’s own host (
https://api.brussle.com/v1/downloads/...), so a network that reaches the API also reaches the links. To get new links, read the job again. - Sometimes Brussle cannot make links. The job still reads
doneand lists its files, but theirurlandurl_expires_atarenull, andlinks_unavailablesays so, with a request id to give to support. The files are not affected, so read the job again later. - Brussle keeps files for 7 days after it writes them.
expires_atis the time that Brussle deletes the first file. After that time, the job lists no files, and you must start a new export. - A file holds up to 100,000 evaluations. An export writes at most 1,000 files, and one that needs more fails with an
errorthat says so. Make the time range smaller, or export fewer judgments at a time. - An export runs in the background, so a large export can take some time. An export that something stops continues from where it stopped. Brussle also deletes a namespace’s exports when you delete the namespace.
What a file holds
Each file is gzipped JSON Lines, and each line is one evaluation asGET /namespaces/{ns}/evaluations/{id} returns it, plus the outcomes joined to it.
Most tools read the file with no change (BigQuery, Snowflake and Athena load .jsonl.gz files directly), and gunzip -c 00001.jsonl.gz | jq . shows the content.
context. A real context holds each field and each invoice that the recipe names.
contextis the exact compiled context that the engine read. Each image in it is a reference, never the image’s bytes (the reference that the document held when the engine read the image, or{"digest": "sha256:...", "omitted": ...}when the engine did not read it), and images are only at image paths such asimages.photo. Get the bytes withGET /namespaces/{ns}/images/{digest}, and each read is billed asbytes_scanned. The images of deleted documents stay readable until you delete the namespace or erase the image, so keep a copy of an image’s bytes to keep it after that. An image erased before the export was written has"erased": trueon its reference. An export written before the erasure holds only the reference, never the bytes, so it does not change.related_documents, for a judgment with relations, lists each other document that the engine read, with its revision at that time.outputis the raw numbers of the answer:p,value,dist,escape_p,scoreorparts. Brussle applies thresholds and the correction when you read answers, so the export holds what the engine said. For a judgment with features, an answer’spis the fit applied tooutput.pandfeatures, and for a composite it is the fitted weights applied topartsandfeatures.rawis the engine’s answer to this judgment alone, in the shape ofoutput.rawholds the same numbers asoutputwhen the evaluation called the engine. For a composite judgment, both holdparts(thepof each part).rawisnullin two cases:- A failed evaluation has no answer.
- A reuse evaluation did not call the engine, because only the judgment’s features changed. It uses the engine’s answer from the evaluation that its
engine_answer_fromnames.outputholds that answer, andcontextis the context of that evaluation.
judgment_versionis the version of the judgment (the question) that made the evaluation, so group the lines byjudgment_versionto keep the answers of different questions apart.engine_versionis the epoch in which Brussle made the evaluation,enginenames the engine, andmodel_idis the model string the provider reported, ornull. Each engine numbers its own epochs, so read the two together. Each epoch gets its own fit (when the engine changes).outcomesare the outcomes that the correction joins to this evaluation: posted outcomes, outcomes from your outcome rules (source: "rule") and labels from the labelling queue ("queue"). Implicit negatives are not listed, because they are inferred, not recorded. The list is empty when no outcome joins.- The export includes each evaluation:
- failed evaluations, with their
error - shadow evaluations from shadow reports, with
shadow: true(a shadow evaluation made no answer) - replays after an engine change, with
replay_ofset andcontext: null(the context is in the evaluation thatreplay_ofnames, and a replay made no answer) - evaluations of documents that someone deleted since then
- failed evaluations, with their
- Files are in no order. Sort by
created_atif you need an order. - Rarely, an evaluation appears twice. A duplicate comes from Brussle reorganizing the history while the export ran.
idis unique, so keep one line for eachid.
Export the audit log
The dashboard’s Audit page lists your organization’s audit events on each plan, and on Scale, Export CSV downloads the events that match the page’s filters. The CSV has each event’s time, actor, action, target, and the values before and after.After a downgrade
A downgrade takes effect at the start of the first billing period that starts at least 30 days after you ask for it (changing plan). Below Scale:- Brussle refuses new exports with
plan_required. - The audit log’s CSV export is not available.
- You can still download the files of an earlier export until Brussle deletes them.
- The audit log stays in the dashboard.