{"action":"created","issue":{"url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/360","repository_url":"https://api.github.com/repos/redhat-imaging/imagefactory","labels_url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/360/comments","events_url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/360/events","html_url":"https://github.com/redhat-imaging/imagefactory/issues/360","id":115364219,"number":360,"title":"raw image download endpoint in REST api does not work","user":{"login":"tflink","id":605355,"avatar_url":"https://avatars.githubusercontent.com/u/605355?v=3","gravatar_id":"","url":"https://api.github.com/users/tflink","html_url":"https://github.com/tflink","followers_url":"https://api.github.com/users/tflink/followers","following_url":"https://api.github.com/users/tflink/following{/other_user}","gists_url":"https://api.github.com/users/tflink/gists{/gist_id}","starred_url":"https://api.github.com/users/tflink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tflink/subscriptions","organizations_url":"https://api.github.com/users/tflink/orgs","repos_url":"https://api.github.com/users/tflink/repos","events_url":"https://api.github.com/users/tflink/events{/privacy}","received_events_url":"https://api.github.com/users/tflink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T20:11:23Z","updated_at":"2016-02-18T01:35:14Z","closed_at":"2016-02-18T01:35:14Z","body":"Attempting to download a raw image through the REST api using a GET request to the `/imagefactory/base_image/<image_id>/raw_image` endpoint results in an HTTP 500 and the following error in imagefactoryd.log:\r\n\r\n```\r\n2015-11-05 14:45:31,255 ERROR imgfac.rest.RESTv2 thread(worker 5) Message: 'raw_image'\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/site-packages/imgfac/rest/RESTv2.py\", line 65, in list_images\r\n    _type = IMAGE_TYPES[image_collection]\r\nKeyError: 'raw_image'\r\n```\r\n\r\nIt appears as if the request isn't being routed to the desired raw_image handler (`imgfac.rest.RESTv2.get_image_file`) but to the image listing handler (`imgfac.rest.RESTv2.list_images`) using the `/imagefactory/base_images/<base_image_id>/<image_collection>` route.\r\n\r\nEither fix the bottle setup so that the `base_image/<image_id>/raw_image` endpoint works or create a new endpoint which does not collide with `list_images()`"},"comment":{"url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/comments/185498885","html_url":"https://github.com/redhat-imaging/imagefactory/issues/360#issuecomment-185498885","issue_url":"https://api.github.com/repos/redhat-imaging/imagefactory/issues/360","id":185498885,"user":{"login":"imcleod","id":488536,"avatar_url":"https://avatars.githubusercontent.com/u/488536?v=3","gravatar_id":"","url":"https://api.github.com/users/imcleod","html_url":"https://github.com/imcleod","followers_url":"https://api.github.com/users/imcleod/followers","following_url":"https://api.github.com/users/imcleod/following{/other_user}","gists_url":"https://api.github.com/users/imcleod/gists{/gist_id}","starred_url":"https://api.github.com/users/imcleod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imcleod/subscriptions","organizations_url":"https://api.github.com/users/imcleod/orgs","repos_url":"https://api.github.com/users/imcleod/repos","events_url":"https://api.github.com/users/imcleod/events{/privacy}","received_events_url":"https://api.github.com/users/imcleod/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T01:35:14Z","updated_at":"2016-02-18T01:35:14Z","body":"Fix merged: https://github.com/redhat-imaging/imagefactory/commit/d9a7fbfb28f89f33a5367c9426873b725d1b9ad4\r\n\r\nMany thanks!"}}