Overview
GitHub has introduced the Content Exclusion REST API for GitHub Copilot, now available in public preview. This new API empowers organization and enterprise administrators to programmatically manage content exclusion rules at scale, automating governance workflows that were previously handled through the UI.
Key Features
The API provides the following capabilities:
- GET operations to retrieve current content exclusion rules and configurations
- SET operations to create and update exclusion policies
- Dual-level support for both organization and enterprise administrators
- JSON-based interface for straightforward integration with existing tooling and automation platforms
Getting Started
Administrators can access the API documentation at the GitHub REST API docs for full implementation details. The feature builds on GitHub's existing content exclusion capabilities, which allow teams to prevent Copilot from using certain repositories or code patterns as context.
Use Cases
This API is particularly valuable for enterprises with complex governance requirements, enabling automated enforcement of content policies across multiple teams and repositories without manual intervention through the GitHub UI.