---
title: "Replace RLS viewer assignments"
method: PUT
path: "/dashboards/{dashboard_id}/rls/assignments"
tags: ["Dashboard"]
---

# Replace RLS viewer assignments

`PUT /dashboards/{dashboard_id}/rls/assignments`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/{dashboard_id}/rls/assignments`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Editor-only. Replaces the full set of per-viewer RLS value assignments. Each entry must grant something (all_access or a non-empty values list).

## Path parameters

- `dashboard_id` integer, required

## Request body

- RlsAssignmentsSpec: Per-viewer RLS value assignments
  - `params` RlsAssignmentsParams, required: RLS assignment parameters
    - `assignments` RlsAssignmentEntry[]: Full replacement set of per-viewer RLS assignments
      - `email` string, required: Viewer email the values are granted to
      - `all_access` boolean: Bypass RLS entirely (super-user / admin)
      - `values` string[]: Allowed filter-column values (ignored when all_access=true)

## Response `200`

Request fulfilled, document follows

- unknown

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
