Bug #28771
closedMissing taxonomy scoped routes for report templates
Description
Description of problem:
There are no taxonomy scoped routes for report templates in API. As a result, listing report templates in a taxonomy fails.
*How reproducible:*100%
Steps to Reproduce:
1.Create an organization
2.hammer report-template list --organization "org_name"
Actual results:
404 NOt Found
Expected results:
List of report templates
2020-01-16T02:31:49 [I|app|b96cde2e] Processing by Katello::Api::V2::OrganizationsController#index as JSON
2020-01-16T02:31:49 [I|app|b96cde2e] Parameters: {"search"=>"name = \"new_org\"", "per_page"=>"1000", "page"=>"1", "api_version"=>"v2", "organization"=>{}}
2020-01-16T02:31:49 [D|app|b96cde2e] Authenticated user admin against INTERNAL authentication source
2020-01-16T02:31:49 [I|app|b96cde2e] Authorized user admin(Admin User)
2020-01-16T02:31:49 [D|tax|b96cde2e] Current location set to none
2020-01-16T02:31:49 [D|tax|b96cde2e] Current organization set to none
2020-01-16T02:31:49 [D|tax|b96cde2e] Current location set to none
2020-01-16T02:31:49 [D|tax|b96cde2e] Current organization set to none
2020-01-16T02:31:49 [I|app|b96cde2e] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.14.0.1/app/views/katello/api/v2/organizations/index.json.rabl within api/v2/layouts/index_layout
2020-01-16T02:31:49 [I|app|b96cde2e] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.14.0.1/app/views/katello/api/v2/organizations/index.json.rabl within api/v2/layouts/index_layout (22.6ms)
2020-01-16T02:31:49 [D|app|b96cde2e] Body: {
"total": 2,
"subtotal": 1,
"page": 1,
"per_page": 1000,
"search": "name = \"new_org\"",
"sort": {
"by": null,
"order": null
},
"results": [{"label":"new_org","created_at":"2020-01-16 07:24:40 UTC","updated_at":"2020-01-16 07:24:40 UTC","id":3,"name":"new_org","title":"new_org","description":""}]
}
2020-01-16T02:31:49 [I|app|b96cde2e] Completed 200 OK in 198ms (Views: 37.4ms | ActiveRecord: 26.5ms)
2020-01-16T02:31:51 [I|app|1b8f5f81] Started GET "/api/organizations/3/report_templates?page=1&per_page=1000" for 2620:52:0:10d8:9657:a5ff:fec4:8293 at 2020-01-16 02:31:51 -0500
2020-01-16T02:31:51 [F|app|1b8f5f81]
2020-01-16T02:31:51 [F|app|1b8f5f81] ActionController::RoutingError (No route matches [GET] "/api/organizations/3/report_templates"):
2020-01-16T02:31:51 [F|app|1b8f5f81]
2020-01-16T02:31:51 [F|app|1b8f5f81] lib/foreman/middleware/logging_context_request.rb:11:in `call'
katello (3.14.0.1) lib/katello/prevent_json_parsing.rb:12:in `call'
Updated by Ondřej Pražák over 6 years ago
- Subject changed from Missing taxonomy scoped routes for report templates to Missing taxonomy scoped routes for report templates
- Category changed from Statistics to API
Updated by Amit Upadhye over 5 years ago
- Has duplicate Bug #28987: Reporting Engine API to list report template per organization/location returns 404 error added
Updated by Amit Upadhye over 5 years ago
- Status changed from New to Closed
Ondřej Pražák wrote:
Description of problem:
There are no taxonomy scoped routes for report templates in API. As a result, listing report templates in a taxonomy fails.*How reproducible:*100%
Steps to Reproduce:
1.Create an organization
2.hammer report-template list --organization "org_name"Actual results:
404 NOt FoundExpected results:
List of report templates[...]
Closing this issue as it has been fixed in https://projects.theforeman.org/issues/28987