> ## 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.

# Data Objects Overview

> Imagine that you would like to associate specific information with a license key, such as your customer's name, the OS version, etc.

### Introduction

Imagine that you would like to associate specific information with a license key,
such as your **customer's name**, the **OS version**, etc.

**Data Objects** enable your application to store variables in the cloud
in a way that empowers your licensing process. Think of them as **additional variables**
that can be added to a license key, a product or the entire account.

### What is a Data Object?

Data Object can be thought of as way to **store integers** and **strings**
that can later be retrieved anywhere, anytime. For those that understand
[UML](https://en.wikipedia.org/wiki/Unified_Modeling_Language), here is a visual
representation of a data object.

A data object contains the following fields:

* **Id** - It's a unique identifier of the data object.
* **Name** - It's like a variable name. Note, several objects can have the same name. A name can be 10 chars at most.
* **String Value** - This is the content of the data object. It can store a string of 10000 chars.
* **Int Value** - The integer value of the data object. It can store a 32 bit signed integer.

A data object can be associated with following **ReferencerTypes**:

* **User** - Your entire account. The ReferencerId does not need to be specified.
* **Product** - A specific product. The ReferencerId is the **productId**, aka **pid**.
* **Key** - A specific license key. The ReferencerId is the **keyId**, aka **sid**.

### Related Methods

* [Add Data Object](/api-reference/generated/AddDataObject) - Creates a new data object.
* [List Data Objects](/api-reference/generated/ListDataObjects) - List existing data objects.
* [Increment Int Value](/api-reference/generated/IncrementIntValue) - Increments the IntValue by certain constant.
* [Decrement Int Value](/api-reference/generated/DecrementIntValue) - Decrements the IntValue by a certain constant.
* [Set String Value](/api-reference/generated/SetStringValue) - Set a new StringValue.
* [Set Int Value](/api-reference/generated/SetIntValue) - Set a new IntValue.
* [Remove Data Object](/api-reference/generated/RemoveDataObject) - Remove an existing Data Object.

### Permissions using Access Tokens

As with other methods in the Web API, you can easily customize the permission/scope of each method.
To enable access to a method, you need to create an [Access Token](/api-reference/generated/Auth)
that enables access to the method. In addition, Data Objects have further permission
settings. They are summarized below:

* To create a data object associated with a **User**, both the **product lock** and the **key lock** should be disabled (set to zero).
* To create a data object associated with a **Product**, no **key lock** should be present (i.e. set to zero) and the **product lock** should either be disabled or set to the desired product id.
* To create a data object associated with a **Key**, there should not be any **product lock** on a product that this key does not originate from, and there should not be any **key lock** on a key other than this one.
* For methods [Increment Int Value](/api-reference/generated/IncrementIntValue) and [Decrement Int Value](/api-reference/generated/DecrementIntValue), you can use the **Feature lock** field in the [Access Token](/api-reference/generated/Auth) as a way to specify the upper bound.
* (**Not needed anymore. Just use specialized methods.**)To work with data objects from the client application (**low trust**), the [Key Lock](/api-reference/generated/KeyLock) method should be used instead. The idea is that you create a generic [Access Token](/api-reference/generated/Auth), which can be converted into a **scope-limited** [Access Token](/api-reference/generated/Auth) given a license key string. Moreover, it comes with the advantage that you get the **KeyId**, which can then be used as a **ReferencerId**. You can read more [here](https://help.cryptolens.io/web-api/index).
