PHP · 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 read-operational.php:
read-operational.php
<?php
// read-operational.php - finds the headcount dataset and reads September from it.
require __DIR__ . '/brizo.php';
$datasets = call('GET', "/organisations/$companyId/operation-data")['body']['data'];
$headcount = null;
foreach ($datasets as $dataset) {
echo "Dataset {$dataset['id']}: {$dataset['name']}\n";
if ($dataset['name'] === 'API: headcount') {
$headcount = $dataset;
}
}
if ($headcount === null) {
exit("No headcount dataset yet - run operational.php first.\n");
}
$answer = call('GET', "/organisations/$companyId/operation-data/{$headcount['id']}?period=2026-09")['body'];
echo "{$answer['dataset_name']}, {$answer['period']}:\n";
foreach ($answer['rows'] as $row) {
echo " {$row['dimension']}: {$row['value']}\n";
}
3Run it
php read-operational.phpCheck
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