You have to use pkey.getID to get the ID, and then you can cache that ID and use it across multiple web API functions.
Hi
Is there a search function in the Web API that will return the details of a key when I just have the actual key value (34 character string) to search on?
Or do I have to make 2 calls: pkey.getID and pkey.getDetails ?
Thanks
You have to use pkey.getID to get the ID, and then you can cache that ID and use it across multiple web API functions.
Thanks for the quick reply. Another question:
Can I read the product_id of a given key, it doesn't appear to get returned from pkey.getDetails?
No, the product_id isn't returned with pkey.getDetails.
What are you using it for? If you give me more information about what you're trying to do, I can give you better help.
Sure. We have a fairly sophisticated client database application that keeps track of our customers, products, licences and support issues. I am currently adapting it to include the LimeLM product keys we have issued. I am using the Web API to read all of our keys from the LMServer and link them to our products. So I need to know which product each key was generated for.
If I can't get the product_id I could use the version_id, as long as version_id's are unique over multiple products.
This possibly answers my question:
When I use pkey.generate to create a new key the documents says that I don't specify the product_id, just the version_id. Therefore the product_id must be obtainable by the server function and the version_id is sufficient to identify the product.
Is that the case?
Yes, version ids are unique. Another version will never have the same version id.