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 about 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

Also available in: Atom PDF