Update rest.py

Rewritten Rest module. Added support for Jobscheduler.