# Download bundle script ### Arguments: #### chain-id Chain ID of the bundle to download. ``` kyve-1 => https://api.kyve.network/ kaon-1 => https://api.kaon.kyve.network/ korellia-2 => https://api.korellia.kyve.network/ ``` #### pool-id Pool ID of the bundle to download. E.g. `1` for Osmosis #### bundle-id Bundle ID of the bundle to download. E.g. `0` for the first bundle ### Downloading process 1. Request bundle endpoint to get `storage_id` a) Mapping of chain-id to URL 2. Extract `storage_id` of the retrieved object 3. Use logic from older script to download bundle from storage provider # Examples ## Query endoint ``` # Request URL (e.g. https://api.kyve.network/kyve/v1/bundles/1/63186) def query_endpoint(endpoint): try: response = requests.get(endpoint) return response except requests.exceptions.RequestException as e: print(f"Failed to query {endpoint}: {e}") return None # Get storage_id from object def get_storage_id_from_bundle_response(response): return response.json().get("storage_id") ```