Bulk license key update via REST API?Answered

I'm entertaining the idea of adding a new custom license field to capture the original order number for which a license key was generated. Once added, that field would be populated on all new license keys automatically. However, I'm trying to figure out what options are available for updating existing license keys for this information.

I already use the REST API for a few things including updating another custom license field with the new expiration date when a renewal has been processed successfully. However, that API, limelm.pkey.setDetails, only seems to support a single license key, and I'll want to update all of my existing active license keys, i.e., not revoked or expired.

I suppose I could just do this one at a time over a period of time until they're all processed, or perhaps even apply the updates in a multi-threaded fashion assuming the API itself isn't going to decide that I'm some malicious denial-of-service attack or something, but before I go that route I thought I'd see if there's some other/better way to do a bulk update like this.

Thoughts/suggestions?

Answer

The web API is the best way.

  1. Query which keys you want to update using limelm.pkey.advancedSearch
  2. Then update the keys over a loop using limelm.pkey.setDetails

We try to eliminate “foot-guns” in our products. And updating many or all keys at once is a rare-enough occurrence that it doesn't warrant the risks of implementing it as a “one click” option.

Thanks. Just to be clear, there shouldn't be any issues with service protection if I perform a large number of REST-based updates via limelm.pkey.setDetails in a relatively short period of time (i.e., as fast as allowed), correct? And assuming that's the case, is it also safe if I partition the updates and process them concurrently on multiple threads, or will that trigger some type of service protection?

So long as you're using a valid API key, you stop processing on errors (don't barrel through), and you make the changes from a set number of IP addresses, then you'll be fine.

Thanks, Wyatt. If there are just one-off errors with updates to specific keys I'll probably keep going and report those vs. failing fast, but obviously if there's just a problem with how I'm processing things leading to consistent (and more importantly, avoidable) errors, I'll ensure that things do terminate so that the faulty approach can be resolved.