docs(flagship): update API envelope docs and add A/B/n rollout pattern#59
Conversation
…ve rollout example
kale-stew
left a comment
There was a problem hiding this comment.
Thanks for this — the envelope and casing cleanup is the kind of correctness fix the skill needed. The .data→.result, nextCursor→result_info.cursor, and errors[].message changes are consistent across all three files, and I confirmed nothing stale lingers elsewhere in the flagship dir (including the untouched configuration.md). That part looks ready.
My main hesitation is that the two new factual claims — the A/B/n rollout semantics and the /evaluate/response shapes — don't seem to have been exercised against the live API yet. A few of them are also presented pretty authoritatively, so I'd love to confirm them before they become the reference people trust. Left specifics inline. The envelope fixes feel safe to ship regardless; I'd just hold the A/B/n section until we can verify the bucketing behavior with a real multi-rule test.
Two nits not worth inlining: the SPLIT reason (it exists in the details type but isn't mentioned in the new A/B/n section), and "30 %" spacing being inconsistent with 10%/25%/50% elsewhere in the file.
kale-stew
left a comment
There was a problem hiding this comment.
Nice work on this — the mechanical envelope migration is clean and I was able to verify the key claims against the live Cloudflare API docs.
What's solid:
- All
.data→.result,nextCursor→result_info.cursor, and.error→errors[].messageconversions are accurate and match the current v4 envelope. - The management response shape examples (app, flag, changelog) line up with the live API reference.
- The
/evaluateendpoint description is correct: not enveloped, camelCase, with the right field names and reason values (TARGETING_MATCH,SPLIT,DEFAULT,DISABLED). - The A/B/n multi-variant pattern is well-explained and matches the cumulative-threshold guidance in the official docs (e.g. 30/70/100).
- Good addition of the source-of-truth API reference link.
Questions / suggestions:
- The evaluate endpoint permission wording changed from
flagship:evaluatetoFlagship read permissions. I couldn't confirm the exact token scope name from the public API docs — if the product currently uses a specific permission likeflagship:evaluate, keeping the precise name avoids users creating tokens with the wrong scope. - In the A/B/n example, every rule uses
conditions: [{ attribute: "targetingKey", operator: "not_equals", value: "" }]. The API docs note that an emptyconditions: []matches all contexts. Using[]would make the catch-all intent clearer and remove the redundantnot_equals ""guard.
Nothing blocking — mostly minor nits and one verification question.
kale-stew
left a comment
There was a problem hiding this comment.
approved w/ comments (left above)
Updates Flagship Cloudflare skill references for current control-plane behavior and adds guidance for multi-variant A/B/n experiments.
Changes:
resultresult_info.cursorerrors[].messagejq '.result'.created_at,updated_at,updated_by,default_variation,serve_variation, and changelogflag_key/evaluateresponse behavior:flagKey,variant,reason)conditions: []and set final threshold to100Validation:
origin/main..data,nextCursor, or single.errorreferences remain in Flagship docs.