---
title: "fetchAndObserveInsights(forConfigurations:errorHandler:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ockchartcontroller/fetchandobserveinsights(forconfigurations:errorhandler:)"
---

# fetchAndObserveInsights(forConfigurations:errorHandler:)

Retrieves and observes insights data, using an array of specific data series configurations.

## Declaration

```swift
func fetchAndObserveInsights(forConfigurations configurations: [OCKDataSeriesConfiguration], errorHandler: ((Error) -> Void)? = nil)
```

## Parameters

- `configurations  `: An array of configuration objects, that specify which data the controller queries and how it displays that data in the graph.
- `errorHandler  `: An error handler the function uses when it encounters an error.
