Skip to content

Issues API

Manage issues and comments.

List Issues

http
GET /api/repos/{owner}/{name}/issues

Parameters

NameTypeDescription
statestringopen, closed, all (default: open)
labelsstringComma-separated label names
assigneestringFilter by assignee
creatorstringFilter by creator
sortstringcreated, updated, comments
directionstringasc or desc
pageintegerPage number
per_pageintegerItems per page

Example

bash
curl "https://api.guts.network/api/repos/alice/my-project/issues?state=open&labels=bug" \
  -H "Authorization: Bearer guts_xxx"

Response

json
{
  "items": [
    {
      "id": "issue_abc123",
      "number": 15,
      "title": "Bug: Something is broken",
      "body": "When I try to...",
      "state": "open",
      "author": "bob",
      "assignees": ["alice"],
      "labels": [
        {
          "name": "bug",
          "color": "d73a4a",
          "description": "Something isn't working"
        }
      ],
      "comments_count": 3,
      "created_at": "2025-01-10T08:00:00Z",
      "updated_at": "2025-01-12T10:00:00Z",
      "closed_at": null
    }
  ],
  "total_count": 1
}

Get an Issue

http
GET /api/repos/{owner}/{name}/issues/{number}
bash
curl https://api.guts.network/api/repos/alice/my-project/issues/15 \
  -H "Authorization: Bearer guts_xxx"

Create an Issue

http
POST /api/repos/{owner}/{name}/issues

Request Body

FieldTypeRequiredDescription
titlestringYesIssue title
bodystringNoIssue description (Markdown)
assigneesarrayNoUsernames to assign
labelsarrayNoLabel names

Example

bash
curl -X POST https://api.guts.network/api/repos/alice/my-project/issues \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Feature request: Add dark mode",
    "body": "It would be great to have a dark mode option...",
    "labels": ["enhancement"],
    "assignees": ["alice"]
  }'

Response

json
{
  "id": "issue_xyz789",
  "number": 16,
  "title": "Feature request: Add dark mode",
  "body": "It would be great to have a dark mode option...",
  "state": "open",
  "author": "bob",
  "assignees": ["alice"],
  "labels": [
    {
      "name": "enhancement",
      "color": "a2eeef"
    }
  ],
  "created_at": "2025-01-20T10:00:00Z"
}

Update an Issue

http
PATCH /api/repos/{owner}/{name}/issues/{number}

Request Body

FieldTypeDescription
titlestringIssue title
bodystringIssue description
statestringopen or closed
assigneesarrayUsernames to assign
labelsarrayLabel names

Example

bash
curl -X PATCH https://api.guts.network/api/repos/alice/my-project/issues/15 \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "closed"
  }'

Comments

List Comments

http
GET /api/repos/{owner}/{name}/issues/{number}/comments
bash
curl https://api.guts.network/api/repos/alice/my-project/issues/15/comments \
  -H "Authorization: Bearer guts_xxx"
json
[
  {
    "id": "comment_abc123",
    "body": "I can reproduce this issue...",
    "author": "charlie",
    "created_at": "2025-01-10T09:00:00Z",
    "updated_at": "2025-01-10T09:00:00Z"
  }
]

Create a Comment

http
POST /api/repos/{owner}/{name}/issues/{number}/comments
bash
curl -X POST https://api.guts.network/api/repos/alice/my-project/issues/15/comments \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Thanks for reporting! I will look into this."
  }'

Update a Comment

http
PATCH /api/repos/{owner}/{name}/issues/comments/{comment_id}

Delete a Comment

http
DELETE /api/repos/{owner}/{name}/issues/comments/{comment_id}

Labels

List Labels

http
GET /api/repos/{owner}/{name}/labels
json
[
  {
    "name": "bug",
    "color": "d73a4a",
    "description": "Something isn't working"
  },
  {
    "name": "enhancement",
    "color": "a2eeef",
    "description": "New feature or request"
  },
  {
    "name": "documentation",
    "color": "0075ca",
    "description": "Improvements or additions to documentation"
  }
]

Create a Label

http
POST /api/repos/{owner}/{name}/labels
bash
curl -X POST https://api.guts.network/api/repos/alice/my-project/labels \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "priority-high",
    "color": "ff0000",
    "description": "High priority issue"
  }'

Update a Label

http
PATCH /api/repos/{owner}/{name}/labels/{name}

Delete a Label

http
DELETE /api/repos/{owner}/{name}/labels/{name}

Assignees

Add Assignees

http
POST /api/repos/{owner}/{name}/issues/{number}/assignees
bash
curl -X POST https://api.guts.network/api/repos/alice/my-project/issues/15/assignees \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "assignees": ["alice", "bob"]
  }'

Remove Assignees

http
DELETE /api/repos/{owner}/{name}/issues/{number}/assignees

Milestones

List Milestones

http
GET /api/repos/{owner}/{name}/milestones

Create a Milestone

http
POST /api/repos/{owner}/{name}/milestones
bash
curl -X POST https://api.guts.network/api/repos/alice/my-project/milestones \
  -H "Authorization: Bearer guts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "v1.0",
    "description": "First stable release",
    "due_on": "2025-03-01T00:00:00Z"
  }'

Update a Milestone

http
PATCH /api/repos/{owner}/{name}/milestones/{number}

Delete a Milestone

http
DELETE /api/repos/{owner}/{name}/milestones/{number}

Released under the MIT License.