Get a Copilot Space for a user
Gets details about a specific Copilot Space owned by a user. The authenticated user must have read access to the Space.
Private user spaces require the authenticated user to be the owner of the space. Public user spaces are accessible to any authenticated user.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The handle for the GitHub user account.
The unique identifier of the Copilot Space.
Responses
Section titled “ Responses ”Response
A GitHub Copilot Space represents an interactive AI workspace where users can ask questions and get assistance.
object
The unique identifier of the space.
The number that identifies the space within its owner.
The display name of the space.
A description of the space.
General instructions for the Copilot Space.
The base role that determines default permissions.
no_access: No default accessreader: Default read permissionswriter: Default write permissions (organization spaces only)admin: Default admin permissions (organization spaces only)
A GitHub user.
object
A GitHub organization.
object
A GitHub user.
object
The date and time the space was created.
The date and time the space was last updated.
The HTML URL of the space.
The API URL of the space.
Resources attached to the space.
object
The unique identifier of the resource.
The type of resource.
The unique identifier of the chat attachment for uploaded files or media content.
The date and time the resource was created.
The date and time the resource was last updated.
Metadata specific to the resource type.
object
Repository ID for repository or file resources.
File path for file resources.
Text content for free text resources.
Name for the resource.
Issue or PR number.
Chat attachment ID for uploaded files or media.
Media type for media content resources.
URL for media content resources.
Height for media content resources.
Width for media content resources.
Examples
Example response for a user copilot space
{ "id": 42, "number": 5, "name": "My Development Space", "description": "Personal space for React development patterns", "general_instructions": "Focus on React functional components, hooks, and modern development patterns", "owner": { "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 }, "creator": { "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 }, "created_at": "2023-02-15T08:30:00Z", "updated_at": "2023-02-15T14:45:00Z", "html_url": "https://github.com/copilot/spaces/octocat/5", "api_url": "https://api.github.com/user/1/copilot-spaces/5", "base_role": "no_access", "resources_attributes": [ { "id": 789, "resource_type": "github_file", "metadata": { "repository_id": 1234, "file_path": "src/components/App.tsx" } }, { "id": 790, "resource_type": "free_text", "metadata": { "name": "React Best Practices", "text": "Use functional components with hooks" } } ]}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}