Skip to content

Get issues of an organization of the current user

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

This endpoint retrieves the issue list of a specified organization for the current user. It supports filtering by assigned or created source, open or closed state, labels, and creation time, and returns results sorted by creation or update time with pagination. It also supports keyword search across titles or content.

Access token support

  • AtomGit user access token (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)
access_token query string Yes User authorization code
filter query string No Filter parameter: assigned to the authorized user (assigned), created by the authorized user (created), or either of the two (all). Defaults to assigned
state query string No Issue state: open (open) or closed (closed). Defaults to open
labels query string No Comma-separated labels, such as bug,performance
sort query string No Sort by: creation time (created) or update time (updated_at). Defaults to created_at
direction query string No Sort order: ascending (asc) or descending (desc). Defaults to desc
page query integer No Current page number
per_page query integer No Number of items per page; maximum 100, defaults to 20
created_at query string No Task creation time
search query string No Keyword search across issue titles or content

Response parameters

The response body is an array of issue objects. Each array element contains the following fields:

Field Type Always returned Nullable Description
id integer Yes No Issue ID
html_url string Yes No HTML URL of the issue
number string Yes No Issue number
state string Yes No Issue state
title string Yes No Title
body string Yes No Content
user object Yes No Creator
assignee object Yes No Assignee
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 No Completion time
deadline string Yes No Deadline
labels object[] Yes No Label list
issue_state string Yes No Issue state
comments integer Yes No Comment count
priority integer Yes No Priority
issue_type string Yes No Issue type
issue_state_detail object Yes No State details
issue_type_detail object Yes No Type details
issue_priority_detail object No Yes Issue priority details
parent_id integer Yes No Parent issue ID
url string Yes No API URL of the issue
repository_url string Yes No API URL of the repository the issue belongs to
milestone object No Yes Milestone
visibility_reason string No Yes Visibility: public (publicly visible), confidential (private; visible only to project members), or 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 Login name
user.name string Yes No Username

assignee object

Field Type Always returned Nullable Description
assignee.avatar_url string Yes No Avatar URL
assignee.html_url string Yes No User homepage URL
assignee.id string Yes No User ID
assignee.login string Yes No Login name
assignee.name string Yes No Username
assignee.type string Yes No User type

repository object

Field Type Always returned Nullable Description
repository.id integer Yes No Repository ID
repository.full_name string Yes No Full name (namespace/name)
repository.human_name string Yes No Display name
repository.path string Yes No Repository path
repository.name string Yes No Repository name
repository.url string Yes No Repository URL
repository.assigner object Yes No Assigner; subject to the actual response
repository.paas string Yes No Platform-as-a-Service identifier

labels array elements

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

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 Sort number
issue_state_detail.id integer No Yes 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 built-in 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 Description
milestone.due_on string Yes No Deadline
milestone.html_url string Yes No Milestone HTML URL
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 Milestone URL

Error responses

401 Unauthenticated

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

HTTP status codes

Status code Description
200 Success (OK)
401 Requires authentication (Requires authentication)
403 Forbidden (Forbidden)
404 Request path does not exist
429 Too many requests; rate limit triggered
500 Internal server error

Request example

Parameter notes

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

cURL

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

JavaScript

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

print(resp.json())

Response example

Status code: 200

[
  {
    "id": 495900,
    "html_url": "https://api.atomgit.com/Go-Tribe/test01/issues/1",
    "number": "1",
    "state": "open",
    "title": "Example Issue",
    "body": "Issue description",
    "user": {
      "id": "650d67fbae6d795139b49b41",
      "login": "dengmengmian",
      "name": "Ma Fan"
    },
    "assignee": {
      "avatar_url": "https://api.atomgit.com/avatar.png",
      "html_url": "https://api.atomgit.com/Go-Tribe/test01/issues/1",
      "id": "650d67fbae6d795139b49b41",
      "login": "dengmengmian",
      "name": "Ma Fan",
      "type": "user"
    },
    "repository": {
      "id": 4016571,
      "full_name": "Go-Tribe/test01",
      "human_name": "gotribe / test01",
      "path": "test01",
      "name": "test01",
      "url": "https://api.atomgit.com/Go-Tribe/test01",
      "assigner": {},
      "paas": ""
    },
    "created_at": "2024-10-12T18:27:27+08:00",
    "updated_at": "2024-10-12T18:27:27+08:00",
    "finished_at": "2024-10-12T18:27:27+08:00",
    "deadline": "2024-10-20T00:00:00+08:00",
    "labels": [
      {
        "id": 1,
        "name": "bug",
        "color": "#ee0701"
      }
    ],
    "issue_state": "open",
    "comments": 0,
    "priority": 0,
    "issue_type": "task",
    "issue_state_detail": {
      "title": "Pending",
      "serial": 1,
      "id": 1
    },
    "issue_type_detail": {
      "title": "Task",
      "id": 1,
      "is_system": true
    },
    "issue_priority_detail": {
      "id": "2",
      "title": "Normal"
    },
    "parent_id": 0,
    "url": "https://api.atomgit.com/Go-Tribe/test01/issues/1",
    "repository_url": "https://api.atomgit.com/Go-Tribe/test01",
    "milestone": {
      "created_at": "2024-10-01T10:00:00+08:00",
      "description": "Milestone description",
      "due_on": "2024-11-01T00:00:00+08:00",
      "html_url": "https://api.atomgit.com/Go-Tribe/test01/milestones/1",
      "number": 1,
      "repository_id": 4016571,
      "state": "open",
      "title": "v1.0",
      "updated_at": "2024-10-01T10:00:00+08:00",
      "url": "https://api.atomgit.com/Go-Tribe/test01/milestones/1"
    },
    "visibility_reason": "public"
  }
]

Error codes

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