Create a collection
Requirescollections:write and a paid plan:
Node.js and Python examples use the Bulkgrid SDKs. Set BULKGRID_API_KEY in your backend environment; cURL examples also use BULKGRID_BASE_URL=https://bulkgrid.com.
Include and exclude content
Collection rules support:- action:
includeorexclude - target:
source,folder, orurl - source context through
source_id - target value through
target_id - optional metadata on added rules
Read and update rules
GET /api/v1/collections/{collectionId}/rules requires collections:read. PATCH on the same path requires collections:write and accepts add and remove arrays.
Each rule uses action, target, source_id, and target_id. Source targets identify the source, folder targets identify a folder path, and URL targets identify a document URL. Use IDs and paths returned for sources available to your workspace.
Include an entire source
SetSOURCE_ID and COLLECTION_ID to the IDs returned when creating or listing those resources. This expands the collection’s searchable content. The CLI requires a scoped API key, as described in CLI setup.
Choose the scope
- include an entire source
- include one folder from a source
- exclude a noisy subfolder
- include or exclude specific URLs
Inspect effective coverage
The rules endpoint does more than just list rules. It also returns:- aggregate rule counts
- effective counts by source
Search and access
PasscollectionId to search to restrict retrieval to a collection. Select approved collections when creating an API key or approving an OAuth connection. A search filter cannot grant access beyond the credential’s approved collections.
Manage AI and CLI grants in Connected Apps. See Authentication and API key scopes.
Manage collections
UseGET /api/v1/collections with collections:read to list collections. Use PATCH /api/v1/collections/{collectionId} with collections:write to update a collection. Collection creation requires a paid plan; see plan limits.