Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

Copilot 사용자 관리에 대한 REST API 엔드포인트

REST API를 사용하여 조직의 GitHub Copilot Business 또는 GitHub Copilot Enterprise 구독을 관리합니다.

Note

이러한 엔드포인트는 공개 미리 보기 버전이며 변경될 수 있습니다.

List all Copilot seat assignments for an enterprise

Note

This endpoint is in public preview and is subject to change.

Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.

Users with access through multiple organizations or enterprise teams will only be counted toward total_seats once.

For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the seats array. Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at. For more information about activity data, see "Reviewing user activity data for Copilot in your organization."

Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.

Personal access tokens (classic) need either the manage_billing:copilot or read:enterprise scopes to use this endpoint.

"List all Copilot seat assignments for an enterprise"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

"List all Copilot seat assignments for an enterprise"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
enterprise string Required

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

쿼리 매개 변수
속성, 형식, 설명
page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

기본값: 1

per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

기본값: 50

"List all Copilot seat assignments for an enterprise"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

500

Internal Error

"List all Copilot seat assignments for an enterprise"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/enterprises/{enterprise}/copilot/billing/seats
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/enterprises/ENTERPRISE/copilot/billing/seats

Response

Status: 200
{ "total_seats": 2, "seats": [ { "created_at": "2021-08-03T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": null, "last_activity_at": "2021-10-14T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "plan_type": "business", "assignee": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "assigning_team": { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null } }, { "created_at": "2021-09-23T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": "2021-11-01", "last_activity_at": "2021-10-13T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "assignee": { "login": "octokitten", "id": 1, "node_id": "MDQ76VNlcjE=", "avatar_url": "https://github.com/images/error/octokitten_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octokitten", "html_url": "https://github.com/octokitten", "followers_url": "https://api.github.com/users/octokitten/followers", "following_url": "https://api.github.com/users/octokitten/following{/other_user}", "gists_url": "https://api.github.com/users/octokitten/gists{/gist_id}", "starred_url": "https://api.github.com/users/octokitten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octokitten/subscriptions", "organizations_url": "https://api.github.com/users/octokitten/orgs", "repos_url": "https://api.github.com/users/octokitten/repos", "events_url": "https://api.github.com/users/octokitten/events{/privacy}", "received_events_url": "https://api.github.com/users/octokitten/received_events", "type": "User", "site_admin": false } } ] }

Get Copilot seat information and settings for an organization

Note

This endpoint is in public preview and is subject to change.

Gets information about an organization's Copilot subscription, including seat breakdown and feature policies. To configure these settings, go to your organization's settings on GitHub.com. For more information, see "Managing policies for Copilot in your organization."

Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.

"Get Copilot seat information and settings for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (read)
  • "Administration" organization permissions (read)

"Get Copilot seat information and settings for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

"Get Copilot seat information and settings for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

422

There is a problem with your account's associated payment method.

500

Internal Error

"Get Copilot seat information and settings for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/copilot/billing
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing

OK

Status: 200
{ "seat_breakdown": { "total": 12, "added_this_cycle": 9, "pending_invitation": 0, "pending_cancellation": 0, "active_this_cycle": 12, "inactive_this_cycle": 11 }, "seat_management_setting": "assign_selected", "ide_chat": "enabled", "platform_chat": "enabled", "cli": "enabled", "public_code_suggestions": "block", "plan_type": "business" }

List all Copilot seat assignments for an organization

Note

This endpoint is in public preview and is subject to change.

Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed. Only organization owners can view assigned seats.

Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at. For more information about activity data, see "Reviewing user activity data for Copilot in your organization."

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.

"List all Copilot seat assignments for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (read)
  • "Administration" organization permissions (read)

"List all Copilot seat assignments for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

쿼리 매개 변수
속성, 형식, 설명
page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

기본값: 1

per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

기본값: 50

"List all Copilot seat assignments for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

500

Internal Error

"List all Copilot seat assignments for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/copilot/billing/seats
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing/seats

Response

Status: 200
{ "total_seats": 2, "seats": [ { "created_at": "2021-08-03T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": null, "last_activity_at": "2021-10-14T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "plan_type": "business", "assignee": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "assigning_team": { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null } }, { "created_at": "2021-09-23T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": "2021-11-01", "last_activity_at": "2021-10-13T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "assignee": { "login": "octokitten", "id": 1, "node_id": "MDQ76VNlcjE=", "avatar_url": "https://github.com/images/error/octokitten_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octokitten", "html_url": "https://github.com/octokitten", "followers_url": "https://api.github.com/users/octokitten/followers", "following_url": "https://api.github.com/users/octokitten/following{/other_user}", "gists_url": "https://api.github.com/users/octokitten/gists{/gist_id}", "starred_url": "https://api.github.com/users/octokitten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octokitten/subscriptions", "organizations_url": "https://api.github.com/users/octokitten/orgs", "repos_url": "https://api.github.com/users/octokitten/repos", "events_url": "https://api.github.com/users/octokitten/events{/privacy}", "received_events_url": "https://api.github.com/users/octokitten/received_events", "type": "User", "site_admin": false } } ] }

Add teams to the Copilot subscription for an organization

Note

This endpoint is in public preview and is subject to change.

Purchases a GitHub Copilot seat for all users within each specified team. The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "About billing for GitHub Copilot in your organization."

Only organization owners can add Copilot seats for their organization members.

In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. For more information about setting up a Copilot subscription, see "Subscribing to Copilot for your organization." For more information about setting a suggestion matching policy, see "Managing policies for Copilot in your organization."

The response will contain the total number of new seats that were created and existing seats that were refreshed.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

"Add teams to the Copilot subscription for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)
  • "Administration" organization permissions (write)

"Add teams to the Copilot subscription for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

본문 매개 변수
속성, 형식, 설명
selected_teams array of strings Required

List of team names within the organization to which to grant access to GitHub Copilot.

"Add teams to the Copilot subscription for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
201

OK

401

Requires authentication

403

Forbidden

404

Resource not found

422

Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured.

500

Internal Error

"Add teams to the Copilot subscription for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

post/orgs/{org}/copilot/billing/selected_teams
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing/selected_teams \ -d '{"selected_teams":["engteam1","engteam2","engteam3"]}'

OK

Status: 201
{ "seats_created": 5 }

Remove teams from the Copilot subscription for an organization

Note

This endpoint is in public preview and is subject to change.

Sets seats for all members of each team specified to "pending cancellation". This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.

For more information about Copilot pricing, see "About billing for GitHub Copilot in your organization."

For more information about disabling access to Copilot Business or Enterprise, see "Revoking access to Copilot for members of your organization."

Only organization owners can cancel Copilot seats for their organization members.

The response will contain the total number of seats set to "pending cancellation".

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

"Remove teams from the Copilot subscription for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)
  • "Administration" organization permissions (write)

"Remove teams from the Copilot subscription for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

본문 매개 변수
속성, 형식, 설명
selected_teams array of strings Required

The names of teams from which to revoke access to GitHub Copilot.

"Remove teams from the Copilot subscription for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

422

Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured.

500

Internal Error

"Remove teams from the Copilot subscription for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

delete/orgs/{org}/copilot/billing/selected_teams
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing/selected_teams \ -d '{"selected_teams":["engteam1","engteam2","engteam3"]}'

OK

Status: 200
{ "seats_cancelled": 5 }

Add users to the Copilot subscription for an organization

Note

This endpoint is in public preview and is subject to change.

Purchases a GitHub Copilot seat for each user specified. The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "About billing for GitHub Copilot in your organization."

Only organization owners can add Copilot seats for their organization members.

In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. For more information about setting up a Copilot subscription, see "Subscribing to Copilot for your organization." For more information about setting a suggestion matching policy, see "Managing policies for Copilot in your organization."

The response will contain the total number of new seats that were created and existing seats that were refreshed.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

"Add users to the Copilot subscription for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)
  • "Administration" organization permissions (write)

"Add users to the Copilot subscription for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

본문 매개 변수
속성, 형식, 설명
selected_usernames array of strings Required

The usernames of the organization members to be granted access to GitHub Copilot.

"Add users to the Copilot subscription for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
201

OK

401

Requires authentication

403

Forbidden

404

Resource not found

422

Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured.

500

Internal Error

"Add users to the Copilot subscription for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

post/orgs/{org}/copilot/billing/selected_users
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing/selected_users \ -d '{"selected_usernames":["cooluser1","hacker2","octocat"]}'

OK

Status: 201
{ "seats_created": 5 }

Remove users from the Copilot subscription for an organization

Note

This endpoint is in public preview and is subject to change.

Sets seats for all users specified to "pending cancellation". This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.

For more information about Copilot pricing, see "About billing for GitHub Copilot in your organization."

For more information about disabling access to Copilot Business or Enterprise, see "Revoking access to Copilot for members of your organization."

Only organization owners can cancel Copilot seats for their organization members.

The response will contain the total number of seats set to "pending cancellation".

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

"Remove users from the Copilot subscription for an organization"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)
  • "Administration" organization permissions (write)

"Remove users from the Copilot subscription for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

본문 매개 변수
속성, 형식, 설명
selected_usernames array of strings Required

The usernames of the organization members for which to revoke access to GitHub Copilot.

"Remove users from the Copilot subscription for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

422

Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team.

500

Internal Error

"Remove users from the Copilot subscription for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

delete/orgs/{org}/copilot/billing/selected_users
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/copilot/billing/selected_users \ -d '{"selected_usernames":["cooluser1","hacker2","octocat"]}'

OK

Status: 200
{ "seats_cancelled": 5 }

Get Copilot seat assignment details for a user

Note

This endpoint is in public preview and is subject to change.

Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.

The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at. For more information about activity data, see "Reviewing user activity data for Copilot in your organization."

Only organization owners can view Copilot seat assignment details for members of their organization.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.

"Get Copilot seat assignment details for a user"에 대한 세분화된 액세스 토큰

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

세분화된 토큰에는 다음 권한 집합 중 하나 이상이 있어야 합니다.:

  • "GitHub Copilot Business" organization permissions (read)
  • "Administration" organization permissions (read)

"Get Copilot seat assignment details for a user"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

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

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

username string Required

The handle for the GitHub user account.

"Get Copilot seat assignment details for a user"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

The user's GitHub Copilot seat details, including usage.

401

Requires authentication

403

Forbidden

404

Resource not found

422

Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation.

500

Internal Error

"Get Copilot seat assignment details for a user"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/members/{username}/copilot
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/members/USERNAME/copilot

The user's GitHub Copilot seat details, including usage.

Status: 200
{ "created_at": "2021-08-03T18:00:00-06:00", "updated_at": "2021-09-23T15:00:00-06:00", "pending_cancellation_date": null, "last_activity_at": "2021-10-14T00:53:32-06:00", "last_activity_editor": "vscode/1.77.3/copilot/1.86.82", "plan_type": "business", "assignee": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "assigning_team": { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null } }