---
# System prepended metadata

title: DAP API

---

# DAP API

# Building Level Endpoints

## Measurements

`GET /assets/<asset_id>/measurements`

**Params**:

- **`filter[start_date]`**
- **`filter[end_date]`**
- **`filter[type]`**
- `filter[resolution]` = month
- `page[offset]` = 0
- `page[limit]` = 30

**Test Params**:

- **`customer_id`**

--

**Example Request** - This calendar year, made on 2022-11-29

`GET /assets/<asset_id>/measurements?`
`filter[start_date]=2022-01-01T00:00:00&`
`filter[end_date]=2022-11-29T00:00:00&`
`filter[mtype]=electricity_take_from_grid`

**Test Params**:

- **`customer_id`**

**Example Response**:

```json
{
    "data": [
        {
            "type": "measurement",
            "attributes": {
                "type": "electricity_take_from_grid",
                "resolution": "month",
                "date": "2022-01-01T:00:00:00",
                "value": "19",
                "unit": "kWh"
            }
        },
        ...
        {
            "type": "measurement",
            "attributes": {
                "type": "electricity_take_from_grid",
                "resolution": "month",
                "date": "2022-11-01:00:00:00",
                "value": "8",
                "unit": "kWh"
            }
        },
    ],
    "links": {
        "first": "/assets/<asset_id>/measurements/...",
        "last": "...",
        "next": "...",
        "prev": null
    }
}
```

--

**Example Request** - Last 7 days, made on 2022-11-29

`GET /assets/<asset_id>/measurements?`
`filter[resolution]=day&`
`filter[start_date]=2022-11-2200:00:00&`
`filter[end_date]=2022-11-28T00:00:00&`
`filter[type]=electricity_take_from_grid`

**Example Response**:

```json
{
    "data": [
        {
            "type": "measurement",
            "attributes": {
                "type": "electricity_take_from_grid",
                "resolution": "day",
                "date": "2022-11-22T:00:00:00",
                "value": "3",
                "unit": "kWh"
            }
        },
        ...
        {
            "type": "measurement",
            "attributes": {
                "type": "electricity_take_from_grid",
                "resolution": "day",
                "date": "2022-11-28T00:00:00",
                "value": "4",
                "unit": "kWh"
            }
        },
    ]
}
```

---

## Properties

`GET /assets/<asset_id>/properties`

**Params**:

- `filter[property_name]`

**Test Params**:

- **`customer_id`**

--

**Example Request**

`GET /assets/<asset_id>/properties?filter[property_name]=total_floor_area,installed_solar_capacity`

**Example Response**:

```json
{
    "data": [
        {
            "type": "property",
            "attributes": {
                "name": "total_floor_area",
                "value": 100,
                "unit": "m2"
            }
        },
        {
            "type": "property",
            "attributes": {
                "name": "installed_solar_capacity",
                "value": 23.5,
                "unit": "kWh"
            }
        },
        ...
    ]
}
```

---

## Certificates

`GET /assets/<asset_id>/certificates`

**Params**:

- `filter[type]`

**Test Params**:

- **`customer_id`**

--

**Example Request**

`GET /assets/<asset_id>/certificates`

**Example Response**:

```json
{
    "data": [
        {
            "type": "certificate",
            "attributes": {
                "type": "BREEAM",
                "value": 2
            }
        },
        {
            "type": "certificate",
            "attributes": {
                "type": "energy_label",
                "value": "A++"
            }
        },
        ...
    ]
}
```

---

## Emissions

`GET /assets/<asset_id>/emissions`

**Params**:

- `filter[start_date]`
- `filter[end_date]`
- `filter[type]`

**Test Params**:

- **`customer_id`**

--

**Example Request**

`GET /assets/<asset_id>/emissions`

**Example Response**:

```json
{
    "data": [
        {
            "type": "emission",
            "attributes": {
                "type": "GWP",
                "value": 100,
                "unit": null
            }
        },
        {
            "type": "emission",
            "attributes": {
                "type": "CH4",
                "value": 5.83,
                "unit": "kg"
            }
        },
        ...
    ]
}
```

---

## My Buildings (Landing Page)

`GET /assets`

**Params**:

- `filter[fund]`
- `filter[city]`
- `page[size]` = 30
- `page[token]` = null

**Test Params**:

- **`customer_id`**

--

**Example Request**

`GET /assets`

**Example Response**:

```json
{
    "data": [
        {
            "id": "<id>",
            "type": "asset",
            "attributes": {
                "fund": "<fund name>",
                "city": "<city>",
                "address": "<address>"
            }
        },
        ...
    ],
    "meta": {
        "size": 30,
        "next_token": "<next page token>"
    }
}
```

---
