Keys or values from a GET should be usable in a POST.
@bryonadams I understand your point of view and the reasoning behind it. However, it’s not always an absolute rule that every field returned by a GET endpoint can be passed back to a POST (or PUT).
In this case, the API error message you received clearly indicates that these parameters are “excess properties not allowed”, meaning they cannot be used as input parameters.
Indeed, it also seems you’re not running the latest version of XO. Could you please check again? You should be getting the recent REST API updates:
https://github.com/vatesfr/xen-orchestra/pull/8798
We’re currently in the process of migrating from the old REST API to the new one, so for now Swagger remains the single source of truth. As @olivierlambert mentioned, we plan to provide direct access to it from XO-6, and we’ve been communicating about this in our blog posts.
MathieuRA opened this pull request in vatesfr/xen-orchestra
closed
feat(@vates/types): enhance createVm type
#8798