'GET /api/quotas
GET /api/quotas/deleted
Displays a collection (list) of quotas.'

@web.expose_api
@web.require_admin
def index(self, trans, deleted='False', **kwd):

    rval = []
    deleted = util.string_as_bool(deleted)
    query = trans.sa_session.query(trans.app.model.Quota)
    if deleted:
        route = 'deleted_quota'
        query = query.filter((trans.app.model.Quota.table.c.deleted == true()))
    else:
        route = 'quota'
        query = query.filter((trans.app.model.Quota.table.c.deleted == false()))
    for quota in query:
        item = quota.to_dict(value_mapper={'id': trans.security.encode_id})
        encoded_id = trans.security.encode_id(quota.id)
        item['url'] = url_for(route, id=encoded_id)
        rval.append(item)
    return rval
