Page MenuHomeVyOS Platform

vyos-api docs: document error semantics of batched /configure arrays (failing op not identified)
Open, LowPublic

Description

Doc page: https://docs.vyos.io/en/latest/automation/vyos-api.html

/configure accepts data as an array of ops (documented). What is not documented is the error contract when one op in the array fails:

  • The whole request returns HTTP 400, and the error string frequently does not identify which op failed (no index, sometimes no path) — e.g. a whole-batch HTTP 400 on a 25-op firewall batch where only one rule had a validator error.
  • It is also not stated whether a failed batch is all-or-nothing (nothing committed) or partially applied.

For automation this matters a lot: on a batch failure the client has to either bisect the batch or fall back to one-op-per-request to find the offender. We ended up building exactly that fallback for large firewall applies on VyOS 1.5 rolling.

Suggested doc addition on the /configure section: state the batch atomicity guarantee and the error format, and recommend a bisect/one-op fallback pattern. (If the API could return the failing op index/path in the error body, that would be even better — happy to move that part to a feature task if preferred.)

Details

Version
docs.vyos.io latest (observed on VyOS 1.5 rolling)
Is it a breaking change?
Perfectly compatible
Issue type
Documentation update