C# · 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.
2Write the script
Create ReadOperational.cs:
ReadOperational.cs
// ReadOperational.cs - finds the headcount dataset and reads September from it.
using System.Text.Json.Nodes;
public static class ReadOperational
{
public static async Task Run(string[] args)
{
var datasets = (await Brizo.Call("GET", $"/organisations/{Brizo.CompanyId}/operation-data")).Body!["data"]!.AsArray();
JsonNode? headcount = null;
foreach (var dataset in datasets)
{
Console.WriteLine($"Dataset {dataset!["id"]}: {dataset["name"]}");
if (dataset["name"]!.ToString() == "API: headcount")
{
headcount = dataset;
}
}
if (headcount is null)
{
Console.WriteLine("No headcount dataset yet - run Operational first.");
return;
}
var answer = (await Brizo.Call("GET", $"/organisations/{Brizo.CompanyId}/operation-data/{headcount["id"]}?period=2026-09")).Body!;
Console.WriteLine($"{answer["dataset_name"]}, {answer["period"]}:");
foreach (var row in answer["rows"]!.AsArray())
{
Console.WriteLine($" {row!["dimension"]}: {row["value"]}");
}
}
}
3Run it
dotnet run -- ReadOperationalCheck
Dataset 7: API: headcount
API: headcount, 2026-09:
Sales: 12
Operations: 8
Finance: 3Every dataset the company has is listed - including ones uploaded on screen - then September's rows from yours.
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