Bug #30908

Content View Filter Rule controller does not support the same parameters for CREATE and UPDATE

Added by Evgeni Golov over 1 year ago. Updated over 1 year ago.

Content Views
Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:



looking at app/controllers/katello/api/v2/content_view_filter_rules_controller.rb, I see the following difference between POST /content_view_filters/:content_view_filter_id/rules and PUT /content_view_filters/:content_view_filter_id/rules/:id

@@ -75,15 +75,19 @@ module Katello
         N_("Update a filter rule. The parameters included should be based upon the filter type.")
     param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true
     param :id, :number, :desc => N_("rule identifier"), :required => true
-    param :name, String, :desc => N_("package, package group, or docker tag: name")
+    param :name, Array, of: [String], :desc => N_("package, package group, or docker tag names")
+    param :uuid, String, :desc => N_("package group: uuid")
     param :version, String, :desc => N_("package: version")
     param :architecture, String, :desc => N_("package: architecture")
     param :min_version, String, :desc => N_("package: minimum version")
     param :max_version, String, :desc => N_("package: maximum version")
     param :errata_id, String, :desc => N_("erratum: id")
+    param :errata_ids, Array, :desc => N_("erratum: IDs or a select all object")
     param :start_date, String, :desc => N_("erratum: start date (YYYY-MM-DD)")
     param :end_date, String, :desc => N_("erratum: end date (YYYY-MM-DD)")
     param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
+    param :date_type, String, :desc => N_("erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'")
+    param :module_stream_ids, Array, :desc => N_("module stream ids")
     def update
       update_params = rule_params
       update_params[:name] = update_params[:name].first if update_params[:name]

The diff is from todays master (3.18.0), but similar differences can be found in older releases (e.g. 3.12, which I accidentally happen to have at hand).

The discrepancy breaks API clients like foreman-ansible-modules which take the APIdoc as the source of truth what the server accepts.

I have no idea what implications the Array[String] vs String for name have, btw…

Related issues

Related to Foreman - Tracker #27680: API bugs that need workarounds in foreman-ansible-modulesNew


#1 Updated by Evgeni Golov over 1 year ago

  • Category changed from Backup & Restore to API

#2 Updated by Evgeni Golov over 1 year ago

  • Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added

#3 Updated by John Mitsch over 1 year ago

  • Status changed from New to Need more information

Thanks Evgeni,

Was this a breakage or has this behavior been present for a while?

#4 Updated by Evgeni Golov over 1 year ago

  • Status changed from Need more information to New

as far as I've seen, the level of difference differs (lol), but it's been out of sync for a while now.

#5 Updated by Evgeni Golov over 1 year ago

at least back to 3.15, didn't look further

#6 Updated by Jonathon Turel over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello Backlog
  • Category changed from API to Content Views

Also available in: Atom PDF