Feature #32650
Add 'resource_type' for the role filter in API
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.
~~~~- 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.
Associated revisions
History
#1
Updated by The Foreman Bot 12 months ago
- Assignee set to Ondřej Ezr
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8553 added
#2
Updated by The Foreman Bot 11 months ago
- Fixed in Releases 3.0.0 added
#3
Updated by The Foreman Bot 11 months ago
- Fixed in Releases deleted (
3.0.0)
#4
Updated by Ondřej Ezr 11 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|85ef206e141cd27e08b7ceb9c085d899d1fe039c.
#5
Updated by Amit Upadhye 10 months ago
- Target version set to 3.0.0
- Subject changed from Add 'resource_type' for the role filter in API to Add 'resource_type' for the role filter in API
- Fixed in Releases 3.0.0 added
#6
Updated by Amit Upadhye 10 months ago
- Category set to API
Fixes #32650 - add resource_type to filter base
In API roles/<id> detail there is only list of filter ids, that is not
very useful to user, we should add at least resource type for the user
to at least get the basic idea.