b6f89f9df0
- Resolve 57 merge conflicts from codebase restructure - Port dev feature code to new directory structure: * Update import paths to use @/ aliases * Add backward-compatible API signatures (createInstance, startInstance, deleteInstance) * Add missing type exports (ProjectWithRepos, InstanceHealth, Branch, BranchesResponse) * Extend Session and GitRepository types for dev features * Extend TerminalComponent props for mobile terminal wrapper * Add missing icon names (bell, drag, undo) Quality gates: tsc pass (0 errors), build pass, 127/131 tests pass (4 pre-existing failures unrelated to merge)
54 lines
1.3 KiB
Markdown
54 lines
1.3 KiB
Markdown
# API Documentation
|
|
|
|
## Overview
|
|
|
|
The Headquarter API is a RESTful API built with FastAPI. All endpoints (except auth) require authentication via session cookie.
|
|
|
|
## Base URL
|
|
|
|
- Development: `http://localhost:8000`
|
|
- Production: `https://api.yourdomain.com`
|
|
|
|
## Authentication
|
|
|
|
Most endpoints require authentication. Include the session cookie in requests:
|
|
|
|
```bash
|
|
curl http://api.example.com/endpoint \
|
|
-H "Cookie: session=your_session_cookie"
|
|
```
|
|
|
|
## Response Format
|
|
|
|
All responses are JSON. Error responses follow this format:
|
|
|
|
```json
|
|
{
|
|
"detail": "Error message"
|
|
}
|
|
```
|
|
|
|
## API Sections
|
|
|
|
- [Auth](auth.md) - Authentication endpoints
|
|
- [Projects](projects.md) - Project management
|
|
- [Repositories](repositories.md) - Git repositories and file operations
|
|
- [Config Profiles](config-profiles.md) - Config profile management with git mounts
|
|
- [Users](users.md) - User management and settings
|
|
- [Tool Types](tool-types.md) - Tool type management
|
|
- [Config Profiles](config-profiles.md) - Config profile management for tool instances
|
|
- [SSH Keys](ssh-keys.md) - SSH key management
|
|
|
|
## Testing
|
|
|
|
Interactive API documentation is available at `/docs` when running the backend:
|
|
|
|
```
|
|
http://localhost:8000/docs
|
|
```
|
|
|
|
This provides:
|
|
- Interactive endpoint testing
|
|
- Request/response schemas
|
|
- Authentication via "Authorize" button
|