Description of problem: We found inconsistency in API during automating cfme customisation. API call for create expect slightly different input format ten edit call. We made a patch which accept same content as create call. Pull request is here: https://github.com/ManageIQ/manageiq/pull/16747 Version-Release number of selected component (if applicable): 5.8.2.3 How reproducible: HTTP POST to https://CMFE_IP/api/service_dialogs/55000000000002 for create working fine: { "action" : "create", "resource" : { "label" : "updated_label", "dialog_tabs" : [ "id" : 11, "label" : "updated_tab_label", "dialogs_groups" : [ { "id" : 31, "dialog_fields" : [ { "id" : 41 } ] } ] ] } } But for edit same thing with action: edit failing. There is necessary to add '"content" : {' before dialog_tabs. { "action" : "edit", "resource" : { "label" : "updated_label", "content" : { "dialog_tabs" : [ "id" : 11, "label" : "updated_tab_label", "dialogs_groups" : [ { "id" : 31, "dialog_fields" : [ { "id" : 41 } ] } ] ] } } } Steps to Reproduce: 1. HTTP POST to https://CMFE_IP/api/service_dialogs/55000000000002 { "action" : "create", "resource" : { "label" : "updated_label", "dialog_tabs" : [ "id" : 11, "label" : "updated_tab_label", "dialogs_groups" : [ { "id" : 31, "dialog_fields" : [ { "id" : 41 } ] } ] ] } } 2.HTTP POST to https://CMFE_IP/api/service_dialogs/55000000000002 { "action" : "edit", "resource" : { "label" : "updated_label", "dialog_tabs" : [ "id" : 11, "label" : "updated_tab_label", "dialogs_groups" : [ { "id" : 31, "dialog_fields" : [ { "id" : 41 } ] } ] ] } } Actual results: { "error": { "kind": "bad_request", "message": "Failed to update service dialog - DialogTab(#72444840) expected, got Hash(#15946100)", "klass": "Api::BadRequestError" } } Expected results: { "href": "https://CFME_IP/api/service_dialogs/55000000000002", "id": 55000000000002, "description": "", "buttons": "submit,cancel", "label": "updated_label", "created_at": "2017-10-26T22:57:12Z", "updated_at": "2018-01-03T15:07:40Z" } Additional info:
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low.
It's medium severity. It's non critical, but it really complicates api usage for unified administration via api.
Increasing priority since there is a PR already, which dev took and re-worked to PR https://github.com/ManageIQ/manageiq-api/pull/285 . Looks like this is going to miss 5.8.3 but could certainly go for 5.9.1 & 5.8.4.
Verified in Version 5.10.0.23.20181106165157_92dd189