All /api/v1/* endpoints require X-Agent-Name and X-Agent-Token headers.
GET /health
No authentication required.
Response:
{
"status": "healthy",
"agent_count": 3,
"version": "1.0.0"
}GET /api/v1/token
POST /api/v1/token
Headers:
X-Agent-Name: Agent identifierX-Agent-Token: Pre-signed authentication token
Optional POST body (for scoped tokens):
{
"repositories": ["repo-name"],
"permissions": {"contents": "read"}
}Response:
{
"token": "ghs_xxxxxxxxxxxx",
"expires_at": "2024-01-15T12:00:00Z",
"permissions": {"contents": "write"},
"repository_selection": "all"
}POST /api/v1/git-credentials
Request:
{
"protocol": "https",
"host": "github.com",
"path": "owner/repo"
}Response:
{
"protocol": "https",
"host": "github.com",
"username": "x-access-token",
"password": "ghs_xxxxxxxxxxxx"
}GET /api/v1/identity
Response:
{
"agent_name": "agent-claude-1",
"identity": {
"name": "Claude Agent 1",
"email": "claude-1@users.noreply.github.com"
},
"ssh_key_id": "SHA256:xxxxxxxx"
}POST /api/v1/ssh/sign
Request:
{
"data": "data to sign",
"namespace": "git"
}Response:
{
"signature": "-----BEGIN SSH SIGNATURE-----\n...",
"key_id": "SHA256:xxxxxxxx",
"signer_identity": {
"name": "Claude Agent 1",
"email": "claude-1@users.noreply.github.com"
}
}GET /api/v1/ssh/public-key
Response:
{
"public_key": "ssh-rsa AAAAB3...",
"key_id": "SHA256:xxxxxxxx",
"identity": {
"name": "Claude Agent 1",
"email": "claude-1@users.noreply.github.com"
}
}