Search + K

Command Palette

Search for a command to run...

Sign In

Check if permissions defined by a devcontainer have been accepted by the authenticated user

GET /repos/{owner}/{repo}/codespaces/permissions_check
Copy endpoint
https://api.github.com

Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.

OAuth app tokens and personal access tokens (classic) need the codespace scope to use this endpoint.

Parameters

path Path Parameters

Name Type
owner required

The account owner of the repository. The name is not case sensitive.

string
repo required

The name of the repository without the .git extension. The name is not case sensitive.

string

query Query Parameters

Name Type
ref required

The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of ref will typically be a branch name (heads/BRANCH_NAME). For more information, see "Git References" in the Git documentation.

string
devcontainer_path required

Path to the devcontainer.json configuration to use for the permission check.

string

Responses

200 application/json

Response when the permission check is successful

interface CodespacesPermissionsCheckForDevcontainer {
accepted: boolean;
}

Client Errors

401 application/json

Requires authentication

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
403 application/json

Forbidden

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
404 application/json

Resource not found

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json

Validation failed, or the endpoint has been spammed.

interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}
[]
;
}

Server Errors

503 application/json

Service unavailable

{ code?: string;message?: string;documentation_url?: string; }