API Documentation

Repository browsing API for gitGost over ESP32 storage nodes.

Espresso exposes a repository browsing API under the /api/gg prefix and Git smart-HTTP under /:owner/:repo.git/.... No exposed ports, no passwords.

Endpoints

Repository browsing endpoints, all under /api/gg. Swap :owner and :repo for the account slug and repository name.

  • GET /api/gg/repos/:owner/:repo/tree?path=

    Lists the contents of a directory inside the repository.

  • GET /api/gg/repos/:owner/:repo/raw?path=README.md

    Returns file content as text/plain.

  • GET /api/gg/repos/:owner/:repo/info

    Basic repository metadata.

  • GET /api/gg/repos/:owner/:repo/branches

    List of branch names.

  • GET /api/gg/repos/:owner/:repo/tags

    List of tag names.

  • GET /api/gg/repos/:owner/:repo/topics

    Discovery categories/tags (currently empty until topic storage is added).

  • GET /api/gg/repos/:owner/:repo/commits

    List of commit SHAs.

Authentication

Management endpoints and authenticated browsing require a session token. Anonymous browsing works when no API key is configured on the server.

Session token โ€” send X-ZKP-Token: <token> on management endpoints and authenticated browsing. Generate one from the dashboard account menu.

Anonymous browsing โ€” works without a token in trusted-network mode (no API key configured on the server).

Git smart-HTTP

Clone, fetch and push over HTTPS. Add X-ZKP-Token to Git HTTP requests.

  • GET /:owner/:repo.git/info/refs?service=git-upload-pack

    Advertises refs for git clone / git fetch.

  • POST /:owner/:repo.git/git-upload-pack

    Uploads a pack for fetch, clone and push operations.