Java · Track 6 · Tutorial 2 of 2

Read a dataset back

Read back the operational data BrizoConsol holds: find your dataset, then read any month from it.

You will needThe headcount from Send operational data.
By the endA script that finds a dataset by name and reads its figures for a month.

1Find the dataset, then read it

Datasets are read by ID, so first list the company's datasets and find yours by its name.

Two calls: find the dataset, then read it
Reading operational data takes two calls: find the dataset's ID, then read it for a month.

2Write the script

Create ReadOperational.java:

ReadOperational.java

// ReadOperational.java - finds the headcount dataset and reads September from it.
import com.fasterxml.jackson.databind.JsonNode;

public class ReadOperational {
    public static void main(String[] args) throws Exception {
        JsonNode datasets = Brizo.call("GET", "/organisations/" + Brizo.COMPANY_ID + "/operation-data").body().path("data");

        JsonNode headcount = null;
        for (JsonNode dataset : datasets) {
            System.out.println("Dataset " + dataset.path("id").asText() + ": " + dataset.path("name").asText());
            if (dataset.path("name").asText().equals("API: headcount")) {
                headcount = dataset;
            }
        }
        if (headcount == null) {
            System.out.println("No headcount dataset yet - run Operational first.");
            return;
        }

        JsonNode answer = Brizo.call("GET", "/organisations/" + Brizo.COMPANY_ID + "/operation-data/"
                + headcount.path("id").asText() + "?period=2026-09").body();
        System.out.println(answer.path("dataset_name").asText() + ", " + answer.path("period").asText() + ":");
        for (JsonNode row : answer.path("rows")) {
            System.out.println("  " + row.path("dimension").asText() + ": " + row.path("value").asText());
        }
    }
}

3Run it

gradle -q run -Pmain=ReadOperational

Check

Dataset 7: API: headcount
API: headcount, 2026-09:
  Sales: 12
  Operations: 8
  Finance: 3

Every dataset the company has is listed - including ones uploaded on screen - then September's rows from yours.

The first dimension reads back as dimension
One naming difference: the first dimension is sent as dimension_1 and read back as dimension.

4Narrow it down

Add &scenario=Budget for another scenario, or &dimension=Sales for one value of the first dimension. The month is required, as YYYY-MM.

Want more detail? See the documentation