How to determine if it's an Asset or Bundle?

Hello,

I’m currently working with the following methods in AvatarEditorService:

  • AvatarEditorService:GetItemDetails(itemId, itemType)
  • AvatarEditorService:GetBatchItemDetails(table, itemType)

The issue I’m facing is that both of these methods require specifying the itemType (either Enum.AvatarItemType.Bundle or Enum.AvatarItemType.Asset). However, I don’t always know the item type in advance.

While I can use GetItemDetails to determine the item type, this adds an extra API request, which isn’t efficient. If I use SearchCatalog() and don’t know what assets will be returned, I’m forced to call the method twice—once for Asset and once for Bundle—to ensure I get all relevant data.

This becomes a problem when I’m hitting API rate limits. I understand the limit is 100 requests per second for AvatarEditorService, but after scrolling through a few pages of results, the items stop loading, and I have to wait before I can make additional calls.

My questions are:

  1. Is it possible to call GetBatchItemDetails or GetItemDetails without specifying the itemType ahead of time?
  2. Currently, I have to call the API twice to figure out whether an item is an asset or a bundle. It would be much more efficient if I could handle both types at once.
  3. It would be really helpful if there was a way to retrieve both asset and bundle details in a single batch request.

Any advice or insights on how to approach this would be greatly appreciated. Thanks!

2 Likes

Nice topic, I’d love also to know,

Hello,

I wasn’t able to get a direct answer as it isn’t possible to determine if it’s an asset or bundle due to the limitations of the API.

However, I’ve found that it is perfectly fine to use GetBatchItemDetails twice and that I haven’t been hitting the rate limit during my gameplay due to the use of GetBatchItemDetails.

I can specify up to 50 items per batch and it would count as one API call as far as I’m aware? I’ve been scrolling as fast as I could but was unable to hit the API limit, a good solution. Therefore, two calls, one for bundle, one for assets, and if one returns a nil, I’d know that it isn’t a bundle/asset.