API - delayed search results - List Sheets vs Search Everything


I am using the /search endpoint (Search Everything, scopes=sheetNames) to search for new sheets that have been created by Smartsheet Control Center. I have read the post regarding /search/sheets/{sheetId} endpoint, Search API Request Returning Old Data for A Period of Time and the answer by @Genevieve P. that "Search function can require up to ten minutes before being able to identify newly added and updated data".

I have a few questions (looking for answers) and observations (awaiting comments / confirmation of behavior):

1) [Observation] When I create a new sheet and follow it up immediately by an API call to /search endpoint with scopes=sheetNames, the endpoint does not return the name of the newly created sheet. I keep on repeating the API call and finally I get returned the sheet after some undefined time. Reading the documentation for Search Everything endpoint, it merely says, "If you have not used the public API in a while, we will need to provision your data. This could take up to 24 hours so please check back later!". It does not mention that if the public API is being exercised constantly, the results could still be delayed. Can the people with product knowledge shed some light on this please?

2) [Observation] When I modify a sheet and follow it up immediately by an API call to List Sheets endpoint, the modifiedAt property of the sheet does not get updated immediately either. Again, the endpoint documentation does not mention anything of this sort. Is this an undocumented / expected behavior ?

3) [Question] If I create a sheet and immediately follow it up with an API call to List Sheets endpoint, will I definitely get the new sheet in the result?




  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @akhalid

    You are correct that there is a delay between an update/addition of a sheet and the indexing that happens via search (in the UI and/or the API).

    1) Yes, the results will likely be delayed. I would try Search ~2 minutes later for full results. My 10 minute suggestion should be more than enough time to ensure the correct result if there are intermittently longer delays, however 2-5 minutes is closer to the actual time I would expect.

    2) Yes, this is expected: the Modified date/time for the sheet can be delayed if you're making calls immediately one after the other. Again, I would suggest using List Sheets ~2 minutes later instead of immediately, if possible. You can see this in the UI as well: after making an edit to a sheet, it can take up to 10 minutes for the Modified Date in the search window to update to the new date/time.

    3) I don't have a definite answer for you on this one, however in my own personal tests, yes, List Sheets included newly created sheets that were immediately created right before hand.

    I hope this helps!