Module compat_api

Module compat_api 

Source
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

MethodPathDescription
POST/api/usersCreate user account
GET/api/usersList users
GET/api/users/{username}Get user profile
PATCH/api/users/{username}Update user profile
GET/api/userGet authenticated user
PATCH/api/userUpdate authenticated user

§Token Endpoints

MethodPathDescription
POST/api/user/tokensCreate personal access token
GET/api/user/tokensList tokens
DELETE/api/user/tokens/{id}Revoke token

§SSH Key Endpoints

MethodPathDescription
POST/api/user/keysAdd SSH key
GET/api/user/keysList SSH keys
GET/api/user/keys/{id}Get SSH key
DELETE/api/user/keys/{id}Remove SSH key

§Release Endpoints

MethodPathDescription
POST/api/repos/{owner}/{name}/releasesCreate release
GET/api/repos/{owner}/{name}/releasesList releases
GET/api/repos/{owner}/{name}/releases/latestGet 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

MethodPathDescription
GET/api/repos/{owner}/{name}/contentsGet root contents
GET/api/repos/{owner}/{name}/contents/*pathGet file/directory
GET/api/repos/{owner}/{name}/readmeGet README

§Archive Endpoints

MethodPathDescription
GET/api/repos/{owner}/{name}/tarball/{ref}Download tarball
GET/api/repos/{owner}/{name}/zipball/{ref}Download zipball

§Rate Limit Endpoint

MethodPathDescription
GET/api/rate_limitGet rate limit status

Functions§

compat_routes
Creates the compatibility API routes.