Manage access control for organization codespaces
Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
Which users can access codespaces in the organization. disabled means that no users can access codespaces in the organization.
The usernames of the organization members who should have access to codespaces in the organization. Required when visibility is selected_members. The provided list of usernames will replace any existing value.
Examples
{ "visibility": "selected_members", "selected_usernames": [ "johnDoe", "atomIO" ]}Responses
Section titled “ Responses ”Response when successfully modifying permissions.
Not modified
Users are neither members nor collaborators of this organization.
Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}