Search code examples
iosswiftapp-store-connecttestflightfastlane

How to find the Build Bundles ID with Appstore Connect APIs


Need to get the size of the build using appstore connect API call. Trying to find the what exactly is the ID mentioned here in the below endpoint.

https://developer.apple.com/documentation/appstoreconnectapi/list_all_file_sizes_for_a_build_bundle

GET https://api.appstoreconnect.apple.com/v1/buildBundles/{id}/buildBundleFileSizes

As per the documentation it is the opaque resource ID that uniquely identifies the Build Bundles resource.

Is there any fastlane action to achieve this?


Solution

  • I found the solution.

    first

    you need get the builds detail from https://developer.apple.com/documentation/appstoreconnectapi/list_builds

    and the most important is the parameters "include": "buildBundles"

    the you can find the response include buildBundleFileSizes links

    "buildBundleFileSizes": {
                    "links": {
                        "self": "https://api.appstoreconnect.apple.com/v1/buildBundles/{buildBundles id}/relationships/buildBundleFileSizes",
                        "related": "https://api.appstoreconnect.apple.com/v1/buildBundles/{buildBundles id}/buildBundleFileSizes"
                    }
                }
    

    then

    you can visit the links, get the binary size.