New commit detected on ManageIQ/manageiq-api/gaprindashvili: https://github.com/ManageIQ/manageiq-api/commit/5fd0240428e4774ac0d336d004bcf2f99edf71a6 commit 5fd0240428e4774ac0d336d004bcf2f99edf71a6 Author: Alberto Bellotti <abellotti.github.com> AuthorDate: Thu Nov 9 08:48:18 2017 -0500 Commit: Satoe Imaishi <simaishi> CommitDate: Tue Nov 14 17:40:45 2017 -0500 Merge pull request #179 from jntullo/bz/put_patch_on_edit Return put and patch edit actions for resources (cherry picked from commit 3931588e5ff27962116f854bd9a3ad5fc6c02e89) https://bugzilla.redhat.com/show_bug.cgi?id=1511545 app/controllers/api/base_controller/renderer.rb | 14 +++++++++++--- spec/requests/authentications_spec.rb | 13 ++++++++++--- spec/requests/custom_actions_spec.rb | 6 +++--- 3 files changed, 24 insertions(+), 9 deletions(-)
On 5.9.0.11 edit actions with put and patch are available only for some collections. For e.g. /api/providers it's not available, for /api/services it is available: GET /api/providers/:id { ... "actions": [ { "name": "edit", "method": "post", "href": "https://<addr>/api/providers/5" }, { "name": "refresh", "method": "post", "href": "https://<addr>/api/providers/5" }, { "name": "delete", "method": "post", "href": "https://<addr>/api/providers/5" }, { "name": "delete", "method": "delete", "href": "https://<addr>/api/providers/5" } ] }
Hi Martin-- If you look at the api.yml, you'll be able to see when put/patch should be listed. For example, for the providers endpoint, only post is specified (https://github.com/ManageIQ/manageiq-api/blob/master/config/api.yml#L1848) via *gpd. Therefore, put and patch are not supported at this time. On the other hand, for Services, all of the verbs are specified (https://github.com/ManageIQ/manageiq-api/blob/master/config/api.yml#L2586). Let me know if this provides clarity. Thanks! - Jillian
Thanks for explanation Jillian.