API reference
Gluecron exposes a REST API at /api/v2/. All endpoints return JSON. Authenticated endpoints require a Bearer token in the Authorization header.
Authentication
Generate a personal access token at /settings/tokens. Tokens start with glc_ and are hashed (SHA-256) before storage — the plaintext is shown exactly once.
curl -H "Authorization: Bearer glc_your_token_here" \
https://gluecron.com/api/v2/reposTokens can also authenticate git over HTTPS — use the token as the password with any username.
Rate limits
| Surface | Limit | Window |
|---|---|---|
| API (anonymous) | 1 000 requests | 60 seconds |
| API (authenticated) | 4 000 requests | 60 seconds |
| AI commit message | 60 requests | 60 seconds per token |
| Login / register | 10–20 requests | 60 seconds per IP |
When a limit is exceeded the server returns 429 Too Many Requests with a Retry-After header.
Repositories
List your repos
GET /api/v2/repos
Response 200:
[
{
"id": "...",
"name": "my-project",
"fullName": "you/my-project",
"description": "...",
"isPrivate": false,
"defaultBranch": "main",
"starCount": 12,
"forkCount": 3,
"issueCount": 5,
"createdAt": "2025-01-15T10:00:00Z",
"updatedAt": "2025-06-01T14:30:00Z"
}
]Create a repo
POST /api/v2/repos
Content-Type: application/json
{
"name": "my-project",
"description": "Optional description",
"isPrivate": false,
"initReadme": true,
"defaultBranch": "main"
}
Response 201:
{ "id": "...", "name": "my-project", "fullName": "you/my-project" }Get a repo
GET /api/v2/repos/:owner/:repo
Response 200:
{ /* same shape as list item */ }Delete a repo
DELETE /api/v2/repos/:owner/:repo
Response 204 No ContentIssues
List issues
GET /api/v2/repos/:owner/:repo/issues?state=open&limit=25
Response 200:
[
{
"number": 42,
"title": "Bug in auth flow",
"body": "...",
"state": "open",
"author": "kit",
"createdAt": "2025-05-20T08:00:00Z"
}
]Create an issue
POST /api/v2/repos/:owner/:repo/issues
Content-Type: application/json
{
"title": "Bug in auth flow",
"body": "Steps to reproduce: ..."
}
Response 201:
{ "number": 42, "url": "/you/my-project/issues/42" }Close / reopen an issue
PATCH /api/v2/repos/:owner/:repo/issues/:number
Content-Type: application/json
{ "state": "closed" } // or "open"
Response 200:
{ "state": "closed" }Pull requests
List PRs
GET /api/v2/repos/:owner/:repo/pulls?state=open
Response 200:
[
{
"number": 17,
"title": "Add rate limiter",
"state": "open",
"baseBranch": "main",
"headBranch": "feat/rate-limit",
"isDraft": false,
"author": "kit",
"createdAt": "2025-06-01T09:00:00Z"
}
]Create a PR
POST /api/v2/repos/:owner/:repo/pulls
Content-Type: application/json
{
"title": "Add rate limiter",
"body": "## Summary
- Implements token-bucket rate limiter
## Test plan
- [ ] Run bun test",
"headBranch": "feat/rate-limit",
"baseBranch": "main"
}
Response 201:
{ "number": 17, "url": "/you/my-project/pulls/17" }Merge a PR
POST /api/v2/repos/:owner/:repo/pulls/:number/merge
Response 200:
{ "merged": true, "sha": "a3f9c2d..." }
// If gate checks fail:
Response 422:
{ "merged": false, "reason": "GateTest: leaked secret in src/config.ts" }Webhooks
Register a webhook
POST /api/v2/repos/:owner/:repo/webhooks
Content-Type: application/json
{
"url": "https://example.com/hooks/gluecron",
"secret": "mysecret",
"events": ["push", "pull_request", "issues", "star"]
}
Response 201:
{ "id": "...", "url": "https://example.com/hooks/gluecron" }Webhook payload shape
// push event
{
"event": "push",
"repo": { "owner": "you", "name": "my-project" },
"ref": "refs/heads/main",
"before": "<sha>",
"after": "<sha>",
"commits": [
{
"id": "<sha>",
"message": "feat: add rate limiter",
"author": { "name": "Kit", "email": "kit@example.com" }
}
],
"sender": { "username": "kit" }
}
// Signature header (verify with HMAC-SHA256 over raw body):
X-Gluecron-Signature: sha256=<hex>AI endpoints
Generate a commit message
POST /api/v2/ai/commit-message
Content-Type: application/json
{ "diff": "<git diff output>" }
Response 200:
{
"message": "feat(auth): add token-bucket rate limiter\n\nPrevents brute-force login attempts..."
}Semantic code search
GET /api/v2/repos/:owner/:repo/semantic-search?q=password+hashing&limit=10
Response 200:
[
{
"path": "src/lib/auth.ts",
"startLine": 12,
"endLine": 28,
"snippet": "...",
"score": 0.94
}
]Edit this page