rest script