neosourceDocs
Search docs

List comments for a subject

GET/api/comments/{subject_kind}/{subject_id}

listComments

Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.

curl

curl -X GET 'https://neosource.dev/api/comments/SUBJECT_KIND/SUBJECT_ID'

fetch

fetch("https://neosource.dev/api/comments/SUBJECT_KIND/SUBJECT_ID", {
  method: "GET",
});

Path parameters

subject_kindrequired

One of: `issue`, `pull_request`, `pr_review_thread`. (`commit` is reserved but not yet routable.)

string

subject_idrequired

Subject UUID — interpreted according to `subject_kind`.

string

Responses

200Comment list

application/json

CommentListResponse

object

commentsrequired

array

items

CommentResponse

object

author_display_name

string | null

author_github_login

string | null

Last-seen GitHub login for authors with a linked GitHub identity (always set for ghosts).

author_handle

string | null

Author handle resolved at read time (route-layer enrichment via the ghost-safe authors projection); `None` if the account row could not be resolved.

author_idrequired

string

author_kind
one of
bodyrequired

string

comment_idrequired

string

created_atrequired

integerint64

deleted_at

integer | nullint64

editedrequired

boolean

parent_id

string | null

updated_atrequired

integerint64

403Forbidden — one of: forbidden, needs_scope

application/json

one of
  • ErrorForbidden
  • NeedsScopeError

    object

    `403` body returned when listing private repos but the linked identity lacks the required provider scope. The SPA turns this into an incremental-authorization prompt (Tier 2) that calls the `/elevate` OAuth endpoint with this `scope`.

    errorrequired

    string

    Always `needs_scope` — this body exists to carry the extra fields that kind needs.

    "needs_scope"

    scoperequired

    string

    The provider scope to request via elevation (e.g. `"repo"`).

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 404Not Found — one of: not_found
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget

Schemas

Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.

AccountKind

string

Rust mirror of the Pg `account_kind` enum (`accounts.kind`). `Ghost` rows are imported-author placeholders (GitHub metadata import, plans/github-metadata-import.md §6): `handle = gh-<github-id>`, `personal_workspace_id` NULL, no password, no sessions. They must never flow through `get_account*` (`AccountRow::into_record` CorruptData-errors on the NULL workspace) — author rendering goes through `PgGithubImportStore::authors_projection`, and claim-by-proof later promotes or merges them.

"human""bot""service""runner""ghost"