We are using the BOX API with a service ID to connect and fetch files from BOX.
The connection is working successfully, and able to fetch filenames and metadata with IDs. But although the API connection is still successful, no files are being fetched from the search query even though the data is available in BOX.
Could you please help us diagnose the issue and let us know if there are any API limitations, token/session expiry issues, rate limits, scheduled maintenance activities, or permission-related concerns that could be causing this behaviour?
long offsetValue = 0;
long limitValue = 2000000;
BoxSearch boxSearch = new BoxSearch(api);
BoxSearchParameters searchParams = new BoxSearchParameters();
searchParams.setQuery("*");
List<String> folderIds = new ArrayList<>();
folderIds.add(folderId);
searchParams.setAncestorFolderIds(folderIds);
do {
searchResults = boxSearch.searchRange(offsetValue, limitValue, searchParams);
for (BoxItem.Info itemInfo : searchResults) {
System.out.println(itemInfo.getName()
}
} while (searchResults.size() % 200 == 0 && searchResults.size() != 0);