---
title: "Set Access Grant"
method: PUT
path: "/api/v1/admin/block/dataset-restrictions"
tags: ["Admin APIs", "block-dataset-restrictions"]
---

# Set Access Grant

`PUT /api/v1/admin/block/dataset-restrictions`

Upsert the served lag for ``(client_id, dataset_id, cut)`` — legacy
single-row path (no rationale, no bulk-save). The Manage Data
Restrictions admin UI uses ``bulk-update/`` below instead.

Omit ``expected_row_version`` to create. Include it to update the
existing row under optimistic concurrency. ``served_lag=null`` records
"no access"; clients should ``DELETE`` to clear the restriction
entirely (which, under default-deny, is equivalent to no access).

## Request body

- BlockClientDataAccessSet — Upsert body for ``PUT /block/dataset-restrictions`` (legacy single-row path — kept at its original contract; the new admin UI uses the bulk endpoint below instead). ``expected_row_version`` is required to update an existing row (optimistic concurrency); omit it to create. ``served_lag = None`` records "no access" (``access`` is derived server-side: ``False`` when ``served_lag`` is ``None``, ``True`` otherwise — this endpoint has never had a way to express "granted, freshest lag", which under the old default-allow model was reachable only via row absence). Use ``DELETE`` to remove the row entirely — under default-deny that now means "no access" rather than "unrestricted".
  - `client_id` string, uuid, required
  - `dataset_id` string, required
  - `cut` string, nullable
  - `served_lag` string, nullable
  - `expected_row_version` integer, nullable

## Response `200`

Successful Response

- BlockClientDataAccessRead
  - `id` string, uuid, required
  - `client_id` string, uuid, required
  - `client_name` string, nullable
  - `client_external_id` string, nullable
  - `dataset_id` string, required
  - `cut` string, nullable
  - `access` boolean
  - `sample_access` boolean
  - `served_lag` string, nullable
  - `served_lag_is_stale` boolean
  - `row_version` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by` string, nullable
  - `updated_by` string, nullable
  - `previous_rationale` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/carbonarc/apis/carbon-arc-client-admin-api.md) · [All operations](https://skmtc.net/carbonarc/apis/carbon-arc-client-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/carbonarc/carbon-arc-client-admin-api/revisions/a8ca30023371/schema)
