---
title: "Rest API query NOT returning all rows"
description: "Opsview Rest API queries return only 50 rows by default when listing hosts. To retrieve all rows, include rows=all in the query parameters."
url: "https://docs.itrsgroup.com/docs/faq/opsview/24935471585565-opsview-rest-api-query-not-returning-all-rows/index.html"
---
## Problem

Querying host only list 50 rows instead of all rows.

Example query command:

```
/opt/opsview/coreutils/bin/opsview_rest --username="" --password="" --pretty --data-format=json GET /rest/config/host
```

### Cause

The default rows are set to 50.

- Snippet from the UI located in Configuration > Hosts > List

- ![Opsview - Rest API query NOT returning all rows](https://docscdn.itrsgroup.com/faq/images/opsview/24935471585565-24935488463645-mceclip0.png)

### Solution

To achieve this, `rows=all` needs to be included in the query.

Run as root user:

```
/opt/opsview/coreutils/bin/opsview_rest --username=admin --password="initial" --pretty --data-format=json GET /rest/config/host?rows=all
```

## Related Articles

<https://docs.itrsgroup.com/docs/opsview/current/rest-api/rest-api-overview/request/api-overview-parameters/index.html>


