LimeLM
wyBuild
Support forum
wyDay blog
wyDay Home

limelm.pkey.advancedSearch

Find all the product keys based on search parameters.

Note: This function is not a "drop-in" replacement for limelm.pkey.find. For instance, in limelm.pkey.find when you leave the email parameter blank you'll get no product keys. However, if you leave the email parameter blank in this function you'll get all product keys.

Arguments

api_key (Required)
Your API application key. Your api key is available on your settings page.
num (Optional)
The number of product keys to return per page. If this parameter is missing (or invalid) then it will default to 20.
page (Optional)
The page you're currently on. If this parameter is missing (or invalid) then it will default to 1.
product_id (Optional)
The id of the product to search for the product key. You can get the product ID by examining the URL in your browser. For instance, from the URL https://wyday.com/limelm/product/view/101/ you can see the product ID is 101.

If the product_id parameter is not present then this function will search all products in your LimeLM account (unless a version_id parameter is specified).
version_id (Optional)
The id of the version to search for the product key. You can get the version ID by examining the URL in your browser. For instance, from the URL https://wyday.com/limelm/version/100/ you can see the version ID is 100. (Note: The Version ID is not the Version GUID).

If the version_id parameter is not present then this function will search all versions in your LimeLM account (unless a product_id parameter is specified).
email (Optional)
The email associated with the product key(s). If you don't specify this parameter then this function will ignore the email field. You can also use the asterisk wildcard character "*" to do partial matches of emails.
start (Optional)
The start of the date range in the form YYYY-MM-DD (e.g. 2010-06-25) or YYYY-MM-DD hh:mm:ss. If this value is not present it finds all product keys created since the beginning of time.
end (Optional)
The end of the date range in the form YYYY-MM-DD (e.g. 2011-06-25) or YYYY-MM-DD hh:mm:ss. If this value is not present it finds all product keys created up until the present time.
get_acts (Optional)
Whether or not to get the activations for the found product keys. Possible values are "true" and "false". If this parameter isn't present (or is invalid) it will default to "false".
get_features (Optional)
Whether or not to get the features for the found product keys. Possible values are "true" and "false". If this parameter isn't present (or is invalid) it will default to "false".
get_tags (Optional)
Whether or not to get the tags for the found product keys. Possible values are "true" and "false". If this parameter isn't present (or is invalid) it will default to "false".
tag[] (Optional)
Search for product keys with either any of the provided tags or, if tag_use_or is false, search for product keys that have all of the provided tags. You can also use the asterisk wildcard character "*" to do partial matches of tags. For instance, if you have product keys with a "Microsoft" tag and some product keys with a "MicroSD" tag you can either specify both of these tags separately…
tag[]=Microsoft
tag[]=MicroSD
…or you can use the wildcard character:
tag[]=Micro*
It should also be noted that tags are not case sensitive (searching for "Microsoft" is the same as searching for "microsoft" or "miCrOsoFT").
tag_use_or (Optional)
Whether to search for multiple tags using "OR" or using "AND". Possible values are "true" (which will use "OR" tag searching) and "false" (which will use "AND" tag searching). If this parameter isn't present (or is invalid) it will default to "true".
feature_name[] (Optional)
Search for product keys with any of the provided license fields or, if feature_use_or is false, search for product keys that have all of the provided license fields. You must use the parameter in tandem with "feature_value[]" and "feature_match[]".
feature_value[] (Optional)
The values to search for in the fields. If you pass in an empty string then this function will find all values where the field value is not set. The number of values must match the number of field names provided in the feature_name[] parameter.
feature_match[] (Optional)
The match type used for searching based on license field:
  • exact: Find product keys that match the field value provided exactly (case insensitive). This is the default matching.

  • wildcard: Find the product keys that match the field value using wildcard asterisk (*) character.

  • before: For "Date / Time" types of field values this will find product keys with field values before the time you specified (provided it's in the YYYY-MM-DD or YYYY-MM-DD hh:mm:ss form). For "Integer" types of field values this will find product keys with field values less than the integer specified. All other field types will be ignored.

  • after: For "Date / Time" types of field values this will find product keys with field values after the time you specified (provided it's in the YYYY-MM-DD or YYYY-MM-DD hh:mm:ss form). For "Integer" types of field values this will find product keys with field values greater than the integer specified. All other field types will be ignored.

  • between: For "Date / Time" types of field values this will find product keys with field values between the 2 comma separated times you specified (provided it's in the YYYY-MM-DD,YYYY-MM-DD or YYYY-MM-DD hh:mm:ss,YYYY-MM-DD hh:mm:ss form). For "Integer" types of field values this will find product keys with field values between the 2 comma separated integers specified (e.g. 4,8). All other field types will be ignored.

feature_use_or (Optional)
Whether to search for multiple license fields using "OR" or using "AND". Possible values are "true" (which will use "OR" license field searching) and "false" (which will use "AND" license field searching). If this parameter isn't present (or is invalid) it will default to "true".

Example Response

The method returns a list of product keys, the total number of pages, and the total number of matching product keys.

<pkeys pages="1" total="3">
    <pkey id="103" key="A84U-ZTZT-V2WI-5KCK-EV5S-3PWK-K2TX" acts="4" acts_used="3" email="mike.nelson@example.com"/>
    <pkey id="104" key="X8ZB-FRRK-PVWX-M3RY-YPE8-ARFM-N2TX" acts="1" acts_used="1" email="art.crow@example.com"/>
    <pkey id="107" key="37CU-6XJN-5V6S-KY4C-GIDD-BXP7-F6TX" acts="1" acts_used="0" revoked="true"/>
</pkeys>

Error Codes

1: Product key not found.
No product keys found for the specified search parameters.
100: Invalid API Key
The API key passed was not valid or has expired.
101: Method "xxx" not found
The requested method was not found.
164: An API key must be used by X devices. Configurable in your settings.
You can only use an API key from X devices. You can set the exact number on your settings page. If you need to use the web API from multiple servers then create another user. You can also temporarily reset this message by logging into the account for which the API key is created and resetting the last used IP address on your settings page.
116: There must be equal amount of features as feature values.
You have specified more feature_name[] values than feature_value[] values (or vice versa). There must be an equal number of feature_name[] as feature_value[].
142: Service currently unavailable
The requested service is temporarily unavailable.