RepoVault API
REST API for managing system repositories, files, deployments, and the secure vault. All requests must be authenticated via API key.
Authentication
Include your API key in every request using one of these methods:
X-API-KEY: your_api_key_here
-- or --
Authorization: Bearer your_api_key_here
Error Responses
All errors return a JSON object with an error field:
{ "error": "Description of what went wrong" }
401 - Missing API key
403 - Invalid API key
400 - Bad request / validation
404 - Resource not found
429 - Rate limit exceeded
500 - Internal server error
Repositories
GET
/api/repos
List all repositories
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| owneroptional | string | Filter by account (navaLinh, veryLinh, velyrich, Vellia-Elyvia). Omit to fetch all. |
Response
{
"success": true,
"data": {
"navaLinh": {
"repos": [
{
"name": "my-repo",
"full_name": "navaLinh/my-repo",
"owner": "navaLinh",
"private": false,
"default_branch": "main",
"size": 1024,
"updated_at": "2024-01-15T10:30:00Z",
"language": "JavaScript"
}
],
"count": 1
}
}
}
GET
/api/repos/:owner/:repo
Get single repository
Auth
Example
GET /api/repos/navaLinh/my-project
X-API-KEY: your_key
GET
/api/repos/:owner/:repo/commits
Get commit history
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| pathoptional | string | Filter commits by file path |
| per_pageoptional | number | Results per page (default: 10, max: 100) |
GET
/api/repos/:owner/:repo/tree
Get full repo file tree
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| refoptional | string | Branch name (default: repo default branch) |
| recursiveoptional | boolean | Include all subdirectories (default: true) |
Files
GET
/api/files
List directory contents
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| ownerrequired | string | System account username |
| reporequired | string | Repository name |
| pathoptional | string | Directory path (default: root) |
| refoptional | string | Branch or commit SHA |
GET
/api/files/content
Get file content (decoded)
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| ownerrequired | string | System account username |
| reporequired | string | Repository name |
| pathrequired | string | File path in repository |
| refoptional | string | Branch or commit SHA |
Response
{
"success": true,
"data": {
"name": "index.js",
"path": "src/index.js",
"sha": "abc123...",
"size": 1024,
"content": "// file content here...",
"encoding": "utf8"
}
}
PUT
/api/files
Create or update file
Auth
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| ownerrequired | string | System account username |
| reporequired | string | Repository name |
| pathrequired | string | File path in repository |
| contentrequired | string | File content (UTF-8 string) |
| shaoptional | string | Existing file SHA (required for updates) |
| messageoptional | string | Commit message (auto-generated if omitted) |
| branchoptional | string | Target branch (default: repo default) |
Example Request
PUT /api/files
X-API-KEY: your_key
Content-Type: application/json
{
"owner": "navaLinh",
"repo": "my-project",
"path": "src/index.js",
"content": "console.log('hello world');",
"sha": "abc123...",
"message": "fix: update entry point"
}
DELETE
/api/files
Delete a file
Auth
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| ownerrequired | string | System account username |
| reporequired | string | Repository name |
| pathrequired | string | File path to delete |
| sharequired | string | Current file SHA (from GET /api/files/content) |
| messageoptional | string | Commit message |
| branchoptional | string | Target branch |
Deployment
POST
/api/deploy/zip
Deploy ZIP to repository
Auth
This replaces ALL repository contents with the ZIP. Rate limited to 10 deploys/hour.
Request (multipart/form-data)
| Field | Type | Description |
|---|---|---|
| zipfilerequired | file | ZIP archive (max 100MB) |
| ownerrequired | string | System account username |
| reporequired | string | Repository name |
| branchoptional | string | Target branch (default: repo default) |
Response
{
"success": true,
"deployId": "550e8400-e29b-41d4-a716-446655440000",
"message": "Deployment started"
}
GET
/api/deploy/status/:deployId
Poll deployment status
Auth
Response
{
"success": true,
"data": {
"id": "550e8400-...",
"owner": "navaLinh",
"repo": "my-project",
"branch": "main",
"status": "success", // running | success | failed
"file_count": 42,
"commit_sha": "abc123def456",
"steps": [
{ "ts": "...", "type": "info", "message": "Validating ZIP archive..." },
{ "ts": "...", "type": "success", "message": "Deployment complete!" }
]
}
}
GET
/api/deploy/history
List recent deployments (last 20)
Auth
Secure Vault
GET
/api/vault
List vault entries
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| categoryoptional | string | Filter by category |
| searchoptional | string | Search title or content |
POST
/api/vault
Add vault entry
Auth
Request Body
| Field | Type | Description |
|---|---|---|
| titlerequired | string | Entry title |
| contentrequired | string | Sensitive content |
| categoryoptional | string | Category label (default: general) |
PUT
/api/vault/:id
Update vault entry
Auth
DELETE
/api/vault/:id
Delete vault entry
Auth
System
GET
/api/system
System info and health
Auth
Response
{
"success": true,
"data": {
"name": "System Repository Manager",
"version": "1.0.0",
"env": "production",
"uptime": 3600,
"accounts": ["navaLinh", "veryLinh", "velyrich", "Vellia-Elyvia"],
"timestamp": "2024-01-15T10:30:00Z"
}
}
GET
/api/logs
Get audit logs
Auth
Query Parameters
| Param | Type | Description |
|---|---|---|
| dateoptional | string | Date in YYYY-MM-DD format (default: today) |
RepoVault API v1.0.0 — All endpoints require authentication —
Back to Dashboard