Skip to main content
GET
Get Dataset Schema
Return what a dataset can be grouped by and what it can measure. Query datasets accepts only the dimension and metric keys listed here, so this is the contract to build a query against rather than guessing field names. The same native key can return different dimensions for different organizations: the schema is extended with the custom columns your organization defined on that entity. Fetch it per organization; do not cache one organization’s schema and reuse it for another. On emissions, those custom columns come from every table an emission row comes from, prefixed by that source so two sources never share a key: custom_consumption_<key> (vehicle consumptions), custom_invoice_<key>, custom_waste_<key>, custom_purchase_<key>, custom_business_travel_<key>, custom_hotel_stay_<key>, custom_wastewater_<key>, custom_commuting_<key>, plus custom_vehicles_<key> and custom_facilities_<key>. They are always dimensions — an emission row is a day-by-gas slice of its source, so a number from the source (or from the record a relation points at) is never summed. When your organization links a source that has no facility of its own to a facility with a relation column (a vehicle consumption’s “Facility”, a business trip’s “Sede”), facility on emissions becomes the facility each row belongs to: its own facility when it has one, otherwise the one the relation assigns. The facility’s other columns (country, facilities__*, custom_facilities_*) follow it. The most specific source wins for each row: its own facility first, then a relation on the row’s source (a consumption’s “Facility”, which is where the vehicle was that day), then one on its vehicle, which only fills the consumptions that say nothing. So adding a relation, or leaving a new one empty, never moves a row away from the facility it had. If two facility columns on the same record point at different facilities, neither is used for that record (its vehicle’s relation, if any, still applies). Without such a relation, facility keeps its meaning.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
Dataset key from List Available Datasets — a catalogue key, or elastic:<uuid> for a custom datasetExample: own_workforce_remuneration

Query Parameters

string
Narrow the dataset to a reporting taxonomy. It only affects datasets with framework-specific dimensions — notably emissions — and is a no-op elsewhere.

Response

string
Echo of the dataset key
string
i18n key for native datasets; the user’s literal name for custom ones
string
kpi, activity, master, custom or custom_kpi
array[object]
array[object]
array[string]
Metrics to preselect when nothing is chosen
boolean
true for native KPI and activity datasets: the query’s start/end window is mandatory and drives proration. false for master and custom datasets, where the window is optional or ignored.
string | null
The dimension that seeds the period axis
integer | null
Custom datasets only: incremented on every write, so it works as a cache key. Null for native datasets.
Every dataset with a date column also exposes a synthetic period dimension that is not part of its stored fields. It is how you group by month, quarter or year.

Reading the workforce schemas

own_workforce_remuneration is the one worth knowing in detail. Its time axis is annual — one row per employee per fiscal year — and its wage_gap metric has three traps worth repeating from Query datasets:
  • it is an FTE-weighted mean, not a simple average of salaries;
  • the sign is positive when men earn more, since it is computed as (avg_M − avg_F) / avg_M × 100;
  • it returns null, not 0, for any group that lacks at least one man and one woman. Null is “not computable here”, and it is not summable or averageable across groups — ask the server for subtotals instead of aggregating the numbers yourself.
It also carries fewer dimensions than own_workforce_contracts: organization, country, nationality, gender, job category, age and period, with no contract type, workday type, disability or labour-agreement split.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid, or it does not belong to the organization in x-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.

404 Not Found

Cause: unknown key, or a custom dataset belonging to another organization.

List available datasets

Where the key comes from

Query datasets

Run the aggregation

Organization hierarchy capability

organization_hierarchy_supported indicates whether the dataset can return recalculated holding rows when organization is the first dimension and nest_organization_by_hierarchy is enabled. Consumers should show the hierarchy control only when this capability is true. The default is false for older servers and unsupported dataset definitions.