The LimeLM web API consists of a set of callable methods, and some API endpoints.
To perform an action using the LimeLM web API, you need to select a calling convention, send a request to its endpoint specifying a method and some arguments, and will receive a formatted response.
All requests must be "POST" over HTTPS; otherwise you will get error code "168
".
The URL that data must be POSTed to is "https://wyday.com/limelm/api/rest/
". It must include the trailing slash and must not include any other data (i.e. no GET parameters at all).
The data you POST must be an url-encoded string. Not JSON. Not XML. In other words it would look like this:
api_key=your_key_here&format=json&nojsoncallback=1&method=limelm.pkey.generate&version_id=100
With that data POSTed to that correctly formatted URL (replacing the API key with your API key and the version_id
with a version ID that you control), what you will get is a single product key generated for 1 activation.
All request formats, listed on the web API index page, take a list of named parameters.
The REQUIRED parameter method
is used to specify the calling method.
The REQUIRED parameter api_key
is used to specify your API Key.
The optional parameter format
is used to specify a response format (either "rest
" for an XML response or "json
" for a JSON response).
The arguments, responses and error codes for each method are listed on the method's spec page. Methods are lists on the web API index page.
Note: The LimeLM web API exposes identifiers for product keys, versions, products and other uniquely identifiable objects. These IDs should always be treated as opaque strings, rather than integers of any specific type. The format of the IDs can change over time, so relying on the current format may cause you problems in the future.
We have fully written examples for PHP and ASP.NET in the web API pack. But if you want a bare-bones, very simple example of using our web API, here's a Python example calling the limelm.test.echo
method with a simple "param1
" with a value of "test
":
import http.client
# Change the API key to yours from your settings page,
# and change any parameters to fit your needs.
data = 'api_key=YOUR_API_KEY&method=limelm.test.echo¶m1=test'
connection = http.client.HTTPSConnection('wyday.com')
connection.request('POST',
'/limelm/api/rest/',
data,
{'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
response = connection.getresponse()
# Turn the data from LimeLM into a string that
# we can then use.
data_to_process = response.read().decode()
# Print out the response from LimeLM.
# Change this to do whatever you want
# with the `data_to_process` string.
print(data_to_process)
Of course, as we describe in detail in multiple places, anything that calls the LimeLM web API must be called from your servers. It must never be called from a customer-controlled machine.
TurboActivate, TurboFloat, and the TurboFloat Server can all be used on customer-controlled machines (that's what they were built for). But anything that directly uses the LimeLM web API must be called from your own machines.