> ## Documentation Index
> Fetch the complete documentation index at: https://docs.communityhub.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Data API: Retrieving Variables and Their Data

> The Data Hub Data API is a set of read-only GET endpoints for discovering variables and retrieving their time-series data — not a SQL query engine.

<Warning>
  This page previously described a SQL-based Query API. That's not how the real Data API works — there's no SQL, no arbitrary `datasets`, and no query engine. It's a fixed set of GET endpoints scoped to variables, metered entities, and data sources.
</Warning>

## Available endpoints

All paths below are relative to the base URL `https://api.communityhub.cloud/dh/public/v1`. There's no organization identifier in the path. A token is scoped to the **user**, not to a single organization — access to variables, metered entities, and data sources is governed by whatever permissions that user's account already has, which may span more than one organization.

| Endpoint                                          | Purpose                                                                                                                                                                                                                                                   |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /organizations`                              | List organizations accessible to your token — short (`?mode=short`) or full form.                                                                                                                                                                         |
| `GET /variable/get-variable-filter-data`          | List the filter facets (organization, resource, variable type, entity type, entity, status, data reception) available for a variable listing, scoped by `orgIds`.                                                                                         |
| `POST /variable/list`                             | Search and paginate variables using those same filters, including a hidden-variables toggle. Also how to fetch variables connected to a specific monitored entity — see [Connected Variables](/api-reference/query/monitored-entity-connected-variables). |
| `GET /monitored-entity/get-filters`               | List the filter facets available for a monitored-entity listing, scoped by `orgIds`.                                                                                                                                                                      |
| `POST /monitored-entity`                          | Search and paginate monitored entities using those same filters, including a hidden-entities toggle.                                                                                                                                                      |
| `GET /monitored-entity/{id}`                      | Get a single monitored entity by id.                                                                                                                                                                                                                      |
| `GET /data-source/type/filters`                   | List the filter facets (organizations) available for the data source type listing.                                                                                                                                                                        |
| `POST /data-source/type`                          | Search and paginate the data source types (integrations) available in Data Hub, filtered by organization.                                                                                                                                                 |
| `GET /data-source/instance-filters`               | List the filter facets (organization, error type, status) available for the data source instance listing.                                                                                                                                                 |
| `GET /variables`                                  | List/discover variables accessible to your token, with filters.                                                                                                                                                                                           |
| `GET /variables/{dataHubId}`                      | Metadata for a single variable                                                                                                                                                                                                                            |
| `GET /variables/{dataHubId}/data`                 | Time-series data for a variable (params: `start`, `end`, `resolution`, `units`, `standardization`, `format`)                                                                                                                                              |
| `GET /metered-entities`                           | List metered entities (buildings, stations, etc.) accessible to your token                                                                                                                                                                                |
| `GET /metered-entities/{id}`                      | Metadata for a single metered entity                                                                                                                                                                                                                      |
| `GET /data-sources/{id}`                          | Metadata about a data source                                                                                                                                                                                                                              |
| `GET /resolutions`, `/units`, `/standardizations` | Discovery endpoints, independent of any organization or token scope                                                                                                                                                                                       |

`dataHubId` is the same stable public identifier already used internally (the same one used in derived variable formulas) — no new public ID scheme.

<Warning>
  **Open — not fully decided:** variables are queried and filtered via **metered entity**, not organization — there's no `orgId` filter. The exact query-parameter design for `GET /variables` isn't finalized, but the current direction is that discovery returns a hierarchy: organizations → metered entities → variables, reflecting everything the requesting user's token has access to, rather than a flat list scoped to a single org. See [Discovery Endpoints](/api-reference/query/saved-queries) for the current thinking.
</Warning>

## Response format

JSON only at launch.

## Temporal resolutions

Raw, plus predefined resolutions: minute, 15-minute, hourly, daily, weekly, monthly, yearly. For cumulative-derived rate variables, values at any resolution represent the average rate over the interval computed from cumulative measurements — not an average of sampled rate measurements.

## Units and standardization

Variables are stored in canonical units and delivered in those units by default. Supported unit conversions and standardizations (e.g. energy use per square foot, per occupant) are exposed — but only ones explicitly supported by Data Hub, not arbitrary conversions.

See [Get Variable Data](/api-reference/query/run-query) for a worked example, and [Rate Limits](/api-reference/rate-limits) for throughput constraints.
