Project

General

Profile

Actions

Bug #9115

open

Inconsistent format of results of GET /api/puppetclasses

Added by Martin Bacovsky over 9 years ago. Updated over 9 years ago.

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

Description

In API the list of puppet classes returns results in format that is inconsistent with the rest of the API.

     "results" => {
        "apache" => [
            [ 0] {
                        "id" => 8,
                      "name" => "apache",
                "created_at" => "2014-10-08T11:39:06Z",
                "updated_at" => "2014-10-08T11:39:06Z" 
            },
            [ 1] {
                        "id" => 69,
                      "name" => "apache::confd::no_accf",
                "created_at" => "2014-10-08T11:39:07Z",
                "updated_at" => "2014-10-08T11:39:07Z" 
            },

The individual classes are nested under the module name, which makes automation dificult. I'm not sure what is the background for this deviation from usual format, but it seems that adding module name as an attribute of the class would do the job.

Actions #1

Updated by Ohad Levy over 9 years ago

yes this is known, I think we can only fix it in api v3.

Actions

Also available in: Atom PDF