codespacesCheckPermissionsForDevcontainer
Check if permissions defined by a devcontainer have been accepted by the authenticated user
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/codespaces/permissions_check - Operation ID:
codespaces/check-permissions-for-devcontainer
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"ref": {
"description": "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](https://git-scm.com/book/en/v2/Git-Internals-Git-References)\" in the Git documentation.",
"required": true,
"location": "query",
"type": "string"
},
"devcontainer_path": {
"description": "Path to the devcontainer.json configuration to use for the permission check.",
"required": true,
"location": "query",
"type": "string"
}
}Response Schema
{
"title": "Codespaces Permissions Check",
"description": "Permission check result for a given devcontainer config.",
"type": "object",
"properties": {
"accepted": {
"description": "Whether the user has accepted the permissions defined by the devcontainer config",
"example": true,
"type": "boolean"
}
},
"required": [
"accepted"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('codespacesCheckPermissionsForDevcontainer', {
# Add required parameters here
})