---
title: "Shortest path between two objects"
method: GET
path: "/v1/path"
tags: ["Graph"]
---

# Shortest path between two objects

`GET /v1/path`

## Request

- Base URL: `https://api.rossdata.dev`
- URL: `https://api.rossdata.dev/v1/path`
- Auth: none declared

How A reaches B in the knowledge graph.

## Query parameters

- `from` string, required
- `to` string, required

## Response `200`

OK

- PathResult
  - `from` string
  - `to` string
  - `found` boolean
  - `hops` integer: Edges traversed; 0 when not found
  - `path` string[]: Ordered node labels from → to
  - `error` string, nullable: Present when found=false, e.g. unknown_from / unknown_to / no_path

## Other responses

- `400`: Missing ?from= or ?to=

---

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