docs: update API v2 tutorial for GA and add v1-to-v2 migration guide#3613
docs: update API v2 tutorial for GA and add v1-to-v2 migration guide#3613matthewhelmke wants to merge 3 commits into
Conversation
✅ Deploy Preview for ornate-narwhal-088216 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Add worked examples for the operations that direct API integrations (gRPC and curl) use most, based on v1 usage data: registry repo Get and Update, tag listing and the deprecated flag, and vulnerability advisories. Cross-reference the repo PATCH example from the migration guide's field-mask step. Align new examples with the published v2beta1 spec (paths, response fields, tag deprecation, advisory fields) and mark the remaining GA divergences CONFIRM WITH ENGINEERING: the missing vulnerability-report endpoints and the absence of a server-side end-of-life tag filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Note to self: There are mentions in this content of |
Update the OIDC subject claim in the identity and role-binding examples to GitHub's immutable format (repo:org@<owner-id>/repo@<repo-id>:...). This keeps the tutorial consistent with the broader docs update in chainguard-dev#3616, which explains the format and how to find the numeric IDs. Refs: DOCS-73 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Added a commit updating the OIDC subject claim in the identity and role-binding examples to GitHub's new immutable format ( Context and the full cross-doc update live in #3616. The tutorial's note links into that PR's "Finding your repository's numeric identifiers" section, so #3616 should merge first — it's a small, focused change and expected to land quickly. |
[ ] Check if this is a typo or other quick fix and ignore the rest :)
Type of change
Documentation — updates an existing page and adds a new one.
What should this PR do?
Resolves DOCS-49.
content/platform/api/api-v2-tutorial.md) for GA: drops the beta framing, renamesv2beta1paths tov2, rewrites the three CREATE examples to the GA parent-in-body pattern (a real behavior change from beta, not just a path rename), and expands the endpoint table to include the two domains added at GA (Ecosystems, Integrations).content/platform/api/api-v2-migration.md) for anyone calling the API directly and migrating from v1 to v2.Migrationcategory (content/get-started/migration/_index.md) to the new guide, using the samecrosslinksfrontmatter pattern as the existing "Catalog Starter" entry underSelf-serve.Why are we making this change?
API v2 is going GA (~July 27, GTM date July 30). The existing tutorial is beta-only and describes a CREATE pattern that changes at GA. Direct API integrators also need a dedicated migration guide, which didn't exist yet.
What are the acceptance criteria?
This is a draft PR for engineering review, not a final ship — several facts aren't confirmed yet, and I can't test against live GA (
/v2, non-beta) endpoints because they don't exist yet. Every open item is marked inline with aCONFIRM WITH ENGINEERINGcallout:v2beta1tov2at GASteven Johnson and Grace Larsen (Linear project owners) need to fill in the items above before this goes external — Matthew is following up in Slack directly rather than via a GitHub mention, since I don't have their handles here. Also flagging separately in Slack:
content/platform/administration/cloudevents/events-reference.mdstill referencesv2beta1service names throughout (looks auto-generated) andcontent/platform/api/spec-api-v2.mdstill points atapi-v2beta1.json— neither is in scope for this PR, but both will need the same rename once their generators catch up to GA.How should this PR be tested?
Cannot be tested end-to-end against live GA endpoints — they aren't up yet. What was verified:
/platform/api/api-v2-migration/, the alias from the stale/chainguard/administration/api-v2-migration/path redirects correctly, the tutorial no longer shows beta framing, and theMigrationsidebar shows the new crosslink with the external-link icon.updateMaskfield-mask parameter name (called out as unconfirmed in the source docs) was previously tested and confirmed working against the live beta API in an earlier round — carried forward, not re-guessed.Engineering review checklist — API v2 GA docs
This PR documents API v2 GA, which isn't final or published yet. Where the doc reflects GA guidance that differs from the current published v2beta1 spec, that's called out below. Every item is also marked inline as
CONFIRM WITH ENGINEERING, and the pages carry a "do not publish externally" banner until these are resolved. Please confirm each item or correct it.Needs confirmation
1. CREATE request shape (highest impact — affects every create example). Doc uses collection-path + parent-in-body + a resource wrapper:
POST /iam/v2/groupswith{"parent": "<uid>", "group": {…}}. The v2beta1 spec instead uses parent-in-path with the resource fields sent directly:POST /iam/v2beta1/groups/{parent}with{"name": …, "description": …}(noparentfield, no wrapper). Confirm GA moves to parent-in-body and the wrapper field names (group,identity,roleBinding).Where: tutorial §2 (Create a group / identity / Bind a role), §5 validation error; migration guide Step 3.
2. Query-parameter casing. Doc uses snake_case throughout:
page_size,page_token,order_by,skip,uidp.descendants_of,uidp.children_of. The v2beta1 spec documents camelCase (pageSize,orderBy,uidp.descendantsOf, …). Confirm GA accepts snake_case (as beta did in live testing), or tell us to switch the doc to camelCase.Where: both files, all List examples.
3.
updateMaskparameter. Doc uses?updateMask=<field>for partial PATCH updates. This worked against the live beta API but isn't restated in the spec. Confirm the parameter name and partial-update behavior hold at GA.Where: tutorial §7 (Partial updates); migration guide Step 4.
4. GA domains: Ecosystems (Libraries) and Integrations (Advisory). Doc lists these as new GA domains with resources TBD. Note: the beta spec already exposes
/libraries/v2beta1/artifacts(so Ecosystems is not new at GA), and has no/advisory/path at all. Confirm the GA resource names, path prefixes, and supported operations for both, and correct the domain tables.Where: tutorial "Available endpoints" table; migration guide "Path prefixes by domain" table.
5. Tag end-of-life. v1 had a dedicated
ListEolTagscall. The beta spec has no end-of-life endpoint or server-side filter — only a per-tagdeprecatedboolean. Confirm whether GA adds a dedicated filter/endpoint, or whether client-side filtering ondeprecatedis the intended path.Where: tutorial §4 (Check for deprecated tags).
6. Vulnerability reports. v1's
GetVulnReportandListVulnCountReports(heavily used by direct HTTP integrations) have no equivalent in the beta spec, which exposes only advisories. Confirm whether GA adds vulnerability-report endpoints, or whether advisory data is meant to replace them.Where: tutorial §5 (Vulnerability reports).
7. Rate limits and headers. Doc states rate limits are enforced at GA but gives no values. Confirm the specific limits and any response headers (for example, remaining-quota), and whether a rate-limits reference page exists to link to.
Where: tutorial "Operational notes"; migration guide Step 8.
8. Go SDK package path. Confirm whether the Go SDK client library moves from
chainguard.dev/sdk/proto/platform/clients/v2beta1to av2path at GA, or keeps thev2beta1package name internally after the REST paths rename.Where: tutorial "Operational notes"; migration guide Step 9.
9. Migration timeline. All dates and phase triggers (parallel availability → warning escalation → soft shutdown → hard removal) are placeholders. Confirm real dates/criteria, or tell us to drop the table until they exist.
Where: migration guide "Timeline".
Already verified against the published v2beta1 spec (no action needed)
/repos/{uid}) and Update (PATCH /repos/{repo.uid}, writablename/description) paths and fields./registry/v2/tags),uidp.children_ofscoping, and fields (name,digest,deprecated,updateTime).uid,advisoryId,artifactName,updateTime).nextPageToken,totalCount,skipped) across List endpoints.uid,createTime,updateTime).Created in collaboration with Claude Code running Claude Sonnet 5 on 2026-07-20.