---
title: "Get the shortest path graph"
method: GET
path: "/api/v2/graphs/shortest-path"
tags: ["Graph", "Community", "Enterprise"]
---

# Get the shortest path graph

`GET /api/v2/graphs/shortest-path`

A graph of the shortest path from `start_node` to `end_node`.

## Query parameters

- `start_node` string, required
- `end_node` string, required
- `relationship_kinds` string — The contains predicate checks a property against the values in a given comma separated list. - `in` checks if the property matches an element in the given comma separated list. - `in:Contains,GetChangesAll,MemberOf` - `nin` checks if the property does not match an element in the given comma separated list. - `nin:LocalToComputer,MemberOfLocalGroup`
- `only_traversable` boolean

## Response `200`

A graph of the shortest path from `start_node` to `end_node`.

- object
  - `data` ModelUnifiedGraphGraph
    - `nodes` object
    - `edges` ModelUnifiedGraphEdge[]
      - `source` string
      - `target` string
      - `label` string
      - `kind` string
      - `lastSeen` string, date-time
      - `properties` object

## Other responses

- `400` — **Bad Request** This could be due to one of the following reasons: - JSON payload is missing or malformed - Path or query parameters are missing or invalid/malformed - The data sent is not valid (ex- sending a `string` in an `integer` field)
- `401` — **Unauthorized** This endpoint failed an authentication requirement. Either the client tried to access a protected endpoint without being authenticated, or an auth validation failed (ex- invalid credentials or expired token).
- `403` — **Forbidden** This is most commonly caused by an authenticated client trying to access a resource that it does not have permission for.
- `429` — **Too Many Requests** The client has sent too many requests within a certain time window and tripped the rate limiting middleware.
- `500` — **Internal Server Error** This is usually the result of either an unexpected database or application error. The client may try modifying or resending the request, but the error is likely not related to the client doing something wrong.

---

[API](https://skmtc.net/specterops/apis/bloodhound-api.md) · [All operations](https://skmtc.net/specterops/apis/bloodhound-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/specterops/bloodhound-api/revisions/e59754bccd6e/schema)
