Project

General

Profile

Actions

Bug #18779

open

API organization_id can only be numeric

Added by Daniel Lobato Garcia about 7 years ago. Updated over 5 years ago.

Status:
Ready For Testing
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In paths like 'api/v2/organizations/:organization_id/products', or 'api/v2/products?organization_id=:organization_id' when you try to use a name (e.g "ACMECORP") as the organization id, Foreman returns a 404.

However, the organization_id can be a name in most Foreman API paths and 'katello/api/v2/organizations/:organization_id'.

The problem is that the API controller is only searching by ID, but it should use the 'friendly' scope provided by 'friendly_id' to search by both name/label/id.

Actions #1

Updated by Daniel Lobato Garcia about 7 years ago

  • Assignee set to Daniel Lobato Garcia

I actually have a fix for this already so just let me submit the patch :)

Actions #2

Updated by The Foreman Bot about 7 years ago

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

Updated by The Foreman Bot about 7 years ago

  • Pull request https://github.com/Katello/katello/pull/6648 added
Actions #4

Updated by Stephen Benjamin about 7 years ago

  • Pull request deleted (https://github.com/Katello/katello/pull/6648)
Actions #5

Updated by Justin Sherrill about 7 years ago

  • translation missing: en.field_release set to 211
Actions #6

Updated by Justin Sherrill almost 7 years ago

  • translation missing: en.field_release changed from 211 to 114
Actions

Also available in: Atom PDF