Project

General

Profile

Actions

Bug #2774

closed

Retriving puppet by ID error

Added by Tal Kammer over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Actions #1

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.

Actions #2

Updated by Dominic Cleal over 11 years ago

  • Status changed from Assigned to Feedback
Actions #3

Updated by Joseph Magen over 11 years ago

  • Status changed from Feedback to Closed

answered on foreman-users mailing list

Actions

Also available in: Atom PDF