rest: allow timespans to be integers

Change-Id: Iae47ec7e1d9166eaaf8182ca11ec6c293e2e234f
Merge "rest: allow timespans to be integers"