Copilot 기능 정책 관리를 위한 REST API 엔드포인트
REST API를 사용하여 조직의 Copilot 기능 정책을 관리합니다.
Get feature policies for an organization
Note
This endpoint is in public preview and is subject to change.
Use this endpoint to retrieve the Copilot default availability policy for new features and clients for an organization.
The enterprise default is used when the enterprise has set one. Otherwise, the organization's
own default is used, and an organization that has not enabled a default is reported as
disabled. For more information, see
About default availability.
Organization owners can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.
Organization SAML authorization and OAuth app access restrictions also apply.
"Get feature policies for an organization"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Administration" organization permissions (write)
"Get feature policies for an organization"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
"Get feature policies for an organization"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
"Get feature policies for an organization"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/copilot/feature-policiesOK
Status: 200{
"default_availability": {
"policy_state": "enabled",
"editable": true
}
}Update feature policies for an organization
Note
This endpoint is in public preview and is subject to change.
Use this endpoint to update the Copilot default availability policy for new features and clients for an organization.
An organization can only set its own default while its enterprise has not set one. For more information, see About default availability.
Changing this policy does not change any Copilot feature or client policy that has already been set.
Organization owners can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.
Organization SAML authorization and OAuth app access restrictions also apply.
"Update feature policies for an organization"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Administration" organization permissions (write)
"Update feature policies for an organization"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
| 이름, 유형, 설명 | ||
|---|---|---|
default_availability object 필수 | ||
Properties of |
| 이름, 유형, 설명 |
|---|
policy_state string 필수The organization default policy applied to newly released Copilot features and clients. 다음 중 하나일 수 있습니다.: |
"Update feature policies for an organization"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Update feature policies for an organization"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/copilot/feature-policies \
-d '{"default_availability":{"policy_state":"enabled"}}'OK
Status: 200{
"default_availability": {
"policy_state": "enabled",
"editable": true
}
}