API Reference
All routes are served from the DriftGrid Next.js app.
Projects
| Method | Route | Auth | Purpose |
|---|---|---|---|
| GET | /api/clients | Optional | List all clients and projects |
| GET | /api/manifest/{client}/{project} | Optional | Read project manifest |
| PUT | /api/manifest/{client}/{project} | Optional | Update manifest |
| POST | /api/create-project | No | Scaffold a new project |
Versioning
| Method | Route | Auth | Purpose |
|---|---|---|---|
| POST | /api/iterate | No | Drift up — create new version |
| POST | /api/branch | No | Drift right — create new concept |
| POST | /api/paste | No | Paste version into a concept |
Rounds
| Method | Route | Auth | Purpose |
|---|---|---|---|
| POST | /api/rounds | No | Close, create, or copy-to round |
Actions (via action field in body):
close— finalize round with selectscreate— new round from selected versionscopy-to— copy a version to an existing round
Annotations
| Method | Route | Auth | Purpose |
|---|---|---|---|
| GET | /api/annotations?client=X&project=Y&conceptId=Z&versionId=W | No | Read prompts on a version |
| POST | /api/annotations | No | Create a prompt/annotation |
| PATCH | /api/annotations | No | Update (resolve, edit, set status) |
| DELETE | /api/annotations | No | Remove an annotation |
Sharing (Cloud Only)
| Method | Route | Auth | Purpose |
|---|---|---|---|
| POST | /api/share | Yes | Create share link |
| GET | /api/share?client=X&project=Y | Yes | List share links |
Public Share Endpoints (No Auth)
| Method | Route | Purpose |
|---|---|---|
| GET | /api/s/{token}/manifest | Read manifest via share token |
| GET | /api/s/{token}/html/{path} | Read HTML via share token |
| GET | /api/s/{token}/thumbs/{path} | Read thumbnails via share token |
| GET | /api/s/{token}/comments | Read client comments |
| POST | /api/s/{token}/comments | Add client comment |
| PATCH | /api/s/{token}/comments | Resolve/unresolve comment |
Assets
| Method | Route | Auth | Purpose |
|---|---|---|---|
| GET | /api/html/{client}/{project}/{path} | Optional | Serve HTML file |
| GET | /api/thumbs/{client}/{project}/{file} | Optional | Serve thumbnail |
| POST | /api/thumbs-generate | No | Generate single thumbnail |
| POST | /api/bake-edits | No | Apply client text edits to HTML |
Last updated on