How to publish a package and call GetAssetidsForPackage

I’m trying to publish a package and then programmatically get all the asset ids but I get 400 error. Apparently there is a bundleid I can use with GetBundleDetailsAsync, but I don’t know how to get the bundleid.

I’ve tried a number of things -
I followed the directions here… but no such option exists in roblox studio: https://en.help.roblox.com/hc/en-us/articles/203313910-How-to-Create-a-Package

I landed on this eventually - Packages | Documentation - Roblox Creator Hub and created a package but when I go right-click Copy ID in game explorer to clipboard and use that for GetAssetIdsForPackage, it still gives a 400 error. I also tried bundleDetails = game:GetService(‘AssetService’):GetBundleDetailsAsync

I tried AssetService | Documentation - Roblox Creator Hub and
https://catalog.roblox.com/docs#!/Bundle/get_v1_bundles_bundleId_details

but nothing seems right there, just canonical bundleids for my avatar are listed.

Question - is there a clear way to get the int64 asset id for the package I’ve uploaded so that I won’t get a 400 error?

This looks like wonderful technology and I can’t wait to use it.

You seem to have a misconception what the Package objects actually are. Did you fully read the wiki article?

When you’re uploading a “Package” you’re not uploading a bundle to ROBLOX, you’re uploading a model that has automatic updating.

This is why calling GetBundleDetailsAsync does not work.

Searching in the forums, the recommendation was to use the bundleid. eg:

But fair enough, perhaps that is some historical thing or perhaps it’s specific to some kind of not really a package bundle. I was grasping at straws, and the posting instructions ask me to list everything I tried.

Still, to be honest, I think my ‘misconception’ is a bit beside the point. Question really was how to get the int64 PackageAssetId and use this api:

Array GetAssetIdsForPackage ( int64 packageAssetId ) [yields] Returns an array of assetIds that are contained in a specified package.

If the answer simply is you can’t, that’s fine. I can take it :slight_smile: Someone might want to add a note in the docs though as it’s a bit confusing.

Packages and bundles are two different things. Packages in reference to character meshes is a legacy name which is now used for a set of reusable items. Bundles refers to character meshes now.

You are not able to publish a bundle to the website. BundleDetails is restricted for bundle ids (a separate id system) and GetAssetIdsForPackage is for older bundles that still have an id on the main catalog id system, though this function should not be used any longer (should be deprecated if it isn’t).

In a package itself, there is no way to get the assets inside a package without loading the whole thing into Studio, because you aren’t publishing those as assets, only the package.

Many thanks for the explanation. I was hoping there was a way to get the internal ids. From my reading it seemed like nested packages were possible. Eg:

When working with nested packages, for instance a packaged script inside a packaged model, note the following:

  • If you edit and publish a child (nested) package, the parent package will be marked as changed and you’ll need to re-publish it.

Ah, that’s what you were looking for. There is currently no way to get the related asset ids of nested packages at the moment. Packages are currently in beta and this may or may not end up being a feature. If it isn’t planned, you can always write a feature request for it provided significant use case for having access to this kind of a thing.

Thanks. I posted a bug report of how the API is confusing. I’ll see how that plays.