Actions
Bug #31311
closednot possible to update interfaces in POST /api/hosts/:host_id
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
Updated by Evgeni Golov almost 4 years ago
- Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Evgeni Golov
- Pull request https://github.com/theforeman/foreman/pull/8137 added
Updated by Evgeni Golov almost 4 years ago
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.
Updated by Evgeni Golov almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|a3f030f149fa75e36f8ef89c3c11b9c0b861269a.
Actions