API Documentation
CodeVault REST API v1 — authenticate with a Personal Access Token.
Machine-readable spec
A complete OpenAPI 3.1 description of every /api/v1/* endpoint is served alongside this page. Codegen tools (openapi-generator, oapi-codegen), MCP servers, and AI agents can consume either format directly.
Authentication
Create a token at /settings/tokens, then use it in requests:
Authorization: Bearer YOUR_TOKEN
Or via HTTP Basic Auth with your username and token as the password:
curl -u username:TOKEN https://your-instance/api/v1/user
Endpoints
User
GET
/api/v1/userAuthenticated userGET
/api/v1/users/{username}User profileRepositories
GET
/api/v1/repos/{owner}/{repo}Repo detailsGET
/api/v1/repos/{owner}/{repo}/branchesList branchesPOST
/api/v1/repos/{owner}/{repo}/branchesCreate branchDEL
/api/v1/repos/{owner}/{repo}/branches/{branch}Delete branchIssues
GET
/api/v1/repos/{owner}/{repo}/issuesList issuesPOST
/api/v1/repos/{owner}/{repo}/issuesCreate issueGET
/api/v1/repos/{owner}/{repo}/issues/{number}Get issuePOST
/api/v1/repos/{owner}/{repo}/issues/{number}/commentsCommentPull Requests
GET
/api/v1/repos/{owner}/{repo}/pullsList PRsPOST
/api/v1/repos/{owner}/{repo}/pullsCreate PRGET
/api/v1/repos/{owner}/{repo}/pulls/{number}Get PRCommit Status (CI/CD)
POST
/api/v1/repos/{owner}/{repo}/statuses/{sha}Set statusGET
/api/v1/repos/{owner}/{repo}/statuses/{sha}Get statusesPackages
POST
/api/v1/repos/{owner}/{repo}/packages/{type}Upload packageGET
/api/v1/repos/{owner}/{repo}/packages/{type}/{name}/{version}/files/{file}DownloadPagination
List endpoints support pagination via query parameters:
GET /api/v1/repos/{owner}/{repo}/issues?page=1&per_page=20
Response headers include:
X-Total-Count— total number of itemsLink— next/prev page URLs
Git Operations
# Clone (HTTP)
git clone http://your-instance/owner/repo.git
# Clone (SSH, port 2222)
git clone ssh://git@your-instance:2222/owner/repo.git
# Push with token auth
git remote set-url origin http://username:TOKEN@your-instance/owner/repo.git
Docker Registry
Docker Registry v2 API is available at /v2/:
# Login
docker login your-instance
# Push
docker tag myimage your-instance/owner/repo:latest
docker push your-instance/owner/repo:latest
# Pull
docker pull your-instance/owner/repo:latest