Skip to main content

Get issues by repository

Retrieve all issues for a specific repository. GET /api/issues Authentication: Not required

Parameters

owner
string
required
The username of the repository owner
repo
string
required
The name of the repository

Response

Returns an array of issue objects.
id
number
Unique identifier for the issue
repositoryId
number
ID of the repository this issue belongs to
fullName
string
Full repository name in the format owner/repo
number
number
Issue number within the repository
title
string
Issue title
body
string
Issue description body
status
string
Issue status, either open or closed
creatorId
string
User ID of the issue creator
creatorUsername
string
Username of the issue creator
createdAt
timestamp
Timestamp when the issue was created (milliseconds)
updatedAt
timestamp
Timestamp when the issue was last updated (milliseconds)

Example request

curl https://your-gitflare-instance.com/api/issues?owner=johndoe&repo=myproject

Example response

[
  {
    "id": 1,
    "repositoryId": 42,
    "fullName": "johndoe/myproject",
    "number": 1,
    "title": "Add dark mode support",
    "body": "It would be great to have a dark mode option for better readability at night.",
    "status": "open",
    "creatorId": "user_123",
    "creatorUsername": "janedoe",
    "createdAt": 1709481600000,
    "updatedAt": 1709481600000
  }
]

Get issue by number

Retrieve a specific issue by its number within a repository. GET /api/issues/:number Authentication: Not required

Parameters

owner
string
required
The username of the repository owner
repo
string
required
The name of the repository
number
number
required
The issue number

Response

Returns a single issue object with the same fields as the list endpoint.

Example request

curl https://your-gitflare-instance.com/api/issues/1?owner=johndoe&repo=myproject

Example response

{
  "id": 1,
  "repositoryId": 42,
  "fullName": "johndoe/myproject",
  "number": 1,
  "title": "Add dark mode support",
  "body": "It would be great to have a dark mode option for better readability at night.",
  "status": "open",
  "creatorId": "user_123",
  "creatorUsername": "janedoe",
  "createdAt": 1709481600000,
  "updatedAt": 1709481600000
}

Error responses

  • 404 Not Found: Issue not found for the specified owner, repository, and number
  • 400 Bad Request: Invalid owner, repository name, or issue number provided

Create issue

Create a new issue in a repository. POST /api/issues Authentication: Required

Parameters

owner
string
required
The username of the repository owner
repo
string
required
The name of the repository
title
string
required
The title of the issue
body
string
required
The description body of the issue

Response

Returns the created issue object.

Example request

curl -X POST https://your-gitflare-instance.com/api/issues \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "owner": "johndoe",
    "repo": "myproject",
    "title": "Add dark mode support",
    "body": "It would be great to have a dark mode option for better readability at night."
  }'

Example response

{
  "id": 1,
  "repositoryId": 42,
  "fullName": "johndoe/myproject",
  "number": 1,
  "title": "Add dark mode support",
  "body": "It would be great to have a dark mode option for better readability at night.",
  "status": "open",
  "creatorId": "user_123",
  "creatorUsername": "janedoe",
  "createdAt": 1709481600000,
  "updatedAt": 1709481600000
}

Error responses

  • 401 Unauthorized: You must be logged in to create an issue
  • 404 Not Found: Repository not found
  • 400 Bad Request: Invalid owner or repository name provided

Update issue status

Update the status of an issue (open or closed). Only the issue creator can update the status. POST /api/issues/status Authentication: Required

Parameters

issueId
number
required
The ID of the issue to update
status
string
required
The new status for the issue. Must be either open or closed

Response

Returns the updated issue object.

Example request

curl -X POST https://your-gitflare-instance.com/api/issues/status \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "issueId": 1,
    "status": "closed"
  }'

Example response

{
  "id": 1,
  "repositoryId": 42,
  "fullName": "johndoe/myproject",
  "number": 1,
  "title": "Add dark mode support",
  "body": "It would be great to have a dark mode option for better readability at night.",
  "status": "closed",
  "creatorId": "user_123",
  "creatorUsername": "janedoe",
  "createdAt": 1709481600000,
  "updatedAt": 1709568000000
}

Error responses

  • 401 Unauthorized: You must be logged in or you don’t have permission to update this issue
  • 404 Not Found: Issue not found
  • 400 Bad Request: Invalid issue ID or status value provided

Build docs developers (and LLMs) love