Bug #31311
closed
not possible to update interfaces in POST /api/hosts/:host_id
Added by Evgeni Golov about 4 years ago.
Updated about 4 years ago.
Description
Ohai,
PUT /api/hosts/:host_id
allows to provide
interface_attributes
, but
id
is not one of the accepted attributes, so it's not possible to update an existing interface using that API (validation fails if one tries, "duplicate identifier"). The same works fine using the dedicated
/api/interfaces/:host_id
endpoint
Related issues
1 (1 open — 0 closed)
- Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added
- Status changed from New to Ready For Testing
- Assignee set to Evgeni Golov
- Pull request https://github.com/theforeman/foreman/pull/8137 added
As my description seems to be not top notch:
- The API accepts the `id` parameter if it's sent, and then the interface is updated properly
- The API rejects PUTs without `id` which try to refer to an existing interface
- API clients that validate their requests against the apidoc before sending it, will drop the `id` param.
- Fixed in Releases 2.4.0 added
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF