Skip to content

docs(docs): v0.96.x REST API migration guide#4164

Merged
mmabrouk merged 2 commits intomainfrom
docs/v096-rest-api-migration
Apr 16, 2026
Merged

docs(docs): v0.96.x REST API migration guide#4164
mmabrouk merged 2 commits intomainfrom
docs/v096-rest-api-migration

Conversation

@mmabrouk
Copy link
Copy Markdown
Member

@mmabrouk mmabrouk commented Apr 16, 2026

Summary

Expand the v0.96.x changelog entry into a full REST API migration guide and bring every doc and notebook that referenced the removed endpoints up to date.

Why

A customer hit a 404 on GET /api/apps and discovered a larger cliff: ~53 REST endpoints were removed in v0.96 and the auto-generated reference doesn't explain the new conventions. The existing unified-invoke-api changelog only covered invocation, not the CRUD surface.

What changed

New: REST API Guide (docs/docs/reference/api-guide/)

  • 01-overview.mdx — entities (artifact/variant/revision), references, auth, response envelope.
  • 02-query-pattern.mdxPOST /{resource}/query body shape, cursor-based windowing, archive/unarchive, cross-resource filtering gotcha.
  • 03-simple-endpoints.mdx — explains the /simple/ prefix (collapses artifact+variant+revision into one call), with worked examples for /simple/applications/query and /simple/traces/*, including the four common query shapes and a note about the two links fields.
  • Added to sidebars.ts under Reference between Python SDK and API Reference.

Renamed + expanded: docs/blog/entries/unified-invoke-api.mdx

  • Title renamed from "Unified Invoke API" to "REST API Migration (v0.96)" for discoverability. Slug kept to avoid breaking external links.
  • New ## Other API Changes section: migration table for 19 removed endpoints, plus a "Notable caveats" subsection covering simple vs lean application query, project-scoped environments, annotation ID semantics, evaluator creation behavior, and the silent slug requirement on commit.
  • Two worked examples at the bottom with real request/response payloads (fetch applications, add annotation).

Updated tutorials and cookbook

  • docs/docs/tutorials/cookbooks/01-capture-user-feedback.mdx and examples/jupyter/observability/capture_user_feedback.ipynb — migrated to POST /api/simple/traces/.
  • docs/docs/observability/trace-with-python-sdk/08-annotate-traces.mdx and examples/jupyter/observability/annotate-traces-tutorial.ipynb — rewrote create/query/update/delete flows against /simple/traces/*. Renamed metadata to meta to match the current schema.
  • docs/docs/prompt-engineering/managing-prompts-programatically/02-creating-prompts.mdx/apps/simple/applications/.
  • docs/docs/prompt-engineering/managing-prompts-programatically/03-create-and-commit.mdx — mapped all /variants/configs/* flows to /applications/variants/* and /applications/revisions/*. Each REST example now shows the slug-to-UUID resolve step inline.
  • docs/docs/prompt-engineering/managing-prompts-programatically/04-deploy.mdx/variants/configs/deploy/applications/revisions/deploy with slug-based refs.

How it was verified

Every curl and JSON body in the new and updated docs was run against eu.cloud.agenta.ai with a test account API key. Four surprises caught during testing and fixed before commit:

  1. /simple/traces/query has two links fields. The top-level array matches on the trace's own trace_id/span_id (batch lookup by id). The nested trace.links.invocation filters on inbound links. The initial doc used the wrong one; now corrected, with a note explaining both.
  2. application_refs: [{"slug": "..."}] does not filter on /applications/variants/query. Works on /applications/query. Docs now show a two-step resolve.
  3. POST /applications/revisions/commit silently returns {"count": 0} if slug is missing. OpenAPI marks it optional. Docs now include slug in every commit example.
  4. POST /simple/traces/ does not auto-create the referenced evaluator. Behavior change from /preview/annotations/. Docs now explain that annotations accept any slug but the evaluator entity must be created explicitly to get aggregated stats in the UI.

All four were flagged to @jpyamamoto separately for API-side decisions.

Test plan

  • Docs build: pnpm --filter @agenta/docs build (or the docs build step in CI) succeeds.
  • sidebars.ts renders the new "REST API Guide" section under Reference.
  • Migration table entries in the changelog entry resolve to valid links in the auto-generated API reference.
  • Cookbook notebook runs end-to-end with a fresh evaluator slug (tested locally).
  • Visual check: the changelog entry "REST API Migration (v0.96)" appears in the blog index with the new title.

Open with Devin

Expand the v0.96 changelog entry into a REST API migration guide, add a
new REST API Guide section, and update all tutorial pages and notebooks
that referenced the removed endpoints.

Driven by customer feedback on removed endpoints (notably GET /apps and
/preview/annotations). All curl examples verified against eu.cloud.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Apr 16, 2026 6:36pm

Request Review

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@mmabrouk mmabrouk requested a review from jp-agenta April 16, 2026 18:36
@jp-agenta jp-agenta changed the title docs(docs): v0.96 REST API migration guide docs(docs): v0.96.x REST API migration guide Apr 16, 2026
@mmabrouk mmabrouk enabled auto-merge April 16, 2026 18:38
@mmabrouk mmabrouk merged commit ba9b09b into main Apr 16, 2026
6 checks passed
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants