Foreman / katello api v2

The RESTful API for both foreman and katello is going to grow in importance
very quickly over the coming weeks. The foreman UI does not currently rely
on the API format, but the katello nutupane UI will use it exclusively to
provide the data for display. The "v2" version of katello's API is being
used to support this effort since the legacy command line interface uses
v1; is the v2 foreman API also at a point where its return format can be
adjusted, or is there tooling already relying on it that will also need
changes?

Below is the current format being returned by katello v2. It includes the
results (an array of objects), along with the paging and search
information. Is this format acceptable for foreman v2, or are there
adjustments that would be beneficial? The goal is to come up with a format
that foreman adopts that engines (such as katello) will also follow.

{
"total": 1,
"subtotal": 1,
"offset": "0",
"limit": null,
"search": null,
"sort": {
"by": "username",
"order": "ASC"
},
"results": [
{
"created_at": "2013-10-12T11:53:03Z",
"updated_at": "2013-10-13T15:54:25Z",
"id": 1,
"email": "thomasmckay@acme.com",
"username": "admin",
"disabled": false,
"default_environment": null
}
]
}

The discussion
here https://groups.google.com/d/msg/foreman-dev/8yX7aSuZRUY/0ib5GewE1Y0J
indicates that the nesting of results is already planned. Adding the other
information should be acceptable. I'll work with @josephmagen to get things
rolling.

ยทยทยท On Monday, October 14, 2013 11:38:09 PM UTC-4, Thomas McKay wrote: > > The RESTful API for both foreman and katello is going to grow in > importance very quickly over the coming weeks. The foreman UI does not > currently rely on the API format, but the katello nutupane UI will use it > exclusively to provide the data for display. The "v2" version of katello's > API is being used to support this effort since the legacy command line > interface uses v1; is the v2 foreman API also at a point where its return > format can be adjusted, or is there tooling already relying on it that will > also need changes? > > Below is the current format being returned by katello v2. It includes the > results (an array of objects), along with the paging and search > information. Is this format acceptable for foreman v2, or are there > adjustments that would be beneficial? The goal is to come up with a format > that foreman adopts that engines (such as katello) will also follow. > > > { > "total": 1, > "subtotal": 1, > "offset": "0", > "limit": null, > "search": null, > "sort": { > "by": "username", > "order": "ASC" > }, > "results": [ > { > "created_at": "2013-10-12T11:53:03Z", > "updated_at": "2013-10-13T15:54:25Z", > "id": 1, > "email": "thomasmckay@acme.com", > "username": "admin", > "disabled": false, > "default_environment": null > } > ] > } >