API calls succeed but data requires manual File > Save to persist
- API returns HTTP 200 SUCCESS
- Activity log shows "Rows Inserted"
- No data appears in sheet until manual File > Save. Data can be manually added (by a human) to the same sheet, but the data is not persistent until after File > Save. Browser correctly warns that leaving the page will lose the data. Activity log does not show any activity (add/update/delete) until after this manual File > Save
- No auto-save preferences available in workspace.
Best Answer
-
The exact nature of this problem has been challenging to trace. The Access 200 error turned into Access 401 at some point. By adding the token and sheet ID directly to the file that calls the "add row" endpoint, I was able to get data into and saved in my Smartsheet.
Why the access changed and how to solve it (securely) is a challenge for a new day. Thanks for the conversation.
Answers
-
Additional information: We have also tried the "ROWS" api endpoint (instead of CELLS) with the same results.
I've not added the Sheet ID or token for security reasons in this post. I have also summited a ticket to Support. -
if the response is 200 and the log shows the rows were inserted, you only need to refresh the page if you want to see the changes, or wait for a refresh cycle happens, you shouldn't need to save anything in the menu, not even the session is the same from API. Any update done correctly in the API is final and need no save as long as you get the 200.
try just refreshing the page.
No worries about the browser message of losing data, that happens even when you search, it should not be related.
-
When I refresh the page, nothing appears.
-
@KMallette then most likely nothing is getting inserted, try to debug the content of what are you trying to insert, maybe the rows are empty, if you have a debugger, evaluate the rows before the post and check each cell value, verify the column IDs are correct.
-
The exact nature of this problem has been challenging to trace. The Access 200 error turned into Access 401 at some point. By adding the token and sheet ID directly to the file that calls the "add row" endpoint, I was able to get data into and saved in my Smartsheet.
Why the access changed and how to solve it (securely) is a challenge for a new day. Thanks for the conversation. -
This has been a bugger of a problem to trace as there are actually 3 files involved. Somewhere along the line the Access 200 response turned into a 401 response. By adding the token and sheet ID directly to the smartsheet_integration.php file, I was able to get content into the file. Auto-save did correctly save the new data.
What made access turn from 200 to 401 is not known at this time. That's an issue for a different day.
Thanks for the conversation.