Fix template so it generates valid JSON

The template didn't generate valid JSON; the list of API's had a trailing comma on the last API object and the keys weren't quoted so Uchiwa wouldn't start.

I've fixed those, and also added some sane defaults for the API parameters that aren't quoted strings as I suspect if they weren't present in the hash that would also generate invalid JSON.