def METHOD_NAME(
    self,
    ctx: rest.Context,
    serializer: Callable[[model.Base], rest.Response],
) -> rest.Response:
    query = ctx.get_param_as_string("query", default="")
    offset = ctx.get_param_as_int("offset", default=0, min=0)
    limit = ctx.get_param_as_int("limit", default=100, min=1, max=100)
    count, entities = self.execute(query, offset, limit)
    return {
        "query": query,
        "offset": offset,
        "limit": limit,
        "total": count,
        "results": list([serializer(entity) for entity in entities]),
    }