---
title: "PATCH /api/database/admin/views/{view_id}/"
method: PATCH
path: "/api/database/admin/views/{view_id}/"
tags: ["Admin"]
---

# PATCH /api/database/admin/views/{view_id}/

`PATCH /api/database/admin/views/{view_id}/`

Updates whether the specified view is publicly shared, if the requesting user is staff. This works even if the requesting user is not a member of the workspace the view belongs to, and can for example be used to unshare a publicly shared view that's being abused.

## Path parameters

- `view_id` integer, required

## Request body

- PatchedAdminViewUpdate
  - `public` boolean — Indicates whether the view must be publicly shared.

## Response `200`

- AdminView
  - `id` integer, required
  - `name` string, required
  - `slug` string — The unique slug where the view can be accessed publicly on.
  - `type` string, required
  - `table_id` integer, required
  - `table_name` string, required
  - `database_id` integer, required
  - `database_name` string, required
  - `workspace_id` integer, required
  - `workspace_name` string, required
  - `public` boolean — Indicates whether the view is publicly accessible to visitors.
  - `public_view_has_password` boolean, required
  - `owned_by_id` integer, required
  - `owned_by_username` string, required
  - `ownership_type` string — Indicates how the access to the view is determined. By default, views are collaborative and shared for all users that have access to the table.
  - `created_on` string, date-time, required

## Other responses

- `400`
- `401` — No response body
- `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/versions/0c490e5b0c7f/schema)
