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

# Querying Homes and Devices

> List homes and HVAC devices after onboarding so you can store home IDs and target device operations.

<Note>
  Check out our [onboarding guide](/docs/onboard_sites/prepare-onboarding) to
  learn how to onboard users. The rest of this quick start guide will
  walkthrough how to use the API once you have onboarded users.
</Note>

The onboarding flow should provide a `homeId` for each user.
However, we also expose endpoints to list out all homes.

```typescript theme={null}
// Fetch all homes.
const homes = await wattshiftApiCall("/homes/list");
const home = homes[0];
```

It is recommended to store the `homeId` against the user
during the onboarding flow.

## Querying Devices

We can list out all the devices for a given home.

```typescript theme={null}
// Fetch devices for the home.
const homeId = home.id;
const devices = await wattshiftApiCall(`/homes/${homeId}/devices/hvac/list`);
const hvac = devices[0];
```
