Feature #6794

Missing search parameter for template kinds

Added by Dominic Cleal over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Ori Rabin
Category:API
Target version:Sprint 27
Difficulty: Bugzilla link:1123868
Found in release: Pull request:https://github.com/theforeman/foreman/pull/1647
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1123868
Description of problem:
Missing search option for subscriptions. In the API documentation the search optional is also not mentioned.
Having a search option makes it easier to retrieve the correct version in a single query without parsing the complete JSON output.

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

How reproducible:

Steps to Reproduce:
1. curl -XGET --data-urlencode "search=name=provision" https://localhost/api/v2/template_kinds {
"total": 8,
"subtotal": 8,
"page": 1,
"per_page": 20,
"search": "name=provision",
"sort": {
"by": null,
"order": null
},
"results": [{"name":"PXELinux","id":1,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"PXEGrub","id":2,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"iPXE","id":3,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"provision","id":4,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"finish","id":5,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"script","id":6,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"user_data","id":7,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"ZTP","id":8,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"}]
}

2.
3.

Actual results:
Return only the provision item

Expected results:

Additional info:

Associated revisions

Revision 12bb385d
Added by Ori Rabin over 3 years ago

Fixes #6794: Adds search parameter for template kinds

History

#1 Updated by Dominic Cleal over 3 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from [RFE] Missing search option for template kinds to Missing search parameter for template kinds
  • Category set to API
  • Assigned To deleted (Bryan Kearney)

#2 Updated by Ohad Levy over 3 years ago

  • Target version set to Sprint 27

#3 Updated by Ohad Levy over 3 years ago

  • Assigned To set to Ori Rabin

#4 Updated by Ori Rabin over 3 years ago

  • Status changed from New to Assigned

#5 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1647 added

#6 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.6.0

#7 Updated by Ori Rabin over 3 years ago

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

Also available in: Atom PDF