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 6 commits into
Conversation
✅ Deploy Preview for ornate-narwhal-088216 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Note to self: There are mentions in this content of |
|
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. |
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>
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>
Resolve the CONFIRM WITH ENGINEERING items from the PR review: - CREATE is unchanged from v1 — parent stays in the URL path, no wrapper. Revert the tutorial creates and validation example, drop the migration CREATE step, and fold a "no change" note into What's not changing. - Remove rate-limit content; rate limiting is not part of this release. - Replace the migration timeline table with prose: no sunset dates or deprecation headers ship now, and v1 stays fully supported. - Fill in the Available endpoints table (Ecosystems, Integrations, Events); none are new at GA. Correct v1 paths as versioned. - Settle tag end-of-life (client-side deprecated filter; v1 ListEolTags remains) and vulnerability-report guidance (continue on v1). - Set the Go SDK clients path to clients/v2 and sweep stray v2beta1 references. - Remove the draft banners. Param casing and updateMask remain open but non-blocking. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aaf54bc to
baae186
Compare
|
Let's also ensure we update the "available endpoints" table (if that is in the updated version) to include a summary of all migrated endpoints. Steven will be able to provide the up to date list. |
I'm happy to do that. @heplayskeys, the table is here: https://github.com/chainguard-dev/edu/pull/3613/changes#diff-0c8a4e1c87c3ba99c075670d8ca05b2f81f938bc2a7731fd4cfc60e2b44489fcR39-R52 |
Customer feedback (via engineering) showed the "set up access" walkthrough was actively misleading: it created a subgroup, then created a CI identity inside that subgroup and bound the role there — leaving the identity unable to see the registry, which lives under the root org group. - §2: stop creating a subgroup. Create the identity under the root org group and bind the role there, so it can reach the registry. Add a note explaining why root-level placement matters. - §1 and §3: lead with repos instead of groups — the resource customers actually have — and drop the nested-subgroup filter example. - §4: dedupe to tags and end-of-life (repo list/get now lead in §1). - §6: trigger the validation-error example with an identity create rather than a subgroup create. - §7: unify the field-mask examples on repos. - Cleanup: drop the group deletion. - Migration guide: bring examples to parity — Steps 3, 4, 5 and the full example now use repos. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@gracelarsen-star and @cmdpdx thanks for the discussion of this in the beta version of the v2 tutorial page. I've folded the fix into this GA update that will merge soon with the APIv2 GA. In the most recent commit, the tutorial now leads with the registry:
The migration guide was brought to parity: Steps 3/4/5 and the full example now use repos. Verified clean (no @gracelarsen-star and @heplayskeys , we still have the remaining
|
[ ] 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, keeps the CREATE examples as parent-in-path (confirmed unchanged at GA in review), adds worked examples for the most-used direct-API operations (repos, tags, advisories), and fills in the endpoint table across all v2 domains.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 soon. The existing tutorial is beta-only. Direct API integrators also need a dedicated migration guide, which didn't exist yet.
What are the acceptance criteria?
Engineering has reviewed this PR and answered the open questions; the content has been updated to match (see the checklist below). Two minor items remain open but non-blocking. Before external publish: a final proofread, and Grace's optional call on the endpoint-table framing.
Out of scope, but flagged for follow-up once their generators catch up to GA:
content/platform/administration/cloudevents/events-reference.mdstill referencesv2beta1service names throughout (looks auto-generated), andcontent/platform/api/spec-api-v2.mdstill points atapi-v2beta1.json.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. Engineering has reviewed the items below; resolved items are checked and applied, and the two open items are non-blocking. Where the doc reflected GA guidance differing from the published v2beta1 spec, the resolution is noted.
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.
Update: Not addressed in review; treating as non-blocking. Keeping snake_case, which matches the live-captured examples — revisit if GA requires camelCase.
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.
Update: Not separately restated in review; treating as non-blocking and stable, since reply 8 confirms
v2beta1is dropped across REST paths, proto packages, and the SDK at GA.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.
Updated in collaboration with Claude Code running Claude Opus 4.8 on 2026-08-04.