Return app.id in api stats

This allows for example easy linking to the errbit page for an app.