Skip to content

Quick start

The AtomGit API gives you programmatic access to resources on AtomGit. This guide explains how to use it: valid API requests, authentication, status codes, pagination, path parameters, and more.

For AI agents and automation

If you are an AI agent or an automation tool, read the following resources in order instead of parsing the rendered HTML page by page:

API hosts and multiple domains

The AtomGit API is served from several domains with identical functionality and endpoints, so you can pick the one closest to your network:

Host Description
https://api.atomgit.com Official AtomGit API domain
https://api.gitcode.com GitCode domain; API behavior is identical to the AtomGit domain

Requests to both hosts share the same paths, parameters, authentication, and response structure, so you can switch hosts without changing any code. For example, the following two requests are equivalent:

curl "https://api.atomgit.com/api/v5/users/{username}"
curl "https://api.gitcode.com/api/v5/users/{username}"

Note: examples in this documentation use https://api.atomgit.com. If you use the GitCode domain, only the host part changes. We recommend storing the host in an environment variable so it is easy to switch and migrate.

Making your first request

  1. Create a token on the personal access token page.
  2. Save the token as an environment variable:

    export ATOMGIT_TOKEN=<your-token>
    
  3. Look up a public user profile. This endpoint does not require authentication:

    curl 'https://api.atomgit.com/api/v5/users/<username>'
    
  4. List the open issues in a repository:

    curl 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues?state=open&per_page=20' \
      -H "Authorization: Bearer $ATOMGIT_TOKEN"
    

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc