Skip to content

route_id: route_version: current_version: repo_commit: 524b1f7da1b2fef3b224719868efccf9947770ca date: 2026-10-12 21:39:10 description: Call this endpoint to get all issues of an enterprise. lang: en


Get all issues of an enterprise

GET /api/v5/enterprises/{enterprise}/issues

Retrieves all issues of the specified enterprise, with filtering by state, labels, milestone, assignee, creator, keyword, and more, and supports sorting and pagination of the results for easy bulk viewing and management of issues within the enterprise.

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
enterprise path string Yes Enterprise path (path/login)
state query string No Issue state: open (open), closed (closed), all (all); defaults to open
labels query string No Comma-separated labels, for example bug,performance
sort query string No Sort by: creation time (created), update time (updated_at); defaults to created_at
direction query string No Sort direction: ascending (asc), descending (desc); defaults to desc
since query string No Start of the update time range; the time format must be ISO 8601
page query integer No Current page number
per_page query integer No Number of items per page, up to 100; defaults to 20
milestone query string No By milestone title. none for issues without a milestone, * for all issues with a milestone
assignee query string No Username of the user. none for issues without an assignee, * for all issues with an assignee
creator query string No Username of the user who created the issues
program query string No Name of the associated project. none for issues without an associated project, * for all issues with an associated project
created_at query string No Task creation date, in the format 2024-11-09
created_before query string No Task creation deadline, in the format 2024-11-09
search query string No Search issue titles or bodies by keyword
approximate query boolean No Whether to query an exact count; defaults to false

Response parameters

The response body is an array of all issues in the enterprise.

Field Type Always returned Nullable Description
id integer Yes No Issue ID
html_url string Yes No HTML address of the issue
number string Yes No Issue number
state string Yes No Issue state
title string Yes No Issue title
body string Yes No Issue body
user object Yes No Issue creator
repository object Yes No Repository the issue belongs to
created_at string Yes No Creation time
updated_at string Yes No Update time
finished_at string Yes Yes Completion time
deadline string Yes Yes Deadline
labels object[] Yes Yes List of labels; may be an empty array
issue_state string Yes No Issue state name
comments integer Yes No Number of comments
priority integer Yes No Priority
issue_type string Yes No Issue type name
issue_state_detail object Yes No Issue state details
issue_type_detail object Yes No Issue type details
issue_priority_detail object No Yes Issue priority details
parent_id integer Yes No Parent issue ID
milestone object No Yes Associated milestone
url string Yes No API address of the issue
repository_url string Yes No API address of the repository
assignee object Yes Yes Assignee
visibility_reason string No Yes Visibility: public (publicly visible), confidential (private, visible to project members), other (visible only to project members for other reasons)

user object

Field Type Always returned Nullable Description
user.id string Yes No User ID
user.login string Yes No Username
user.name string Yes No User nickname

repository object

Field Type Always returned Nullable Description
repository.id integer Yes No Repository ID
repository.full_name string Yes No Full repository name
repository.human_name string Yes No Repository display name
repository.path string Yes No Repository path
repository.name string Yes No Repository name
repository.url string Yes No Repository address
repository.assigner object No Yes Repository assigner
repository.paas string Yes Yes PaaS identifier

labels object

Field Type Always returned Nullable Description
labels.id integer Yes No Label ID
labels.name string Yes No Label name
labels.color string Yes No Label color
labels.created_at string Yes No Label creation time
labels.updated_at string Yes No Label time added

issue_state_detail object

Field Type Always returned Nullable Description
issue_state_detail.title string Yes No State name
issue_state_detail.serial integer Yes No State ordinal
issue_state_detail.id integer Yes No State ID

issue_type_detail object

Field Type Always returned Nullable Description
issue_type_detail.title string Yes No Type name
issue_type_detail.id integer Yes No Type ID
issue_type_detail.is_system boolean Yes No Whether this is a system type

issue_priority_detail object

Field Type Always returned Nullable Description
issue_priority_detail.id string Yes No Priority ID
issue_priority_detail.title string Yes No Priority name

milestone object

Field Type Always returned Nullable Description
milestone.created_at string Yes No Creation time
milestone.description string Yes No Milestone description
milestone.due_on string Yes No Due date
milestone.html_url string Yes No HTML address
milestone.number integer Yes No Number
milestone.repository_id integer Yes No Repository ID
milestone.state string Yes No State
milestone.title string Yes No Title
milestone.updated_at string Yes No Update time
milestone.url string Yes No API address

assignee object

Field Type Always returned Nullable Description
assignee.avatar_url string Yes No Avatar address
assignee.html_url string Yes No Homepage address
assignee.id string Yes No User ID
assignee.login string Yes No Username
assignee.name string Yes No Nickname
assignee.type string Yes No User type

Error responses

This endpoint may return the following error responses (the actual error field names returned by the backend take precedence):

400 Parameter error

{
  "error": "invalid_request",
  "message": "Invalid value for the state parameter"
}

401 Unauthenticated

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

HTTP status codes

Status code Description
200 Success (OK)
400 Parameter error (Bad request)
401 Requires authentication (Requires authentication)
403 Forbidden (Forbidden)
404 Request path does not exist (Not found)
429 Too many requests (Too many requests)
500 Internal server error (Internal server error)

Request example

Parameter notes

Replace <enterprise> with the enterprise path name (the enterprise path path/login); this endpoint allows anonymous access, so the request may omit the access token; to include one, append ?access_token=<token>.

cURL

curl -X GET 'https://api.atomgit.com/api/v5/enterprises/<enterprise>/issues?state=open&sort=created_at&direction=desc&page=1&per_page=20' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browsers)
const response = await fetch(
  "https://api.atomgit.com/api/v5/enterprises/<enterprise>/issues?state=open&sort=created_at&direction=desc&page=1&per_page=20",
  {
    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/enterprises/<enterprise>/issues",
    params={
        "state": "open",
        "sort": "created_at",
        "direction": "desc",
        "page": 1,
        "per_page": 20,
    },
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

[
  {
    "id": 340035,
    "html_url": "https://api.atomgit.com/xiaogang_test/test222/issues/7",
    "number": "7",
    "state": "open",
    "title": "2222",
    "body": "2222",
    "user": {
      "id": "65f96506b3a9e65264980447",
      "login": "xiaogang",
      "name": "xiaogang"
    },
    "repository": {
      "id": 249609,
      "full_name": "xiaogang_test/test222",
      "human_name": "test organization / test222",
      "path": "test222",
      "name": "test222",
      "url": "https://api.atomgit.com/xiaogang_test/test222",
      "assigner": {},
      "paas": ""
    },
    "created_at": "2024-11-20T15:40:35+08:00",
    "updated_at": "2024-11-20T15:40:35+08:00",
    "finished_at": null,
    "deadline": null,
    "labels": [],
    "issue_state": "Not submitted",
    "priority": 0,
    "issue_type": "Requirement",
    "issue_state_detail": {
      "title": "Not submitted",
      "serial": 1,
      "id": 222
    },
    "issue_type_detail": {
      "title": "Requirement",
      "id": 629,
      "is_system": false
    },
    "issue_priority_detail": {
      "id": "1",
      "title": "Normal"
    },
    "parent_id": 0,
    "milestone": {
      "created_at": "2024-11-20T15:40:35+08:00",
      "description": "Test milestone",
      "due_on": "2024-12-31",
      "html_url": "https://api.atomgit.com/xiaogang_test/test222/milestones/1",
      "number": 1,
      "repository_id": 249609,
      "state": "open",
      "title": "Milestone 1",
      "updated_at": "2024-11-20T15:40:35+08:00",
      "url": "https://api.atomgit.com/api/v5/repos/xiaogang_test/test222/milestones/1"
    },
    "url": "https://api.atomgit.com/api/v5/repos/xiaogang_test/test222/issues/7",
    "repository_url": "https://api.atomgit.com/api/v5/repos/xiaogang_test/test222",
    "assignee": {
      "avatar_url": "https://api.atomgit.com/avatar/xiaogang.png",
      "html_url": "https://api.atomgit.com/xiaogang",
      "id": "65f96506b3a9e65264980447",
      "login": "xiaogang",
      "name": "xiaogang",
      "type": "User"
    },
    "visibility_reason": "public"
  }
]

Error codes

Error code Description
400 Invalid parameters or unparsable request
401 Unauthenticated or invalid credentials (missing or invalid access credential)
403 Forbidden
404 Request path does not exist
405 Unsupported request method
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