[Web API] Automatically backup everything

Hi,

I'm trying to setup a cron job to automatically dump daily all the licenses and their status using the Web API.

At the moment i have something that looks like this

$allKeys = searchAllKeys();foreach( $allkeys as $k ){ $licenseKey = $k[ 'key' ]; $details = getCdkeyDetails( $licenseKey ); //save stuff}

this however creates a lot of connections, and ultimately will timeout or kill the connection (i setup a very high timeout on my script so i think this is prevented server side, but regardless, it's clearly the wrong approach), so it is clearly not the best way to do this.

I know there is a way to automatically backup everything from the panel (albeit, i have to repeat the backup process for all products) but not an API for that.

Is there a way to pass limelm.pkey.getDetails an array of keys rather than a key at a time? Am I missing something obvious here?

Thank you!

Well, you should probably start by logging into the LimeLM interface and just exporting all your keys. That will give you a lot of data quickly without having to make a million little connections.

Next, only export data with a date range (use limelm.pkey.advancedSearch and/or limelm.pkey.activity). Again, this will further reduce the amount of data you have to retrieve.

Hi Wyatt,

thank you for your reply!

Well, the idea is that we want to have a fully automated backup, so logging in the panel everytime is something we want to avoid.

Yes, i could split it into sub-jobs (either via selecting less products or less keys via date filtering) but doesn't seem the best option. Any chance you're going to offer a web api call that can process more than a key at a time?