Skip to main content

Manage Policies

Control which sources and libraries your teamspace can access
3 min read

Policies control source access and library search results for your teamspace. Configure them from the policies tab of your dashboard, or programmatically through the Policies API.

Settings apply to requests made with a teamspace API key. Some filters affect search results only, as described below.

Note
Policies are scoped to a teamspace. Only owners and admins can change them; developers have read-only access.

Source Type Access#

The Source Type Access card toggles entire categories of sources on or off. Disabling a type excludes it from results, subject to the quality-mode exceptions described below.

GroupSource TypeWhat it covers
Public SourcesPublic RepositoriesPublic GitHub repositories
Public SourcesWebsitesIndexed documentation websites
Public SourcesLLMs.txtllms.txt sources
Connected SourcesConfluenceAtlassian Confluence workspace pages
Connected SourcesUploaded FilesUploaded OpenAPI specs and PDFs
Connected SourcesNotionConnected Notion pages
Connected SourcesPrivate SourcesPrivately parsed repositories

Library Filters#

The Library Filters card decides which public libraries are accessible. Choose one of two modes:

Filter by Quality#

Allow any public library that clears the quality bar you set. Available filters:

FilterOptions
VerificationAll · Verified Only
Trust scoreAll · Medium (4+) · High (7+)
FreshnessAll · 30 days · 90 days · 1 year
Repo starsAll · 100+ · 1,000+ · 10,000+
Website backlinksAll · 500+ · 2,500+ · 5,000+
Referring domainsAll · 100+ · 500+ · 1,000+
Organic trafficAll · 100+ · 1,000+ · 10,000+

Search combines enabled filters with AND semantics. A result must pass each applicable check unless an exception applies. Leaving a filter on All disables that check.

Star and license filters apply only to public GitHub repositories. Websites and other non-repo sources pass through those checks. Backlink, referring-domain, and organic-traffic thresholds apply only to websites.

You can filter public repository search results by an allowlist of SPDX license identifiers, such as MIT or Apache-2.0.

Note

License filtering only affects search results. Direct /api/v2/context requests and query-docs calls with a known library ID do not enforce the license allowlist.

You can also maintain two override lists in quality mode:

  • Blocked libraries exclude matching libraries even if they pass the quality checks.
  • Excepted libraries bypass quality checks and can override source type restrictions. Search still excludes private sources when Private Sources is disabled.

In search, an exception overrides a blocked entry only when both entries are identical. For example, excepting /org/repo does not override a blocked /org, and excepting /org does not override a blocked /org/repo. Remove the overlapping blocked entry to make the exception work in search.

Direct context requests give a matching exception priority over blocked entries. Search and direct context access can therefore differ for overlapping organization and library entries.

Select Manually#

Ignore the quality bar entirely and grant access only to a hand-picked list of libraries. Anything not on the list is inaccessible.

Note
The card shows the number of libraries currently accessible under your settings, so you can see the impact before saving.

Managing Policies via API#

The same configuration is available over the REST API using a teamspace API key:

  • Get PoliciesGET /api/v2/policies returns the current configuration and accessible library count.
  • Update PoliciesPATCH /api/v2/policies applies an incremental update; only the fields you include are changed.

See the API Guide for request and response details.