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

@web.expose_api
def index(self, trans, **kwd):

    rval = []
    for request_type in trans.app.security_agent.get_accessible_request_types(trans, trans.user):
        item = request_type.to_dict(value_mapper={'id': trans.security.encode_id, 'request_form_id': trans.security.encode_id, 'sample_form_id': trans.security.encode_id})
        encoded_id = trans.security.encode_id(request_type.id)
        item['url'] = url_for('request_type', id=encoded_id)
        rval.append(item)
    return rval
