---
title: "Fetch a node + its why-path + incoming/outgoing deps"
method: GET
path: "/api/goal/nodes/{id}"
tags: ["Goal"]
---

# Fetch a node + its why-path + incoming/outgoing deps

`GET /api/goal/nodes/{id}`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/goal/nodes/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

## Path parameters

- `id` integer, required

## Response `200`

Node detail.

- object
  - `node` GoalNode: The `goal_nodes` row (src/db/schema.ts), minus `embedding`. `kind='relay'` rows are also returned by the Relay endpoints below (same table) — see the `Relay` schema. `status`/`kind`/`origin`/`ownerRole` are free varchars, never enums, so a new value never needs a migration; the enum lists below are the values in current use, not a hard constraint.
    - `id` integer
    - `tenantId` integer
    - `projectId` integer, nullable
    - `parentId` integer, nullable
    - `kind` string: objective | milestone | goal | work_item | relay
    - `ownerRole` string, nullable
    - `status` string: draft | not_started | ready | in_progress | blocked | done | superseded
    - `origin` string, nullable: greenfield | leverage | migrate | unknown
    - `title` string
    - `contextId` integer, nullable
    - `verifyCmd` string, nullable
    - `evidence` string, nullable
    - `targetWeeks` integer, nullable
    - `startsAt` string, date-time, nullable
    - `endsAt` string, date-time, nullable
    - `size` string, nullable
    - `effortWeeks` number, nullable
    - `externalRef` object
    - `orderIndex` integer
    - `fromRole` string, nullable: Relay routing (kind='relay' only).
    - `toRole` string, nullable: Relay routing (kind='relay' only).
    - `claimedBySessionId` integer, nullable
    - `nudgeCount` integer
    - `lastNudgedAt` string, date-time, nullable
    - `nudgedBySessionId` integer, nullable
    - `payload` object
    - `doneAt` string, date-time, nullable
    - `archivedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `syncOwned` boolean: Server-only marker set exclusively by POST /api/goal/sync.
    - `objectiveRunId` string, nullable
  - `why_path` GoalNode[]: Ancestor chain, objective-first.
    - `id` integer
    - `tenantId` integer
    - `projectId` integer, nullable
    - `parentId` integer, nullable
    - `kind` string: objective | milestone | goal | work_item | relay
    - `ownerRole` string, nullable
    - `status` string: draft | not_started | ready | in_progress | blocked | done | superseded
    - `origin` string, nullable: greenfield | leverage | migrate | unknown
    - `title` string
    - `contextId` integer, nullable
    - `verifyCmd` string, nullable
    - `evidence` string, nullable
    - `targetWeeks` integer, nullable
    - `startsAt` string, date-time, nullable
    - `endsAt` string, date-time, nullable
    - `size` string, nullable
    - `effortWeeks` number, nullable
    - `externalRef` object
    - `orderIndex` integer
    - `fromRole` string, nullable: Relay routing (kind='relay' only).
    - `toRole` string, nullable: Relay routing (kind='relay' only).
    - `claimedBySessionId` integer, nullable
    - `nudgeCount` integer
    - `lastNudgedAt` string, date-time, nullable
    - `nudgedBySessionId` integer, nullable
    - `payload` object
    - `doneAt` string, date-time, nullable
    - `archivedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `syncOwned` boolean: Server-only marker set exclusively by POST /api/goal/sync.
    - `objectiveRunId` string, nullable
  - `deps_in` GoalDep[]
    - `id` integer
    - `tenantId` integer
    - `fromNodeId` integer
    - `toNodeId` integer
    - `kind` 'blocks' | 'informs'
    - `createdAt` string, date-time
  - `deps_out` GoalDep[]
    - `id` integer
    - `tenantId` integer
    - `fromNodeId` integer
    - `toNodeId` integer
    - `kind` 'blocks' | 'informs'
    - `createdAt` string, date-time
  - `duplicates` GoalNode[]: Tombstones merged into this node -- nodes in the same project whose externalRef.duplicate_of equals this node's externalRef.local_id (T829). Empty for a node with no local_id.
    - `id` integer
    - `tenantId` integer
    - `projectId` integer, nullable
    - `parentId` integer, nullable
    - `kind` string: objective | milestone | goal | work_item | relay
    - `ownerRole` string, nullable
    - `status` string: draft | not_started | ready | in_progress | blocked | done | superseded
    - `origin` string, nullable: greenfield | leverage | migrate | unknown
    - `title` string
    - `contextId` integer, nullable
    - `verifyCmd` string, nullable
    - `evidence` string, nullable
    - `targetWeeks` integer, nullable
    - `startsAt` string, date-time, nullable
    - `endsAt` string, date-time, nullable
    - `size` string, nullable
    - `effortWeeks` number, nullable
    - `externalRef` object
    - `orderIndex` integer
    - `fromRole` string, nullable: Relay routing (kind='relay' only).
    - `toRole` string, nullable: Relay routing (kind='relay' only).
    - `claimedBySessionId` integer, nullable
    - `nudgeCount` integer
    - `lastNudgedAt` string, date-time, nullable
    - `nudgedBySessionId` integer, nullable
    - `payload` object
    - `doneAt` string, date-time, nullable
    - `archivedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `syncOwned` boolean: Server-only marker set exclusively by POST /api/goal/sync.
    - `objectiveRunId` string, nullable
  - `history` GoalNodeEvent[]: The node's latest 20 change-history rows, newest first (T926).
    - `id` integer
    - `tenantId` integer
    - `nodeId` integer
    - `action` 'add' | 'advance' | 'claim' | 'release' | 'release_session' | 'sync_create' | 'sync_update' | 'rollup' | 'archive' | 'objective'
    - `beforeStatus` string, nullable
    - `afterStatus` string, nullable
    - `actorUserId` integer, nullable
    - `actorApiKeyId` integer, nullable
    - `sessionId` integer, nullable: Agent session named by the caller; a soft reference.
    - `detail` object
    - `createdAt` string, date-time

## Other responses

- `401`: Missing or invalid credentials.
- `404`: Resource not found (or not visible to the caller).

---

[API](https://skmtc.dev/contextq/apis/contextq-api.md) · [All operations](https://skmtc.dev/contextq/apis/contextq-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contextq/apis/contextq-api/revisions/7afc44056a22?raw)
