Skip to main content
Skip to content

Copilot 모델 정책 관리를 위한 REST API 엔드포인트

REST API를 사용하여 조직의 Copilot 모델 정책을 관리합니다.

Get model policies for an organization

Use this endpoint to retrieve the effective Copilot model policy for every model available to an organization, whether explicitly configured or determined by default availability.

For a model without an effective explicit policy that is eligible for default availability, the enterprise default is used when it is configured. Otherwise, the organization's default is used. A model that is not eligible for default availability and has no effective explicit policy is disabled. For more information, see About default availability of Copilot models.

The organization must either be independent or belong to an enterprise that is not using enterprise teams for model policy.

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 model policies for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "Administration" organization permissions (write)

"Get model policies for an organization"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

"Get model policies for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

"Get model policies for an organization"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

get/orgs/{org}/copilot/model-policies
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/model-policies

OK

Status: 200
{ "default_availability": { "policy_state": "disabled", "editable": true }, "models": [ { "model_name": "gpt-5.6-sol", "display_name": "OpenAI GPT-5.6 Sol", "policy_state": "enabled" }, { "model_name": "gpt-5", "display_name": "GPT-5", "policy_state": "disabled" } ] }

Update model policies for an organization

Use this endpoint to set explicit Copilot model policies and default availability for an organization. All policies in the request are updated atomically, meaning if any change in the request cannot be applied, none of the changes are saved.

Use the model_name values returned by the "Get model policies for an organization" endpoint. Models with an inherited enterprise policy are locked and cannot be updated. Default availability cannot be updated when its editable value is false.

The response contains the effective policies for all models available to the organization, not only the policies updated by the request.

The organization must either be independent or belong to an enterprise that is not using enterprise teams for model policy.

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 apply.

"Update model policies for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "Administration" organization permissions (write)

"Update model policies for an organization"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

본문 매개 변수
이름, 유형, 설명
default_availability object

The organization's default availability for eligible models without an explicit policy. It cannot be updated when it is inherited from the enterprise.

이름, 유형, 설명
policy_state string 필수

다음 중 하나일 수 있습니다.: enabled, disabled

models array of objects

The model policies to update. Each model_name must be unique.

이름, 유형, 설명
model_name string 필수

The public identifier of a model returned by the get endpoint.

policy_state string 필수

The explicit policy state to set for the organization.

다음 중 하나일 수 있습니다.: enabled, disabled

"Update model 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 model policies for an organization"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

patch/orgs/{org}/copilot/model-policies
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/model-policies \ -d '{"default_availability":{"policy_state":"disabled"},"models":[{"model_name":"gpt-5.6-sol","policy_state":"enabled"},{"model_name":"gpt-5","policy_state":"disabled"}]}'

OK

Status: 200
{ "default_availability": { "policy_state": "disabled", "editable": true }, "models": [ { "model_name": "gpt-5.6-sol", "display_name": "OpenAI GPT-5.6 Sol", "policy_state": "enabled" }, { "model_name": "gpt-5", "display_name": "GPT-5", "policy_state": "disabled" } ] }