Project

General

Profile

Actions

Bug #20574

closed

API call of GET /katello/api/host_collections says organization_id optional, but doesn't accept without organization id

Added by Anand Agrawal over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Description of problem: `organization_id` parameter is mentioned as optional for `host_collections` API. Without the `organization_id` parameter, API is unable to list all the host collections rather throws below error.

====================
curl -s -X GET -k -u admin:<password> 'https://fqdn/katello/api/v2/host_collections' {"displayMessage":"undefined method `id' for nil:NilClass","errors":["undefined method `id' for nil:NilClass"]}

====================

The desired output is obtained when the below command is used with `organization_id` parameter.

====================
  1. curl -s -X GET -k -u admin:<password> 'https://fqdn/api/v2/hosts?organization_id=<organization_id> ====================

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

How reproducible: Always

Steps to Reproduce:
1. # curl -s -X GET -k -u admin:<password> 'https://fqdn/katello/api/v2/host_collections'
2.
3.

Actual results:

====================
curl -s -X GET -k -u admin:<password> 'https://fqdn/katello/api/v2/host_collections' {"displayMessage":"undefined method `id' for nil:NilClass","errors":["undefined method `id' for nil:NilClass"]}

====================

Expected results: Should list all the host collections.


Related issues 2 (0 open2 closed)

Related to Katello - Bug #21150: host collection index now requires organization_idClosedAndrew Kofink09/28/2017Actions
Related to Katello - Bug #21435: hammer host-collection list requires organization parameter with host-id providedClosedAndrew Kofink10/23/2017Actions
Actions #1

Updated by Anand Agrawal over 6 years ago

  • Bugzilla link set to 1480508
Actions #2

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6905 added
Actions #3

Updated by Eric Helms over 6 years ago

  • translation missing: en.field_release set to 286
Actions #4

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Eric Helms over 6 years ago

  • translation missing: en.field_release changed from 286 to 295
Actions #6

Updated by Andrew Kofink over 6 years ago

  • Related to Bug #21150: host collection index now requires organization_id added
Actions #7

Updated by Andrew Kofink over 6 years ago

  • Related to Bug #21435: hammer host-collection list requires organization parameter with host-id provided added
Actions

Also available in: Atom PDF