Reputation: 1
I have been trying to extract the cell history from the Activity Log but due to some restrictions it threw up an error saying You do not have the permission to view the history. I am now planning to extract the same cell history with the help of Python, just need a clarity on where do I need to do that coding. in "Smartsheet" or "Python" with the API access. Kindly share your thoughts.
Thanks in advance
I tried to extract the cell history from the Activity Log in the smartsheet but it threw up an error saying "You have no persission to view the details"
Upvotes: -1
Views: 134
Reputation: 11
Yep, you can get a cell history object. You have to go cell by cell. See the documentation on Cell objects' list cell history method.
smartsheet_client = smartsheet.Smartsheet(SMARTSHEET_ACCESS_TOKEN)
cell_history_object = module_client.Cells.get_cell_history(
sheet_id=ssid, row_id=row_id, column_id=column_id, include_all=False
)
# As an example, if you want the last time the cell was modified:
last_modified = cell_history_object.data[0].modified_at
One thing to keep in mind--it's getting cell history is resource-intensive and the API weighs it more heavily than other types of requests. The smartsheet API rate limit is 300 requests per second per API token and one get_cell_history() request counts as 10 requests. See documentation on rate limiting.
Upvotes: 1
Reputation: 1
Smartsheet does provide any API that allows to programmatically interact with Smartsheet data, including cell history. But we can install some python libraries like 'requests ' for making HTTP requests to the Smartsheet API.
Upvotes: 0