Bug #2774
closedRetriving puppet by ID error
Description
When trying to run:
curl -s -H "Accept:application/json" -k -u $USER:$PASS --get https://$HOST/api/puppetclasses/10
where 10 is the ID number of one of the puppet classes, I'm getting an error:
{"error":{"message":"Missing template api/v1/puppetclasses/show, api/v1/base/show, api/base/show with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder, :rabl]}. Searched in:\n * \"/usr/share/foreman/app/views\"\n * \"/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.0.18/app/views\"\n"}}
Tal
Updated by Joseph Magen over 11 years ago
- Category set to API
- Status changed from New to Assigned
- Assignee set to Joseph Magen
There is no :show action in v1/puppetclasses_controller which is why you are getting the missing template error.
The functionality that you are looking for does exist in v2. Just pass version=2 in the header like this
curl -s -H "Accept:application/json,version=2" -k -u $USER:$PASS --get https://$HOST/api/puppetclasses/10
Please confirm and then I'll close this issue.
Updated by Dominic Cleal over 11 years ago
- Status changed from Assigned to Feedback
Updated by Joseph Magen over 11 years ago
- Status changed from Feedback to Closed
answered on foreman-users mailing list