@cbak If you're using python you can use this script here. It's best to obtain the chunk count and then iterate on it. That makes it dynamic rather than hardcoding it. # This script downloads a file in chunks. It will write all chunks to a newly # created local file with the same name as the file. import requests import base64 import sys import json from getAuthentication import userBA from getGUIDs import wGuid, mGuid, fileID, fileName url = ( f 'https://api.anaplan.com/1/3/workspaces/ { wGuid } /models/ { mGuid } /' + f 'files/ { fileID } /chunks' ) getHeaders = { 'Authorization' : userBA } downloadHeaders = { 'Authorization' : userBA, 'Accept' : 'application/octet-stream' } getChunkData = requests.get(url, headers =getHeaders) with open ( 'downloadChunkData.json' , 'wb' ) as f: f.write(getChunkData.text.encode( 'utf-8' )) with open ( 'downloadChunkData.json' , 'r' ) as f: f2 = json.load(f) with open ( f ' { fileName } ' , 'wb' ) as f: for i in f2: chunkData = i chunkID = i[ 'id' ] print ( f 'Getting chunk { chunkID } ' ) getChunk = requests.get(url + f '/ { chunkID } ' , headers =downloadHeaders) f.write(getChunk.content) print ( 'Status code: ' + str (getChunk.status_code))
... View more