Bug 1649187 - Smart class parameter override values API has issue with PAGE param
Summary: Smart class parameter override values API has issue with PAGE param
Status: CLOSED DUPLICATE of bug 1385217
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Smart Variables
Version: 6.3.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
Depends On:
TreeView+ depends on / blocked
Reported: 2018-11-13 04:54 UTC by hprakash
Modified: 2022-03-13 16:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-12-24 11:54:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 13517 0 Normal Closed Searching for smart class parameter override values in the API results into a 404 2020-01-07 14:26:36 UTC

Description hprakash 2018-11-13 04:54:56 UTC
Description of problem:

Note: in the above URL, considering there are > 10 records in total. In this scenario if the value of PAGE is greater than 1 then it does not work. Log shows below error-

2018-11-06 07:23:23 e53c6589 [app] [I] Started GET "/api/v2/smart_class_parameters/1332/override_values?per_page=10&page=2" for at 2018-11-06 07:23:23 +0530
2018-11-06 07:23:23 e53c6589 [app] [I] Processing by Api::V2::OverrideValuesController#index as JSON
2018-11-06 07:23:23 e53c6589 [app] [I]   Parameters: {"per_page"=>"1", "page"=>"2", "apiv"=>"v2", "smart_class_parameter_id"=>"<smart-class-param-id>", "override_value"=>{}}
2018-11-06 07:23:23 e53c6589 [app] [I] Current user: admin (administrator)
2018-11-06 07:23:23 e53c6589 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-11-06 07:23:23 e53c6589 [app] [I] Filter chain halted as :return_if_smart_mismatch rendered or redirected
2018-11-06 07:23:23 e53c6589 [app] [I] Completed 404 Not Found in 78ms (Views: 0.4ms | ActiveRecord: 8.5ms)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
[root@satellite ~]# curl -k -u admin:<password> -X GET https://<satellite-fqdn>/api/v2/smart_class_parameters/<smart-class-param-id>/override_values?per_page=10&page=2
Actual results:
"Completed 404 Not Found" error

Expected results:
Respective page records should be fetched.

Additional info:

Comment 1 orabin 2018-11-13 19:08:39 UTC
How many smart class parameters do you have?

This sounds like: https://bugzilla.redhat.com/show_bug.cgi?id=1385217
The search is on the top level resource (smart class parameters) and not override values.

Comment 3 orabin 2018-12-24 11:54:31 UTC
The upstream issue connected is the same for: https://bugzilla.redhat.com/show_bug.cgi?id=1385217 so I'm closing this one as a duplicate.

*** This bug has been marked as a duplicate of bug 1385217 ***

Note You need to log in before you can comment on or make changes to this bug.