Skip to content

List all followers of a specified organization

GET /api/v5/orgs/{org}/followers

This endpoint returns the list of all followers of the specified organization. It supports pagination and returns information such as each follower's user ID, login name, nickname, avatar URL, and follow time.

Access token support

  • AtomGit user access tokens

Anonymous access

This endpoint allows anonymous access.

Request parameters

Parameter Location Type Required Description
org path string Yes Address path of the namespace that owns the repository (address path of the enterprise, organization, or user)
access_token query string No User authorization code
page query integer No Current page number; defaults to 1
per_page query integer No Number of items per page; maximum 100, default 20

Response parameters

The response body is an array. Each element represents one follower of the organization; the fields are described below:

Field Type Always returned Nullable Description
id integer Yes No User ID of the follower
login string Yes No Login name of the follower
name string Yes No Nickname of the follower
avatar_url string Yes No Avatar URL of the follower
watch_at string Yes No Follow time

HTTP response status codes

Status code Description
200 Success (OK)

Request example

Parameter description

Replace <org> with the organization's address path (the address path of an enterprise, organization, or user); if you need to pass a token, replace <token> with your AtomGit user access token.

cURL

curl -X GET 'https://api.atomgit.com/api/v5/orgs/<org>/followers' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <token>'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/orgs/<org>/followers", {
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
  },
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.get(
    "https://api.atomgit.com/api/v5/orgs/<org>/followers",
    headers={
        "Accept": "application/json",
        "Authorization": "Bearer <token>",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

[
  {
    "id": 496,
    "login": "xiaogang",
    "name": "xiaogang",
    "avatar_url": "https://api.atomgit.com/bc/cd/avatar.jpg",
    "watch_at": "2024-11-13T16:15:53.287+08:00"
  }
]

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
404 The request path does not exist
500 Internal system error

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