Expand description
§Compatibility API
This module provides GitHub-compatible API endpoints for:
- User Accounts: User registration and profile management
- Personal Access Tokens: Token-based authentication
- SSH Keys: SSH key management
- Releases: Release and asset management
- Contents: Repository file browsing
- Archives: Tarball and zipball downloads
- Rate Limits: Rate limit status endpoint
§User Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/users | Create user account |
| GET | /api/users | List users |
| GET | /api/users/{username} | Get user profile |
| PATCH | /api/users/{username} | Update user profile |
| GET | /api/user | Get authenticated user |
| PATCH | /api/user | Update authenticated user |
§Token Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/user/tokens | Create personal access token |
| GET | /api/user/tokens | List tokens |
| DELETE | /api/user/tokens/{id} | Revoke token |
§SSH Key Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/user/keys | Add SSH key |
| GET | /api/user/keys | List SSH keys |
| GET | /api/user/keys/{id} | Get SSH key |
| DELETE | /api/user/keys/{id} | Remove SSH key |
§Release Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/repos/{owner}/{name}/releases | Create release |
| GET | /api/repos/{owner}/{name}/releases | List releases |
| GET | /api/repos/{owner}/{name}/releases/latest | Get latest release |
| GET | /api/repos/{owner}/{name}/releases/tags/{tag} | Get by tag |
| GET | /api/repos/{owner}/{name}/releases/{id} | Get release |
| PATCH | /api/repos/{owner}/{name}/releases/{id} | Update release |
| DELETE | /api/repos/{owner}/{name}/releases/{id} | Delete release |
§Contents Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/repos/{owner}/{name}/contents | Get root contents |
| GET | /api/repos/{owner}/{name}/contents/*path | Get file/directory |
| GET | /api/repos/{owner}/{name}/readme | Get README |
§Archive Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/repos/{owner}/{name}/tarball/{ref} | Download tarball |
| GET | /api/repos/{owner}/{name}/zipball/{ref} | Download zipball |
§Rate Limit Endpoint
| Method | Path | Description |
|---|---|---|
| GET | /api/rate_limit | Get rate limit status |
Functions§
- compat_
routes - Creates the compatibility API routes.