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

Event Timeline

Verification update: the current rolling API guide documents the batched /configure failure semantics: failed operations do not commit changes for that component, cross-component partial commits are possible, and errors identify the component and missing information or conflict. See https://github.com/vyos/vyos-documentation/blob/rolling/docs/automation/vyos-api.md#configure. The documentation was added in https://github.com/vyos/vyos-documentation/commit/f002549a5fe3ae782be8fe02160fa2796e7e0471 and its atomicity/error wording was refined in https://github.com/vyos/vyos-documentation/commit/4631db6a1578550dd4c1410a8416575899f36936. This appears to address the task's core documentation gap. The current guide does not promise an exact failing-operation index/path or recommend bisecting a failed batch; if that remains part of the requested scope, T9091 may need to stay open or that API behavior could be tracked separately. Suggested status: Resolved if the reporter/maintainer agrees the documentation meets scope; otherwise keep open for the remaining error-location guidance.