Gnoll Docs Back to Dashboard
Quick Start
Getting Started

Issues API

Create, read, update, and manage issues programmatically.

List Issues

GET /api/v1/issues

Returns a paginated list of issues in the current project scope.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: open, in_progress, closed
typestringFilter by type: task, bug, story, epic, decision
priorityintFilter by priority (0-4)
assigneestringFilter by assignee user ID
labelstringFilter by label name
dueBeforedatetimeIssues due before this date
dueAfterdatetimeIssues due after this date
includeDeferredboolInclude deferred issues (default: false)
sortBystringcreated, updated, priority, due
pageintPage number (default: 1)
pageSizeintItems per page (default: 25)

Example

curl -H "Authorization: Bearer gkey_..." \
     "https://app.gnoll.ai/api/v1/issues?status=open&type=task&sortBy=priority"

Get Issue

GET /api/v1/issues/{id}

Returns the full detail of a single issue including labels, comments count, child count, and completion percentage.

Create Issue

POST /api/v1/issues

Request Body

{
  "title": "Implement user authentication",
  "type": "task",
  "priority": 3,
  "body": "Add login/logout with JWT tokens",
  "assigneeId": "user-id",
  "parentId": "epic-id",
  "dueAt": "2025-04-01T00:00:00Z",
  "labelIds": [1, 2],
  "estimatedMinutes": 120,
  "acceptanceCriteria": "User can log in with email and password"
}
FieldRequiredDescription
titleYesIssue title (1-500 chars)
typeYestask, bug, story, epic, decision
priorityNo0-4 (default: 0)
bodyNoDetailed description
assigneeIdNoUser ID to assign
parentIdNoParent issue ID (for nesting under epics)
dueAtNoDue date (ISO 8601)
labelIdsNoArray of label IDs to attach
estimatedMinutesNoTime estimate in minutes (integer)
acceptanceCriteriaNoDefinition of done for this issue

Update Issue

PATCH /api/v1/issues/{id}

Partial update — only send the fields you want to change.

{
  "title": "Updated title",
  "priority": 4,
  "status": "in_progress",
  "estimatedMinutes": 90,
  "acceptanceCriteria": "Tests pass"
}

Close Issue

POST /api/v1/issues/{id}/close

Closes the issue and triggers any automation rules. Optionally include a closing comment:

{ "comment": "Fixed in PR #42" }

Reopen Issue

POST /api/v1/issues/{id}/reopen

Claim Issue

POST /api/v1/issues/{id}/claim

Assigns the issue to the authenticated user and sets status to in_progress.

Defer / Undefer

POST /api/v1/issues/{id}/defer
{ "deferUntil": "2025-04-15T00:00:00Z" }
POST /api/v1/issues/{id}/undefer

Move Issue

POST /api/v1/issues/{id}/move
{
  "targetProjectId": "project-id",
  "moveChildren": true
}

Moves the issue (and optionally its children) to another project. Returns the count of moved children and cross-project dependencies.

Issue History

GET /api/v1/issues/{id}/history

Returns the parsed change history for an issue, with structured field-level diffs.

Revert a Change

POST /api/v1/issues/{id}/history/{eventId}/revert

Reverts a specific field change from an "updated" event.

Delete Issue

DELETE /api/v1/issues/{id}

Permanently deletes an issue and its associated data.

Bulk Operations

Bulk endpoints accept an array of issue IDs:

POST /api/v1/issues/bulk/close
POST /api/v1/issues/bulk/reopen
POST /api/v1/issues/bulk/status
POST /api/v1/issues/bulk/priority
DELETE /api/v1/issues/bulk/delete
// Example: bulk close
POST /api/v1/issues/bulk/close
{ "issueIds": ["abc123", "def456", "ghi789"] }

Stale Issues

GET /api/v1/issues/stale?days=14&type=task&sortBy=stalest

Duplicate Detection

GET /api/v1/duplicates/scan?status=open&minScore=50
POST /api/v1/issues/{id}/mark-duplicate
{ "duplicateOfId": "original-issue-id" }