The Riftmap API is a small, paginated REST API that exposes the dependency graph Riftmap builds from your connected orgs. It’s designed to be called by AI coding agents and CI pipelines that need to answer “if I change repo X, what else breaks?”Documentation Index
Fetch the complete documentation index at: https://docs.riftmap.dev/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
/api/v1.
Authentication
All endpoints require a workspace API key. Keys look likerfm_live_<random> and can be passed as either header:
workspace_id. See Authentication for the full header matrix, rate limits, and revocation.
The endpoint surface
The full agent‑facing surface, with one‑liners. Each row links to the auto‑generated reference page in the sidebar for the full request/response shape.| Endpoint | One‑liner |
|---|---|
GET /repositories/lookup?url=… or ?full_path=… | Resolve a git remote URL (param: url, not clone_url) or org/repo slug (param: full_path) → Riftmap repo. Pass exactly one. |
GET /repositories/{id} | Repo details, including freshness fields. |
GET /repositories/{id}/context | Recommended second hop. Single‑call bundle: repo + capped deps + capped dependents + artifacts. |
GET /repositories/{id}/dependencies | Direct dependency declarations, paginated, deduplicated. |
GET /repositories/{id}/dependents | Direct dependents, paginated, deduplicated. |
GET /repositories/{id}/impact | Transitive downstream blast radius via Python BFS. Repo-level; not file-scoped. |
GET /artifacts/{id}/consumers | Who consumes this artifact and at which version (version‑aware). |
GET /artifacts/{id}/versions | All versions seen across the org. |
GET /connected-orgs/{id}/graph | Full org graph or subgraph anchored at a repo. |
Conventions
- Versioning — All endpoints are prefixed with
/api/v1. - Pagination — List endpoints accept
limit(1–500, default 100) andoffset(default 0) query params. The total matching row count is returned in theX-Total-Countresponse header so a client can compute page counts in one round‑trip. Out‑of‑range values return 422. - Workspace isolation — Foreign‑workspace requests return 404, never 403, to avoid leaking existence.
- Freshness — Every repo response carries
last_scanned_at,last_commit_sha,last_activity_at, andarchived. Iflast_activity_at > last_scanned_at, treat the data as stale. - Errors — JSON body with a
detailfield and an appropriate HTTP status code. Agents should explicitly handle401,404,409(ambiguous lookup),422, and429(Retry-Afterhonoured).
OpenAPI schema
Live/openapi.json and /docs are gated off in production. The schema is generated in CI from the dev‑mode app and shipped at a stable static URL:
Where to start
Agent integration
The lookup → context → impact pattern, the freshness rule, and the full surface in one page.
Code examples
The four core flows in curl, Python (httpx), and TypeScript (fetch).
Authentication
Create a workspace API key and learn the header conventions.
Quickstart
Sign up, connect an org, and make your first API call in five minutes.
