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

# IDashboardsQuery

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

Service to query dashboards.

**Signature:**

```typescript
export interface IDashboardsQuery 
```

## Methods

| Method | Description |
| --- | --- |
| [query()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsqueryquery) | Starts the dashboards query. |
| [withFilter(filter)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithfilter) | Sets filter for the query. |
| [withInclude(include)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithinclude) | Sets include for the query. |
| [withMetaInclude(metaInclude)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithmetainclude) | Sets meta include for the query. |
| [withMethod(method)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithmethod) | **_(BETA)_** Selects which backend endpoint flavor to use when listing dashboards. Default method: "GET" |
| [withOrigin(origin)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithorigin) | Sets origin for the query. |
| [withPage(page)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithpage) | Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0 |
| [withSize(size)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithsize) | Sets number of dashboards to return per page. Default size: 50 |
| [withSorting(sort)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md#idashboardsquerywithsorting) | Sets sorting for the query. |

## Method details

### IDashboardsQuery.query()

Starts the dashboards query.

**Signature:**

```typescript
query(): Promise<IDashboardsQueryResult>;
```
**Returns:**

Promise&lt;[IDashboardsQueryResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsqueryresult/index.md)&gt;

promise of first page of the results

### IDashboardsQuery.withFilter()

Sets filter for the query.

**Signature:**

```typescript
withFilter(filter: IFilterBaseOptions): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filter | [IFilterBaseOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ifilterbaseoptions/index.md) | filter to apply |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withInclude()

Sets include for the query.

**Signature:**

```typescript
withInclude(include: string[]): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| include | string[] | include to apply |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withMetaInclude()

Sets meta include for the query.

**Signature:**

```typescript
withMetaInclude(metaInclude: string[]): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| metaInclude | string[] | meta include to apply |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withMethod()

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Selects which backend endpoint flavor to use when listing dashboards. Default method: "GET"

**Signature:**

```typescript
withMethod(method: QueryMethod): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| method | [QueryMethod](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.querymethod/index.md) | endpoint flavor to use ("GET" or "POST") |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withOrigin()

Sets origin for the query.

**Signature:**

```typescript
withOrigin(origin: ObjectOrigin | (string & {})): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| origin | ObjectOrigin \| (string &amp; {}) | origin to apply. This is an open string union to allow platform-specific origin values in addition to the built-in literals. |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withPage()

Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0

**Signature:**

```typescript
withPage(page: number): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| page | number | zero indexed, must be non-negative |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withSize()

Sets number of dashboards to return per page. Default size: 50

**Signature:**

```typescript
withSize(size: number): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| size | number | desired max number of dashboards per page must be a positive number |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query

### IDashboardsQuery.withSorting()

Sets sorting for the query.

**Signature:**

```typescript
withSorting(sort: string[]): IDashboardsQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sort | string[] | Sorting criteria in the format: property,(asc\|desc). Default sort order is ascending. Multiple sort criteria are supported. |

**Returns:**

[IDashboardsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.idashboardsquery/index.md)

dashboards query
