usersListPublicKeysForUser
List public keys for a user
Details
- Method:
GET - Path:
/users/{username}/keys - Operation ID:
users/list-public-keys-for-user
Parameters
{
"username": {
"description": "The handle for the GitHub user account.",
"required": true,
"location": "path",
"type": "string"
},
"per_page": {
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
},
"page": {
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
}
}Response Schema
{
"type": "array",
"items": {
"title": "Key Simple",
"description": "Key Simple",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"last_used": {
"nullable": true,
"type": "string",
"format": "date-time"
}
},
"required": [
"key",
"id"
]
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('usersListPublicKeysForUser', {
# Add required parameters here
})