> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Web API Log

> This method will retrieve a list of Web API Logs. All events that get logged are related to a change of a license key or data object, eg. when license key gets activated or when a property...

This method will retrieve a list of [Web API Logs](/api-reference/generated/model/WebAPILog). All events that get logged
are related to a change of a license key or data object, eg. when license key gets activated or when a property of data object changes.
More details about the method that was called are specified in the **State** field. You can read more about it
[here](/api-reference/generated/model/WebAPILog). These logs contain minimal information but are guaranteed to be preserved. To get more information,
especially about changes not tracked in this log, please check out the [Object Log](/api-reference/generated/GetObjectLog). Note, it's possible to restrict access
to this method so that it can be used inside a client application, more about this in [remarks](/api-reference/generated/GetWebAPILog#remarks).

### Parameters

This method is accessed by [https://api.cryptolens.io/api/ai/GetWebAPILog](https://api.cryptolens.io/api/ai/GetWebAPILog)

| **Parameter** | **Description** | **Remarks** |
| - | - | - |
| ProductId | The product id that we should filter on. | optional |
| Key | The key string that we should filter on. | optional, but requires **ProductId** to be specified. |
| MachineCode | The machine code to filter on. Requires the entire machine code to be specified. Case sensitive. | optional |
| FriendlyName | The friendly name to filter on. "Contains" operation is used, i.e. you do not need to specify the entire friendly name. Case insensitive. | optional |
| States | The list of integer values representing the state that you want to filter on. This allows you to extract logs related to a certain event. For example, if you want to see all *CreateKey* request, you can set this parameter to **\[3010]**. If you need to filter on multiple events, you can add them to the list as follows: **\[3010,2010]**. You can read more about the different states [here](/api-reference/generated/model/WebAPILog#state-codes). | optional |
| Time | Allows you to filter based on the time of the request. It accepts a JSON string with the following properties: **gt** - greater than **gte** - greater than or equal **lt** - less than **lte** - less than or equal The time is formatted as a Unix timestamp. For example, Time can be set to **\{"gt":1742208215}**. You can also include other "lt" or other properties to narrow down the interval. | optional |
| Limit | Specifies how many events should be returned. | default is 10 and at most 1000 |
| StartingAfter | Works as a cursor (for pagination). If the last element had the id=125, then setting this to 125 will return all events coming after 125. **If you use the time filter, this value should be set to unix timestamp of the request.** | optional |
| EndingBefore | Works as a cursor (for pagination). If the last element had the id=125, then setting this to 125 will return all events coming before 125. **If you use the time filter, this value should be set to unix timestamp of the request.** | optional |
| OrderBy | Allows you to order the data based on either the Id or Time. We recommend that you use StartingAfter and EndingBefore instead, since it will perform automatic ordering. By default, it will order in "ascending" mode (unless EndingBefore is specified, in which case it will be set to Id descending). To change that, you can append "descending" to the field. For example, to order by Id in a descending order, you can set this variable to **Id descending**. When time filter is applied, automatic order by on Time will be applied. | optional **(depricated)** |
| AnomalyClassification | If enabled, the result will contain information about whether a certain request is anomalous. You can read more about this feature [here](https://help.cryptolens.io/web-interface/anomaly-detection). | optional, false by default. |
| v | Method version. | optional. by default, it's 1. |

### Results

| **Parameter** | **Description** | **Remarks** |
| - | - | - |
| Logs | A list of [Web API Log Objects](/api-reference/generated/model/WebAPILog). If **AnomalyClassification** is set to true, a list of [Web API Log Objects (extended)](/api-reference/generated/model/WebAPILog) will be returned instead. | returned if no errors are thrown |
| Result | This is either **0**(=success) or **1**(=error). | always returned |
| Message | The message that provides additional information about the result. If it's a successful result, **null** will be returned. Otherwise, in case of an error, a short message will be returned describing the error. | always returned. |

### Example results

```text theme={null}
{"result":0,"message":""}
```

### Remarks

* If you set **KeyLock=-1** when creating the access token, this method will require the product id together with the license key string. This can be used to retrieve logs inside a client application without exposing logs of other license keys.

### Errors

| **Error** |
| - |
| Access denied. |
| The input parameters were incorrect. |
| An error occured. |
