---
title: "Get an issue"
method: GET
path: "/v1/issues/{idOrNumber}"
tags: ["Issues"]
---

# Get an issue

`GET /v1/issues/{idOrNumber}`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/issues/{idOrNumber}`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Returns an issue with its assignees, its newest guidance comments, and its latest comments and history entries; the comments route pages every comment. Plain sightings are left out of that history; the issue's occurrence counts summarize them, and the history route pages them.

## Path parameters

- `idOrNumber` string, required

## Response `200`

Issue retrieved

- IssueDetail: An issue with what a person or agent needs to act on it.
  - `assignments` IssueAssignment[]: Its assignees.
    - `assignedBy` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
      - `agentId` string: The agent, for an agent actor; null otherwise.
      - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
      - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
      - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
    - `assigneeDeleted` boolean: Whether the assignee is an agent that has since been deleted; its assignment no longer keeps the issue out of Monitoring or Closed.
    - `assigneeId` string: The person's user id or the agent's id.
    - `assigneeKind` 'PERSON' | 'AGENT': A person or an agent.
    - `createdAt` string, date-time: When it was made.
    - `investigationId` string: For an agent's assignment, the run that made it active, which it ends with; null for a person's.
    - `note` string: A short note on its part, or null.
    - `status` 'ACTIVE' | 'DONE': Whether the assignee is still working on its part.
    - `updatedAt` string, date-time: When it last changed.
  - `guidance` IssueComment[]: Its newest guidance comments, oldest first: at most 20, and 32768 bytes of their bodies, though the newest is always there.
    - `author` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
      - `agentId` string: The agent, for an agent actor; null otherwise.
      - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
      - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
      - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
    - `body` string: The markdown body.
    - `channel` 'REST' | 'MCP' | 'SYSTEM': How a change reached the server.
    - `createdAt` string, date-time: When it was written.
    - `editedAt` string, date-time: When its author last changed the body, or null.
    - `guidance` boolean: Whether it is guidance, which agents weigh as advice.
    - `guidanceSetAt` string, date-time: When it was marked guidance, or null.
    - `guidanceSetBy` string: The user id of the person who marked it guidance, or null.
    - `id` string: The comment id.
    - `issueId` string: The issue it is on.
    - `lockedFieldProposal` string: The locked field the comment proposes changing, as named in a `FIELD_LOCKED` error (`priority`, `label:cost`), or null.
  - `guidanceOmitted` integer: How many older guidance comments that bound left out; `GET /v1/issues/{id}/comments` pages every comment.
  - `guidanceReads` IssueGuidanceReads[]: For each current guidance comment that agents were given, the investigations it was delivered to; a comment no longer guidance is not listed.
    - `commentId` string: The guidance comment.
    - `latest` IssueGuidanceRead[]: The latest deliveries, newest first, at most 3.
      - `agentId` string: The investigation's agent, or null when the investigation no longer exists.
      - `investigationId` string: The investigation.
      - `readAt` string, date-time: When the guidance was delivered.
    - `readCount` integer: How many investigations it was delivered to.
  - `issue` Issue: One durable problem or task on the organization's issue board.
    - `closedAt` string, date-time: When it closed, or null while open.
    - `confidence` 'CONFIRMED' | 'LIKELY' | 'UNVERIFIED': How sure the reporter is that the problem is real.
    - `createdAt` string, date-time: When it was filed.
    - `description` string: The current understanding, in markdown, kept current rather than appended to.
    - `duplicateOf` string: The surviving issue, set exactly when resolved as `DUPLICATE`; null in a response when the reader can't see the survivor.
    - `duplicateOfHidden` boolean: True in a response whose reader can't see the surviving issue.
    - `entities` object: The `entity:*` tags it concerns, the same vocabulary as memory tags, keys in lower case, sorted by key.
    - `evidence` IssueEvidence[]: Things a person can open to check the claim.
      - `from` string, date-time: Start of a log query's time range, or null.
      - `kind` 'LOG_QUERY' | 'EVENT' | 'URL', required: What the evidence points at.
      - `label` string: A short description of what it shows, or null.
      - `target` string, required: The Grepr log query for LOG_QUERY, the event id for EVENT, or an http(s) URL for URL.
      - `to` string, date-time: End of a log query's time range, or null.
    - `expiresAt` string, date-time: When the issue stops applying and closes as `EXPIRED`, or null.
    - `fingerprint` string: An optional free-form key for exact-match search, or null.
    - `firstSeenAt` string, date-time: The first sighting, or null before any.
    - `id` string: The issue id.
    - `labels` string[]: Categories, such as `cost`, sorted.
    - `lastSeenAt` string, date-time: The latest sighting, or when it was filed.
    - `links` IssueLink[]: Related pipelines, investigations, memories, suggestions and external tickets.
      - `hidden` boolean, nullable: True for a link to an issue the reader can't see. Set only in responses.
      - `kind` 'PIPELINE' | 'INVESTIGATION' | 'MEMORY' | 'AGENT_SUGGESTION' | 'EXTERNAL' | 'ISSUE', required: What the link points at.
      - `label` string: A short description, or null.
      - `target` string, nullable: Null only for a hidden issue link in a response.
    - `locks` IssueLocks: The fields and labels people have locked against agent changes. `state` never locks.
      - `fields` object: The locked fields, each with who locked it and when.
      - `labels` object: The locked labels, keyed by label.
    - `nextStep` string: The concrete next action and who it waits on, or null.
    - `number` integer: The short per-organization handle, shown as `#142`.
    - `occurrenceCount` integer: How many investigations sighted it.
    - `priority` 'P0' | 'P1' | 'P2' | 'P3': How soon someone should act.
    - `regressed` boolean: Whether it reopened on a new sighting after being fixed; cleared on its next close.
    - `reporter` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
      - `agentId` string: The agent, for an agent actor; null otherwise.
      - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
      - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
      - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
    - `resolution` 'FIXED' | 'DUPLICATE' | 'NOT_A_PROBLEM' | 'IGNORED' | 'OBSOLETE' | 'EXPIRED': Why it closed; set exactly when `state` is `CLOSED`.
    - `revisitAt` string, date-time: When someone should check back, or null. Then a Monitoring issue's watcher is started on it, or, with no watcher, it goes back to `READY`.
    - `state` 'TRIAGE' | 'READY' | 'IN_PROGRESS' | 'WAITING' | 'MONITORING' | 'CLOSED': Where the issue is in its lifecycle.
    - `stateChangedAt` string, date-time: When the state last changed.
    - `teamIds` string[]: The teams that may see the issue, sorted.
    - `title` string: One line naming the problem.
    - `updatedAt` string, date-time: When it last changed.
    - `version` integer: Bumped by every change to a field, the state, an assignment, a lock or the teams.
    - `watchedBy` string: The agent watching it in `MONITORING`: the one that moved it there, started on it again when a sighting comes in or its revisit time passes. Null outside Monitoring.
  - `recentComments` IssueComment[]: Its latest comments, newest first, at most 20.
    - `author` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
      - `agentId` string: The agent, for an agent actor; null otherwise.
      - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
      - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
      - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
    - `body` string: The markdown body.
    - `channel` 'REST' | 'MCP' | 'SYSTEM': How a change reached the server.
    - `createdAt` string, date-time: When it was written.
    - `editedAt` string, date-time: When its author last changed the body, or null.
    - `guidance` boolean: Whether it is guidance, which agents weigh as advice.
    - `guidanceSetAt` string, date-time: When it was marked guidance, or null.
    - `guidanceSetBy` string: The user id of the person who marked it guidance, or null.
    - `id` string: The comment id.
    - `issueId` string: The issue it is on.
    - `lockedFieldProposal` string: The locked field the comment proposes changing, as named in a `FIELD_LOCKED` error (`priority`, `label:cost`), or null.
  - `recentEvents` IssueEvent[]: Its latest history entries, newest first, at most 20; `GET /v1/issues/{id}/events` pages older ones.
    - `actor` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
      - `agentId` string: The agent, for an agent actor; null otherwise.
      - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
      - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
      - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
    - `channel` 'REST' | 'MCP' | 'SYSTEM': How a change reached the server.
    - `createdAt` string, date-time: When it happened.
    - `diff` object: Each changed field's value before and after, keyed by field name. The description carries only its new text; its previous text is the `to` of the issue's previous entry that changed it. A `COMMENTED` entry carries the comment's id as `comment.to`. A `CREATED` entry by an agent carries, as `entitiesFilled.to`, the entities the server filled from the agent's investigation, beside the complete `entities`; it is absent when nothing was filled.
    - `id` string: The event id.
    - `issueId` string: The issue that changed.
    - `kind` 'CREATED' | 'UPDATED' | 'TRANSITIONED' | 'LOCKS_CHANGED' | 'COMMENTED' | 'GUIDANCE_CHANGED' | 'COMMENT_EDITED' | 'COMMENT_DELETED' | 'ASSIGNMENT_CHANGED' | 'OCCURRED' | 'HANDED_OFF' | 'RUN_NOT_STARTED': What kind of change it was.
  - `runs` IssueRun[]: Its runs that haven't ended, oldest first: queued or working on it, handed, picked up or watching.
    - `agentId` string: The run's agent.
    - `investigationId` string: The run's investigation id.
    - `status` 'QUEUED' | 'RUNNING' | 'STOPPING' | 'CANCELLING' | 'STOPPED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'DISCARDED': Where the run is: QUEUED, RUNNING, STOPPING, CANCELLING, or STOPPED and resumable.

## Other responses

- `401`: Unauthorized
- `404`: Issue not found

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
