---
title: "GET /api/database/views/{view_id}/group_bys/"
method: GET
path: "/api/database/views/{view_id}/group_bys/"
tags: ["Database table view groupings"]
---

# GET /api/database/views/{view_id}/group_bys/

`GET /api/database/views/{view_id}/group_bys/`

Lists all groupings of the view related to the provided `view_id` if the user has access to the related database's workspace. A view can have multiple groupings.

## Path parameters

- `view_id` integer, required

## Response `200`

- ViewGroupBy[]
  - `id` integer, required
  - `view` integer, required — The view to which the group by applies. Each view can have his own group bys.
  - `field` integer, required — The field that must be grouped by.
  - `order` 'ASC' | 'DESC' — * `ASC` - Ascending * `DESC` - Descending
  - `width` integer — The pixel width of the group by in the related view.
  - `type` string — Indicates the sort type. Will automatically fall back to `default` if incompatible with field type.
  - `priority` integer, required — Position of this group by in the ordering chain. The group by with the lowest priority is applied first.

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/revisions/0c490e5b0c7f/schema)
