PATCH /v1/integrations/{integrationId}/resource-kinds/{resourceKind}/resources on the Manage Vanta API. Out-of-scope resources stay visible in the inventory but stop counting as compliance evidence and stop running through tests. The build prompt below generates a scheduled job that applies regex-based scoping rules — like “exclude every dev-* GCP project” — in batches of 50.
Before you begin
This guide is for Vanta admins managing data inside their own Vanta account. You’ll need:- A Manage Vanta API token.
- The token must have scopes
vanta-api.all:readandvanta-api.all:write. - At least one connected integration whose resources you want to scope.
inScope: false excludes it from those tests entirely. Use it for sandbox accounts, test instances, or systems explicitly outside your audit boundary.
Want to know which resources are scopable before you write code?
GET /v1/integrations/{integrationId}/resource-kinds/{resourceKind} returns isScopable: true|false along with numResources / numInScope counters.1
Find the resources you want to scope
Your terminal — pick the Response (truncated)Copy each
integrationId and resourceKind you’re targeting, then list resources with the filters you care about. Common choices: isInScope=true to find things to scope out, or isInScope=false to bring something back in.Terminal
resourceId you want to update — you’ll send them in Step 2.Got a 401?
Got a 401?
Token is expired (one-hour lifetime), missing, or lacks
vanta-api.all:read. Mint a fresh one — see Authentication → Token expiration.Don't know the integrationId or resourceKind?
Don't know the integrationId or resourceKind?
Neither value is fixed across accounts. Discover both from your own tenant:
- Call
GET /v1/integrationsto list your connected integrations. TheintegrationIdis a lowercase slug likeaws,gcp,okta, orsnowflake. - Call
GET /v1/integrations/{integrationId}/resource-kindsto list the resource kinds that integration exposes (e.g.GCPComputeInstance). Both values are case-sensitive in the resource paths.
Multiple connections for the same integration?
Multiple connections for the same integration?
Pass
connectionId=<id> to filter to a single connection (e.g. one of two GCP projects). Without it, the response covers every connection for that integration.Resource kind isn't scopable?
Resource kind isn't scopable?
Some resource kinds (e.g. policy compliance results) can’t be scoped out —
isScopable will be false on the resource-kind details. Trying to update those will return an error.2
Update scope in bulk
Your terminal — Expected response (
PATCH /v1/integrations/{integrationId}/resource-kinds/{resourceKind}/resources with an updates array. Each entry is keyed by id (the resourceId) and may set inScope, ownerId, and/or description.200) — a per-resource result so you can tell which entries failed:Got an ERROR in results?
Got an ERROR in results?
The
message field tells you which entry failed and why — typically because the id doesn’t belong to that (integrationId, resourceKind) or the resource kind isn’t scopable. Successful entries are still applied; only fix and retry the failures.Got a 404 on the path?
Got a 404 on the path?
The
integrationId or resourceKind is wrong. They’re case-sensitive — gcp and GCPComputeInstance are different fields. Re-run Step 1 to confirm the exact spellings.Got a 403?
Got a 403?
Your token has
vanta-api.all:read but not vanta-api.all:write. Mint a token with both scopes.Updating one resource at a time? Use
PATCH /v1/integrations/{integrationId}/resource-kinds/{resourceKind}/resources/{resourceId} with { "inScope": false }. It returns 204 No Content on success and is the right call when you’re reacting to a single event (e.g. a webhook from your tagging system).