# Retrieve Sub-Unit Site Measurements

`GET /resources/pv_power_site_measurements/sub_units`

Retrieve historical sub-unit measurement data for a Premium PV Power site. A sub-unit represents a subsection of the site, such as an individual inverter or a subset of inverters. Supports pagination via skip/take, date filtering via start/end, and an optional sub_unit filter.

## Parameters

### Query Parameters

| Name | Type | Required | Description | Accepted Values |
| --- | --- | --- | --- | --- |
| `resource_id` | string | yes | The unique identifier of the Premium PV Power resource. |  |
| `start` | string (date-time) | no | Filter: period_end >= start (ISO-8601). |  |
| `end` | string (date-time) | no | Filter: period_end <= end (ISO-8601). |  |
| `format` | string | no | Response format. Default is HTML if not supplied. | json, csv |
| `sub_unit` | string | no | Optional filter: return only measurements for this sub_unit. |  |

## Example request

### cURL

```bash
curl -X GET "https://api.solcast.com.au/resources/pv_power_site_measurements/sub_units?resource_id=0000-0000-0000-0000&format=json" \
  -H "Authorization: Bearer $API_KEY"
```

### Python

```python
import requests

params = {
    "resource_id": "0000-0000-0000-0000",
    "format": "json",
}

response = requests.get(
    "https://api.solcast.com.au/resources/pv_power_site_measurements/sub_units", params=params,
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{
  "offset": 0,
  "total": 3,
  "results": [
    {
      "sub_unit": "inverter_1",
      "power": 1,
      "period_end": "2026-01-01T00:05:00+00:00",
      "period": "PT5M"
    },
    {
      "sub_unit": "inverter_1",
      "power": 1,
      "period_end": "2026-01-01T00:10:00+00:00",
      "period": "PT5M"
    },
    {
      "sub_unit": "inverter_1",
      "power": 1,
      "period_end": "2026-01-01T00:15:00+00:00",
      "period": "PT5M"
    }
  ]
}
```

## Responses

### 200 — OK

Schema: `PvSubUnitSiteMeasurementsResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | no |  |
| `offset` | integer (int32) | no |  |
| `results` | PvSubUnitSiteMeasurementResponse[] | no |  |
| `total` | integer (int32) | no |  |

Source: /docs/section/premium#getResourcesPvPowerSiteMeasurementsSubUnits
