---
title: "Set Resources"
method: PUT
path: "/api/v1/integrations/{provider}/resources"
tags: ["integrations"]
---

# Set Resources

`PUT /api/v1/integrations/{provider}/resources`

## Request

- Base URL: `https://api.aws.cognee.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.aws.cognee.ai/api/v1/integrations/{provider}/resources`
- Auth: API key in header `X-Api-Key`

Narrow this connection to the given resources. Owner-only.

Owner-only because it decides what the tenant pays to ingest and what
becomes readable to everyone in the workspace — the same reason
connecting and disconnecting are owner-only.

All three states are accepted (a connector with ``selection_allows_all``
false refuses ``null`` and ``[]``, and refuses ids in
``refused_resource_ids`` and beyond ``max_selected_resources``, with a
422), and they are three different answers:
``null`` stops narrowing (everything, including what is added later),
``[]`` narrows to nothing, a list narrows to exactly those. An empty
list is a valid, meaningful choice and is *not* the same as never
having chosen.

``account_id`` picks one connection when the tenant holds several to
the same provider (CLO-528); omitted, this is the pre-existing
"most recently connected wins" behavior.

## Path parameters

- `provider` string, required

## Query parameters

- `tenant_id` string, uuid, required
- `account_id` string, nullable

## Request body

- ResourceSelection: The picker's payload: which resources this connection should ingest. A full selection, not a patch — the picker always submits everything, so a concurrent edit from another tab loses cleanly rather than merging two half-intentions into a set nobody chose. The three states the rest of the design is built on are all expressible here, which is the point: * ``null`` — stop narrowing. Everything the connection covers, *including resources added later*. * ``[]`` — narrowed to nothing. * ``["a", "b"]`` — exactly these. ``null`` matters more than it looks. Without it, narrowing is a one-way door: ticking every box stores an explicit list, and a repository added to the installation next month is then silently never ingested. Re-ticking everything would not help — an exhaustive list is still a list.
  - `resource_ids` string[], nullable, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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