When connecting to the report rows endpoint, I am receiving an error when using the timeframe as shown in the API documentation.
"time_frame":{ "from": "2022-01-01",
"to":"2022-12-31"}
Error message received:
{'message': 'to is not a valid time_frame'}
The API works without error when using one of the canned strings such as:
this_week
this_month
this_quarter
this_year
last_week
last_month
last_quarter
last_year
next_30
next_60
next_90
last_30
last_60
last_90
last_and_next_90
I'm using Python and the request package here is the basic code:
response = requests.post('https://api.rm.smartsheet.com/api/v1/reports/rows',
headers={
"Content-Type": "application/json",
"auth":token,
}, params={
"view":'time_fees_hours',
"time_frame":{
"from": "2022-01-01",
"to":"2022-12-31"}
})
print(response.json())
Any help is greatly appreciated.
Cheers!