Skip to content

Get organization discussion details

GET /api/v5/orgs/{org}/discuss/{number}

This endpoint gets the details of a discussion in the specified organization by organization path and discussion number. It returns complete material such as the discussion title, body content, author information, category, comment count, vote information, and label list.

Access token support

  • AtomGit user access token (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)
number path integer Yes Discussion number

Response parameters

Field Type Always returned Nullable Description
id string Yes No Discussion ID
number integer Yes No Discussion number
title string Yes No Discussion title
md_content string Yes No Discussion content (Markdown format)
created_at string Yes No Creation time
updated_at string Yes No Update time
author object Yes No Discussion author
is_lock integer Yes No Whether locked
is_pin integer Yes No Whether pinned
is_category_pin integer Yes No Whether pinned within the type
is_closed integer Yes No Whether closed
is_answered integer Yes No Whether an answer is accepted
comment_total integer Yes No Comment total
category object Yes No Discussion category
vote object Yes No Vote information (returned only for vote-type discussions)
vote_options object[] Yes No Vote option information (returned only for vote-type discussions)
labels object[] No Yes Label list

author object

Field Type Always returned Nullable Description
author.avatar_url string Yes No Avatar URL
author.id string Yes No User ID
author.object_id string Yes No User object ID
author.login string Yes No Login name
author.name string Yes No Username

category object

Field Type Always returned Nullable Description
category.id string Yes No Category ID
category.name string Yes No Category name
category.icon string Yes No Category icon
category.description string Yes No Category description
category.type integer Yes No Category type

vote object

Field Type Always returned Nullable Description
vote.id string Yes No Vote ID
vote.created_at string Yes No Creation time
vote.updated_at string Yes No Update time
vote.question string Yes No Vote content
vote.vote_total integer Yes No Vote total
vote.real_name boolean Yes No Whether real-name
vote.creator_view_real_name boolean Yes No Whether the creator can view real-name votes (0 = No, 1 = Yes)
vote.modify_vote_times integer Yes No Number of allowed vote changes
vote.designated_voter boolean Yes No Whether voters are designated (0 = No, 1 = Yes)
vote.current_user_is_designated_voter boolean Yes No Whether the current user is a designated voter
vote.designated_voter_size integer Yes No Number of designated voters
vote.no_vote_user_size integer Yes No Number of users who have not voted

vote_options array element

Field Type Always returned Nullable Description
vote_options.id string Yes No Option ID
vote_options.created_at string Yes No Creation time
vote_options.updated_at string Yes No Update time
vote_options.vote_option string Yes No Vote option
vote_options.option_order integer Yes No Vote option order
vote_options.vote_total integer Yes No Vote count for this option
vote_options.vote_total_percent integer Yes No Percentage of votes for this option
vote_options.vote_id string Yes No Owning vote ID
vote_options.vote_users object[] No Yes Vote user list

vote_options.vote_users array element

Field Type Always returned Nullable Description
vote_users.avatar_url string No Yes Avatar URL
vote_users.id string No Yes User ID
vote_users.object_id string No Yes User object ID
vote_users.login string No Yes Login name
vote_users.name string No Yes Username

labels array element

Field Type Always returned Nullable Description
labels.id string Yes No Label ID
labels.name string Yes No Label name
labels.color string Yes No Label color
labels.created_at string Yes No Creation time
labels.updated_at string Yes No Update time

Error response

This endpoint returns the following error response when parameters are missing or the resource does not exist.

404 Resource does not exist

{
  "error": "not_found",
  "message": "Discussion does not exist"
}

HTTP response status codes

Status code Description
200 Success (OK)
404 Resource not found (Not found)
500 Internal server error

Request example

Parameter description

Replace <org> with the organization path (the path of an enterprise, organization, or individual); replace <number> with the discussion number.

This endpoint allows anonymous access, so you do not need to carry an access token when calling it; if you need authentication, you can also carry an access token in the request.

cURL

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

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>", {
  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>/discuss/<number>",
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "id": "discussion-001",
  "number": 12,
  "title": "How do I deploy a project on AtomGit?",
  "md_content": "### Problem description\nAn error occurred during deployment; please help investigate.",
  "created_at": "2026-10-01T10:00:00Z",
  "updated_at": "2026-10-02T11:30:00Z",
  "author": {
    "avatar_url": "https://api.atomgit.com/avatar.png",
    "id": "user-001",
    "object_id": "object-001",
    "login": "octocat",
    "name": "Octocat"
  },
  "is_lock": 0,
  "is_pin": 0,
  "is_category_pin": 0,
  "is_closed": 0,
  "is_answered": 0,
  "comment_total": 5,
  "category": {
    "id": "category-001",
    "name": "Usage issue",
    "icon": "https://api.atomgit.com/category/icon.png",
    "description": "Usage-related question",
    "type": 1
  },
  "vote": {
    "id": "vote-001",
    "created_at": "2026-10-01T10:00:00Z",
    "updated_at": "2026-10-02T11:30:00Z",
    "question": "Do you support this proposal?",
    "vote_total": 10,
    "real_name": true,
    "creator_view_real_name": false,
    "modify_vote_times": 2,
    "designated_voter": false,
    "current_user_is_designated_voter": false,
    "designated_voter_size": 0,
    "no_vote_user_size": 3
  },
  "vote_options": [
    {
      "id": "vote-option-001",
      "created_at": "2026-10-01T10:00:00Z",
      "updated_at": "2026-10-02T11:30:00Z",
      "vote_option": "Support",
      "option_order": 1,
      "vote_total": 7,
      "vote_total_percent": 70,
      "vote_id": "vote-001",
      "vote_users": [
        {
          "avatar_url": "https://api.atomgit.com/avatar.png",
          "id": "user-001",
          "object_id": "object-001",
          "login": "octocat",
          "name": "Octocat"
        }
      ]
    }
  ],
  "labels": [
    {
      "id": "label-001",
      "name": "bug",
      "color": "#d73a4a",
      "created_at": "2026-10-01T10:00:00Z",
      "updated_at": "2026-10-02T11:30:00Z"
    }
  ]
}

Error codes

Error code Description
400 Parameter error or unparsable request
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
404 Request path does not exist or the resource does not exist
405 Method not supported
429 Too many requests; rate limit triggered
500 Internal server error

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