> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# insightBuckets()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/insight/index.ts

Gets buckets for the insight. If ids are provided, then only returns buckets matching the ids.

**Signature:**

```typescript
export declare function insightBuckets(insight: IInsightDefinition, ...ids: string[]): IBucket[];
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| insight | [IInsightDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iinsightdefinition/index.md) | insight to work with |
| ids | string[] | local identifiers of buckets |

**Returns:**

[IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md)[]

empty list if none match
