Skip to content

Get organization information

GET /api/v5/orgs/{org}

This endpoint returns the details of a single organization by its path, including the organization name, login name, avatar, description, enterprise, and related URLs for repositories, activity, and members, as well as the follower count and the Gitee-linked follower count.

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 Organization path (path/login)

Response parameters

Field Type Always returned Nullable Description
id integer Yes No Organization ID
login string Yes No Organization login name (the organization's address path)
name string Yes No Organization name
avatar_url string Yes Yes Organization avatar URL; may be empty
repos_url string Yes No URL of the organization's repository list
events_url string Yes No Organization activity URL
members_url string Yes No Organization members URL
description string Yes Yes Organization description; may be empty
enterprise string Yes Yes Enterprise the organization belongs to; may be empty
follow_count integer Yes No Number of followers
gitee object Yes No Gitee-linked information

gitee object

Field Type Always returned Nullable Description
gitee.follows integer Yes No Gitee follower count

Error responses

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

404 Organization not found

{
  "error": "not_found",
  "message": "The organization does not exist"
}

The actual error field names are those returned by the backend.

HTTP response status codes

Status code Description
200 Success (OK)
401 Requires authentication
403 Forbidden
404 Organization not found

Request example

Parameter description

Replace <org> with the organization path (the address path of an enterprise, organization, or user). This endpoint allows anonymous access; you may also pass access_token (appended as a URL query parameter).

cURL

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

JavaScript

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

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>",
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "id": 6486504,
  "login": "openharmony",
  "name": "OpenHarmony",
  "avatar_url": "",
  "repos_url": "https://api.atomgit.com/openharmony/repos",
  "events_url": "https://api.atomgit.com/openharmony/events",
  "members_url": "https://api.atomgit.com/openharmony/members{/member}",
  "description": "OpenHarmony is an open-source project incubated and operated by the OpenAtom Foundation. Its goal is to build a framework and platform for smart-device operating systems for an era of all scenarios, all connections, and all intelligence, and to promote the prosperity of the Internet of Everything industry.",
  "enterprise": "openharmony",
  "follow_count": 40819,
  "gitee": {
    "follows": 43454
  }
}

Error codes

Error code Description
401 Unauthenticated or invalid credentials
400 Parameter error or the request cannot be parsed
404 The request path or the organization does not exist
405 The request method is not supported
429 Too many requests; the rate limit was triggered
500 Internal system error

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