---
title: "Replace the scope of a resource grant"
method: PATCH
path: "/v1/apps/{id}/grants/{grantId}"
tags: ["Apps"]
---

# Replace the scope of a resource grant

`PATCH /v1/apps/{id}/grants/{grantId}`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/apps/{id}/grants/{grantId}`
- Auth: HTTP bearer

Replaces the owner-set scope of one of the app's resource grants. For rule mining, `exclude_tables` on a `source_connection` or `column_profile` grant hides those tables from the mining agent's schema listing and column profiles. Names are trimmed and lower-cased, and duplicates are dropped. `scope: null`, or an empty list, clears the scope. Requires the `owner` access tier on the app.

## Path parameters

- `id` string, uuid, required
- `grantId` string, uuid, required

## Request body

- object
  - `scope` AppGrantScope, nullable
    - `exclude_tables` string[]: Tables hidden from a mining agent's schema listing and column profiles, bare or `schema.table`.

## Response `200`

The grant with its stored scope.

- AppResourceGrant
  - `id` string, uuid
  - `customer_id` string, uuid
  - `app_id` string, uuid
  - `resource_type` 'data_product' | 'reference_table' | 'source_connection' | 'app' | 'action' | 'app_run_set' | 'pipeline' | 'spec' | 'review' | 'document_source' | 'query_template' | 'column_profile' | 'field_registry'
  - `resource_id` string: A UUID for platform resources, the action name for `action`, or `*` for every resource of the type.
  - `access` 'read' | 'act' | 'write'
  - `scope` AppGrantScope, nullable
    - `exclude_tables` string[]: Tables hidden from a mining agent's schema listing and column profiles, bare or `schema.table`.
  - `created_by` string, nullable
  - `created_at` string, date-time

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `429`: Daily rate limit exceeded.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/apps/:id/grants/:grantId/patch.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
