Skip to content

Issue

Issues are used to track defects, requirements, and discussions. Through the API you can create and update issues, manage comments, labels, and assignments, link branches and pull requests, and read reactions, modification history, and operation logs.

Repository-level labels and milestones have their own groups; this page covers only the endpoints of issues themselves.

Objects

Object Description Related endpoints
Issue Title, body, state, creator, comment count, labels, milestone Get a specific issue of a repository
Comment Discussion content under an issue; supports create, read, update, and delete Create an issue comment
Label Labels on an issue; supports adding and removing in bulk Create an issue label
Reaction A user's emoji reaction to an issue or comment Get the list of reactions on an issue
Linked branch List of branches linked to the issue Set the branches associated with an issue
Linked pull request All pull requests linked to the issue Get pull requests associated with an issue
Board field Kanban board fields linked to the issue and their values Update the board field associated with an issue
Modification history Change records of issues and comments Get the modification history of an issue
Operation log Operation trail on the issue Get the operation logs of an issue

Identification

  • Repository-level endpoints identify the repository with owner + repo and the issue number with number.
  • Comment-level endpoints identify a specific comment with id (or comment_id); paths look like /issues/comments/{id} and /issues/comment/{comment_id}/….
  • Enterprise-level endpoints use enterprise to identify the enterprise namespace; paths start with /api/v5/enterprises/{enterprise}/.
  • Organization-level endpoints use org to identify the organization; paths start with /api/v5/orgs/{org}/.

Common tasks

Notes

  • The create and update issue paths include only {owner}, not {repo}: POST /api/v5/repos/{owner}/issues and PATCH /api/v5/repos/{owner}/issues/{number}, which differs from the /repos/{owner}/{repo}/… form used by other endpoints in this section.
  • Reaction endpoints are split across two paths: reactions on an issue use /issues/{number}/user_reactions, and reactions on a comment use /issues/comment/{comment_id}/user_reactions; note the singular comment.
  • When deleting labels, {name} accepts multiple label names separated by commas for bulk deletion.
  • Enterprise-level issues and repository-level issues are two separate sets of endpoints (/enterprises/{enterprise}/issues/… and /repos/{owner}/{repo}/issues/…); the enterprise side also has a dedicated issue state endpoint /enterprises/{enterprise}/issue/statuses.
  • Issue label and milestone management endpoints live in their own groups; this group only attaches and detaches them on issues.

Endpoint list

This module contains 28 endpoints.

# Endpoint Method and path Description
1 Create an issue POST /api/v5/repos/{owner}/issues Call this endpoint to create an issue.
2 Update an issue PATCH /api/v5/repos/{owner}/issues/{number} Call this endpoint to update an issue.
3 Get a specific issue of a repository GET /api/v5/repos/{owner}/{repo}/issues/{number} Retrieves detailed information about an issue in the specified repository, including title, body, state, creator, comment count, labels, milestone, and custom fields…
4 Get all issues in a repository GET /api/v5/repos/{owner}/{repo}/issues Retrieves all issues in the specified repository, with filtering by state, labels, milestone, assignee, creator, and time range, and…
5 Get all comments of an issue in a repository GET /api/v5/repos/{owner}/{repo}/issues/{number}/comments Retrieves all comments of an issue in the specified repository, with pagination, sorting, and filtering by update time range; returns the content and author of each comment…
6 Create an issue comment POST /api/v5/repos/{owner}/{repo}/issues/{number}/comments Creates a comment under the specified issue in the specified repository by submitting the comment body, and returns details of the new comment.
7 Get all issue comments in a repository GET /api/v5/repos/{owner}/{repo}/issues/comments Retrieves all issue comments in the specified repository, with sorting by creation or update time, a specified sort direction, and pagination, and filtering by time…
8 Get pull requests associated with an issue GET /api/v5/repos/{owner}/{repo}/issues/{number}/pull_requests Retrieves the list of all pull requests associated with an issue in the specified repository, returning each PR's number, title,…
9 Get all labels of an enterprise issue GET /api/v5/enterprises/{enterprise}/issues/{number}/labels Retrieves all labels of the specified issue in an enterprise, returning each label's number, name, color, and link information; supports pagination.
10 Create an issue label POST /api/v5/repos/{owner}/{repo}/issues/{number}/labels Creates labels for a specific issue in the specified repository. By submitting a list of label names, you can add one or more labels to the issue, and…
11 Delete an issue label DELETE /api/v5/repos/{owner}/{repo}/issues/{number}/labels/{name} Deletes labels from an issue in the specified repository; multiple label names can be separated by commas for bulk deletion. Returns an empty object on success.
12 Get the operation logs of an issue GET /api/v5/repos/{owner}/issues/{number}/operate_logs Call this endpoint to get the operation logs of an issue.
13 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…
14 Get all issues of the authorized user GET /api/v5/user/issues Call this endpoint to get all issues of the authorized user.
15 Update an issue comment PATCH /api/v5/repos/{owner}/{repo}/issues/comments/{id} Updates the body of a comment on an issue in the specified repository. You can submit new comment text to replace the existing comment; returns an empty object on success.
16 Delete an issue comment DELETE /api/v5/repos/{owner}/{repo}/issues/comments/{id} Deletes a specific comment under an issue in the specified repository, so that unneeded or outdated discussion content can be removed. The comment is no longer displayed once the operation succeeds.
17 Get an issue comment of a repository GET /api/v5/repos/{owner}/{repo}/issues/comments/{id} Retrieves detailed information about an issue comment in the specified repository, covering the comment body, comment type, author information, associated issue information…
18 Get the issues of an organization of the current user GET /api/v5/orgs/{org}/issues Retrieves the list of issues of the specified organization of the current user, with filtering by responsible or creating source, open or closed state, labels, creation time, and more,…
19 Get all comments of an enterprise issue GET /api/v5/enterprises/{enterprise}/issues/{number}/comments Retrieves all comments of an issue in the specified enterprise; supports pagination. The result includes each comment's body, creation and update time, comment…
20 Get a specific enterprise issue GET /api/v5/enterprises/{enterprise}/issues/{number} Retrieves the specified issue in an enterprise, returning detailed information about the issue, including title, body, state, labels, comment count, priorit…
21 Get enterprise issue states GET /api/v5/enterprises/{enterprise}/issue/statuses Retrieves the list of issue states of the specified enterprise. By passing the enterprise namespace address path, you can query all issue state information under the enterprise,…
22 Get the list of branches associated with an issue GET /api/v5/repos/{owner}/{repo}/issues/{number}/related_branches Retrieves the list of branches associated with the specified issue by querying with the repository namespace address path, repository path, and issue number, returning the…
23 Get the list of reactions on an issue GET /api/v5/repos/{owner}/{repo}/issues/{number}/user_reactions Retrieves the list of user reactions on the specified issue, with filtering by emoji, returning reaction records with pagination…
24 Get the list of reactions on issue comments GET /api/v5/repos/{owner}/{repo}/issues/comment/{comment_id}/user_reactions Retrieves the list of reactions on the specified issue comment, returning the user's emoji reactions to the comment, including the reaction emoji…
25 Get the modification history of an issue GET /api/v5/repos/{owner}/{repo}/issues/{number}/modify_history Retrieves the modification history of an issue in the specified repository; each record includes the modified content, modification time, and operator information.
26 Get the modification history of issue comments GET /api/v5/repos/{owner}/{repo}/issues/comment/{comment_id}/modify_history Retrieves the modification history records of the specified issue comment, returning a history array containing modification time, modified content, and operating user and modified user information…
27 Set the branches associated with an issue PUT /api/v5/repos/{owner}/{repo}/issues/{number}/related_branches Sets the branches associated with an issue in the specified repository by submitting a list of branch names, and returns the branches currently associated with the issue…
28 Update the board field associated with an issue PUT /api/v5/repos/{owner}/{repo}/issues/{number}/kanban_values Updates the kanban board field associated with the specified issue by specifying the board identifier (kanban_id) and submitting the field name and the corresponding list of field values…

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