Project

General

Profile

Actions

Bug #849

closed

data structure from api puppetclasses call is too complex

Added by Corey Osman about 13 years ago. Updated about 13 years ago.

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

Description

I am not sure why the json code returned from http://foreman/hosts/fqdn/puppetclasses has to be so complex. Is it possible to just return something like the following

{"puppetclasses":[{"name":"puppet","id":13},{"name":"newops_default","id":7},{"name":"helloworld","id":1},{"name":"baseapps","id":4}]}

This following seems to make more sense as it contains less overhead.

Here is what the api returns as of now:


{"puppet":[{"puppetclass":{"name":"puppet","id":13}}],"newops_default":[{"puppetclass":{"name":"newops_default","id":7}}],"helloworld":[{"puppetclass":{"name":"helloworld","id":1}}],"baseapps":[{"puppetclass":{"name":"baseapps","id":4}}],"oraclebase":[{"puppetclass":{"name":"oraclebase","id":10}}]}

I just don't see the need to have a hash where the value is an array that contains a hash where the value is a hash with key/value pairs.

Actions

Also available in: Atom PDF