a REST server helper script