Hide Forgot
Description of problem: In katello, we provide the user with a list of errata filters that they may select to see the errata in a given category. The filters supported include All, Critical, Important, Moderate, Low, Security, Bug Fix and Enhancement. During a UI review, it was requested that we provide a count next to each filter to indicate the number of errata that would be displayed by that filter. With the current Pulp APIs, the way to retrieve the count would be to retrieve the actual errata based on a filter and show only the count. While that would work, it will not be efficient, because at this particular point, the user is only seeing the various filters that are available and not errata itself. While the initial issue was raised for Errata, it appears that the same issue could apply for other areas of the Pulp API as well (e.g. packages) This bugzilla is to request an enhancement to the Pulp API to enable users to more efficiently retrieve counts for data such as the above.
Is this still an issue?
Unfortunately, I am not sure if this is still an issue or not. I haven't come across anything in the API docs (https://pulp-dev-guide.readthedocs.org/en/pulp-2.2/integration/rest-api/index.html) that indicate that it is possible to retrieve counts for a unit (e.g. errata, packages, package groups) for one or more repositories. Are you aware of any? For Katello this was important because we needed to be able to provide the user with summary information, without actually retrieving all of the data. In order to address that, the content has since been indexed in to elasticsearch so that it can be efficiently retrieved. So, for now, this is not an issue for Katello; however, other users might find it useful to retrieve that type information.
This data appears to be returned now, as of pulp 2.4.x: curl -k https://admin:admin@localhost/pulp/api/v2/repositories/ | python -mjson.tool result: <snip> { "_href": "/pulp/api/v2/repositories/f19/", "_id": { "$oid": "5462b900d1a0f5027cc3e52b" }, "_ns": "repos", "content_unit_counts": { "distribution": 1, "package_category": 12, "package_environment": 12, "package_group": 100, "rpm": 3949 }, "description": null, "display_name": "f19", "id": "f19", "notes": { "_repo-type": "rpm-repo" } } <snip> I think at this point, this BZ is the same as docs bug #1004623. Marking as closed/duplicate. *** This bug has been marked as a duplicate of bug 1004623 ***