Project

General

Profile

Actions

Feature #32650

closed

Add 'resource_type' for the role filter in API

Added by Ondřej Ezr over 3 years ago. Updated over 3 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1957070

Description of problem:

Currently API result for role filter only returns ID. as a FutureFeature, can we add "Name" field along with the ID.

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

How reproducible:
100%

Description:

Currently the roles API only returns the filter ID.

~~~~
  1. curl -vvv -H 'Content-Type: application/json' -X GET https://user:password@foreman.example.com/api/roles/11

{"builtin":0,"cloned_from_id":28,"name":"Group Admin","id":10,"description":"","origin":null,"filters":[{"id":142},{"id":150},{"id":111},{"id":151},{"id":154},{"id":155},{"id":156},{"id":157},{"id":158},{"id":159},{"id":160},{"id":161},{"id":162},{"id":161},{"id":164},{"id":165},{"id":166},{"id":167},{"id":168},{"id":169},{"id":170},{"id":171},{"id":172},{"id":171},{"id":541},{"id":544}],"locations":[{"id":8,"name":"city","title":"Brisbane/City ","description":""}],"organizations":[{"id":1,"name":"abcd","title":"abcd","description":""}]}
~~~~

The filters property within the role resource is expected to be represented in the same structure as locations and organizations.

The id only is not very useful.

Actions #1

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ondřej Ezr
  • Pull request https://github.com/theforeman/foreman/pull/8553 added
Actions #2

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases 3.0.0 added
Actions #3

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases deleted (3.0.0)
Actions #4

Updated by Ondřej Ezr over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Amit Upadhye over 3 years ago

  • Subject changed from Add 'resource_type' for the role filter in API to Add 'resource_type' for the role filter in API
  • Target version set to 3.0.0
  • Fixed in Releases 3.0.0 added
Actions #6

Updated by Amit Upadhye over 3 years ago

  • Category set to API
Actions

Also available in: Atom PDF