Description of problem: /apidoc details method to return a list of all repositories within an environment: GET /katello/api/organizations/:organization_id/environments/:id/repositories When trying to use this call a page not found error is displayed (organization_id:1 id:1 https://sat62.example.org/katello/api/organizations/1/environments/1/repositories Leaving 'repositories' off the end returns the SUMMARY of the environment: https://sat62.example.org/katello/api/organizations/1/environments/1 { "library": true, "id": 1, "name": "Library", "label": "Library", "description": null, "organization": { "name": "Default Organization", "label": "Default Organization", "id": 1 }, "created_at": "2016-05-02 05:25:32 UTC", "updated_at": "2016-05-02 05:25:32 UTC", "prior": null, "successor": null, "counts": { "content_hosts": 0, "content_views": 0, "packages": 94200, "puppet_modules": 4235, "errata": { "security": 2667, "bugfix": 7582, "enhancement": 2674, "total": 15737 }, "yum_repositories": 38, "docker_repositories": 0, "ostree_repositories": 1, "products": 16 }, "permissions": { "view_lifecycle_environments": true, "edit_lifecycle_environments": true, "destroy_lifecycle_environments": false, "promote_or_remove_content_views_to_environments": true } } Tried /yum_repositories with same result (404 error). Need to be able to list the repos in an environment as per the docs.
Connecting redmine issue http://projects.theforeman.org/issues/15159 from this bug
VERIFIED. @satellite-6.3.0-16.0.beta.el7sat.noarch foreman-1.15.3-2.el7sat.noarch katello-3.4.4-2.el7sat.noarch # curl -sku admin:changeme https://SAT/katello/api/organizations/1/environments/1/repositories | jq . { "total": 8, "subtotal": 8, "page": 1, "per_page": 20, "error": null, "search": null, "sort": { "by": null, "order": null }, "results": [ { "content_type": "yum", "url": "http://SERVER/pulp/repos/Sat6-CI/QA/Capsule_6_3_RHEL7/custom/Satellite_Capsule_6_3_Composes/Satellite_Capsule_6_3_RHEL7/", "relative_path": "Default_Organization/Library/custom/Internal_RHEL7/Capsule_6_3_RHEL7_x86_64", "backend_identifier": "aa6f9796-8436-477a-a5bd-d180eb912388", "id": 2, "name": "Capsule 6.3 RHEL7 x86_64", "label": "Capsule_6_3_RHEL7_x86_64", "product": { "id": 1, "cp_id": "873853518190", "name": "Internal_RHEL7", "sync_plan": [ "name", "description", "sync_date", "interval", "next_sync" ] }, "last_sync": { "id": "21b855a5-0336-432e-bd3d-0090c3a79477", "username": "admin", "started_at": "2017-08-29 11:43:31 UTC", "ended_at": "2017-08-29 11:43:43 UTC", "state": "stopped", "result": "success", "progress": 1 }, "content_counts": { "ostree_branch": 0, "docker_manifest": 0, "docker_tag": 0, "rpm": 186, "package": 186, "package_group": 1, "erratum": 0, "puppet_module": 0, "file": 0 }, "last_sync_words": "1 day" }, ... >>> the api call no longer returns 404
For 6.2.z users, notice you can call the API at 'katello/api/v2/repositories?environment_id=6&organization_id=32' (substitute by the right numbers) and get the results you expected at /api/orgnaizations/:organization_id/environments/:id/repositories All the bugfix is doing is redirect one API call to the other, so they're equivalent.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > > > For information on the advisory, and where to find the updated files, follow the link below. > > > > If the solution does not work for you, open a new bug report. > > > > https://access.redhat.com/errata/RHSA-2018:0336