WebAPILog

The following page is kept as a reference only. This API method should no longer be used. If you start a new project, please consider using Get Web API Log method in Web API 3 instead.

Each time certain methods in the Web API are executed, a log entry is created with details such as when it occurred, the IP address and the state (eg. successful or unsuccessful). This information can be quite handy if you want to understand the way users interact with your software, which country users originate from, detect if certain IP addresses are attempting to guess a serial key (brute force), and more. These logs provide a history and not necessarily the current state of a key. If you want to see currently activated devices, please use Get Activated Machines. All results are in JSON.

Keep in mind that you have to explicitly enable the access to this functionality.This can be done in Security Settings.

This method is accessed by https://serialkeymanager.com/Ext/WebAPILog

Parameters

Parameter Description Remarks
uid the user id required
typeOfLog either user, product, or key id. (read more under remarks) required
id either the user id, product id or key id. required if typeOfLog is "product" or "key".
privateKey the private key (you can find it here) required
range the no. of log entries that should be returned.if 0, all will be returned. optional. default is 30.
fromdate the lower bound for the Time field in the result. null means no boundary. optional. default is null.
todate the upper bound for the Time field in the result. null means no boundary. optional. default is null.

Results

This method can return a JSON array of three different types: KeyLog, PoductLog or UserLog. The return type depends on the typeOfLog selected above. Note, the most recent items are going to be returned first of all.

KeyLog

A KeyLog is returned if typeOfLog is "key". Note, in order to see this log, you need to know the key id, which should not be confused with the "serial key", sid.
Parameter Description Remarks
IP the IP address that called this method. this is the client user's IP. always returned
Time the date and time when the activation was performed (the first time). always returned
State a number with a certain pattern that describes the request and its results. (read more under remarks) always returned

ProductLog

A ProductLog is returned if typeOfLog is "product". The array of ProductLog will contain a list of log entries (of the format described below) related to the product.
Parameter Description Remarks
Key the key id of the key always returned
IP the IP address that called this method. this is the client user's IP. always returned
Time the date and time when the activation was performed (the first time). always returned
State a number with a certain pattern that describes the request and its results. (read more under remarks) always returned

UserLog

A UserLog is returned if typeOfLog is "user". The array of UserLog combines all your log entries (i.e. for the entire account.)
Parameter Description Remarks
Pid the product id always returned
Key the key id of the key always returned
IP the IP address that called this method. this is the client user's IP. always returned
Time the date and time when the activation was performed (the first time). always returned
State a number with a certain pattern that describes the request and its results. (read more under remarks) always returned

Example Result

A UserLog array may look as following:
[{"Pid":2196,"Key":0,"IP":"90.227.166.132","Time":"2015-03-17T21:23:32.153","State":1020},{"Pid":2196,"Key":18543,"IP":"90.227.166.132","Time":"2015-03-17T21:24:16.177","State":1010},{"Pid":3,"Key":1010,"IP":"90.227.166.132","Time":"2015-03-17T21:29:18.283","State":2010}]

Remarks

TypeOfLog

Parameter Description
user returns all Web API log entries available for a given user.
product returns Web API log entries for a certain product only.
key returns Web API log entries for a certain key only.

State Codes

A state code is a 4 digit number that stores information about a request. It allows you to tell whether a certain request was successful or unsuccessful, and in some cases, what kind of action was taken. State codes can be decoded in the following way:

2011

  • 20tells what kind of method was executed (eg. activate, deactivate). here it is activation.
  • -  tells if the request was successful or unsuccessful. here, it is successful.
  • 1 - is an optional digit that gives additional information about the request. (usually zero)

The first 2 digits

Short Code  Method
10** validation request
20** activation request
30** key generation request
40** optional field request
50** no request associated
60** deactivation request
70** other license manipulation requests
80** data object requests

 The 3rd digit (success or failure)

Short Code  Method
**1* successful request
**2* unsuccessful request

Optional digit (4th)

At the moment, activation (20**), key generation (30**) and optional field (40**) provide an optional digit with more information about the request.
Short Code  Method
3010 nothing special
3011 a trial key was generated
3012 an existing trial key was returned
3021 there was an error when creating the trial key
Short Code  Method
2010 nothing special
2011 the key was already activated on a machine with the given id
2012 the key is activated with a new machine code
2022 device limit has been reached (node-locking)
2013 trial activation was performed
2014 activated using floating licensing
2024 device limit has been reached in floating licensing
2015 activated using an overdraft floating license
Short Code  Method
4020 nothing special
4021 the optional field cannot be decreased anymore
Short Code  Method
6010 deactivation successful
6011 release of a floating license successful
Short Code  Method
7011 add feature successful
7012 remove feature successful
7013 block key successful
7014 unblock key successful
7015 extend license successful
7016 machine lock limit successful
7017 change notes successful
7018 trial activation successful
7019 change customer successful
Short Code  Method
8011 add data object successful
8012 remove data object successful
8013 list data objects successful
8014 increment int value successful
8015 decrement int value successful
8016 set int value successful
8017 set string value successful

Errors

Error
The subscription level of the user does not allow this functionality.
The user has either disabled <i>Web API logs</i> or the <i>private key</i> was incorrect or the user's subscription level does not allow this functionality.
No typeOfAction was specified. Either User, Product or Key.
;