Skip to main content
Question

Java SDK slow meta data request

  • May 22, 2025
  • 2 replies
  • 10 views

Forum|alt.badge.img

When I request meta data for a file ID it takes 0.3 - 0.5 seconds to retrieve the meta data and enhance my object with file information with the meta data. If the search finds 50+ files it takes a while to get all data. Like this

 

 

for(BoxItem.Info info: searchResult) { 
  BoxFile boxFile = new BoxFile(api, info.getID()); 
  BoxFileMetadata boxFileMetadata = new BoxFileMetadata(); 

  Metadata metadata = boxFile.getMetadata(template, "enterprise");
  boxFileMetadata.metadata = metadata; 
  boxFileMetadata.itemInfo = info; 

  fileMetadataInfo.add(boxFileMetadata); 
} 

 

 

There is no meta data object in the search result (in the BoxItem.Info object). It would be nice if there was a method to get the file information (BoxItems) and meta data in one search request.

2 replies

Forum|alt.badge.img

Hi ,

 

Thanks for the suggestion. The main reason behind not embedding all information in the return object is due to response time and load being impacted when it may not always be needed for integrations. With that said, we are exploring methods for allowing folks to create more composite APIs to be able to bind multiple calls together, so I'll add this one to the list that we explore.

 

Thanks,

Jon 


Forum|alt.badge.img

Hello Jon,

 

Sorry for the late response.

I understand the choice to keep the response time short.

Thanks for exploring.

 

Kind regards,

 

Marcel