Skip to content

Get organization member details

GET /api/v5/orgs/{org}/members/{username}

This endpoint returns the details of a member of the specified organization, including the member record ID, organization path, name, URL, and avatar URL, as well as the user information for that member (such as user name, display name, avatar, and profile URL).

Access token support

  • AtomGit user access tokens

Anonymous access

This endpoint does not allow anonymous access.

Request parameters

Parameter Location Type Required Description
org path string Yes Organization path (path/login)
username path string Yes User name (username/login)
access_token query string Yes User authorization code

Response parameters

Field Type Always returned Nullable Description
id integer Yes No Member record ID
path string Yes No Organization path (path/login)
name string Yes No Name (may be an empty string)
url string Yes No URL (may be an empty string)
avatar_url string Yes Yes Avatar URL; may be null
user object Yes No User information of the member

user object

Field Type Always returned Nullable Description
user.id string Yes No Unique user identifier
user.login string Yes No User name (username/login)
user.name string Yes No User display name
user.avatar_url string Yes Yes User avatar URL; may be null
user.html_url string Yes No User profile URL
user.user_id string No Yes User ID
user.object_id string No Yes Object ID

Error responses

The following error responses are generic examples. The actual error field names are those returned by the backend.

401 Unauthenticated

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

404 Not found

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

HTTP response status codes

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

Request example

Parameter description

Replace <org> with the organization path name (the address path of an enterprise, organization, or user); replace <username> with the member user name (username/login); replace <token> with your AtomGit user access token.

cURL

curl -X GET 'https://api.atomgit.com/api/v5/orgs/<org>/members/<username>?access_token=<token>' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const url = new URL("https://api.atomgit.com/api/v5/orgs/<org>/members/<username>");
url.searchParams.set("access_token", "<YOUR-TOKEN>");

const response = await fetch(url, {
  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>/members/<username>",
    params={"access_token": "<YOUR-TOKEN>"},
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "id": 133039,
  "path": "openharmony",
  "name": "",
  "url": "",
  "avatar_url": null,
  "user": {
    "id": "64dc3b13b8b9504cec223ab1",
    "login": "theo6789",
    "name": "TheoCui",
    "avatar_url": null,
    "html_url": "https://api.atomgit.com/theo6789"
  }
}

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
400 Parameter error or the request cannot be parsed
404 The request path 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