List Data Objects
Please log in to get a personalized configuration!
This method lists either all Data Object
associated with a license key, a product or your entire account, or all of them at once. Please read more about access tokens in
Remarks.
This method is accessed in several ways. Each way works in the same way and requires the same permission.
The only difference is the type of parameters. Both cases are listed below:
Parameters
Method 1 (general): https://api.cryptolens.io/api/data/ListDataObjects
Parameter |
Description |
Remarks |
ReferencerType |
Indicates if the data object is associated with a license key, a product or the entire user account.
User = 0,
Product = 1,
Key = 2.
|
optional, user (=0) by default. |
ReferencerId |
The id of the Referencer. It can either be an id to a product that you have or to a license key. When ReferencerType is
set to User, there is no need to set this value.
|
optional, 0 by default. |
Contains |
Shows only Data Objects where the name contains the following string.
|
optional, "" by default. |
ShowAll |
If set to true, all data objects will be returned, that is, both those associated with
your entire account, a specific product and a license key. In addition, each data object item will include
the ReferencerType and its Id. Otherwise, i.e. when set to false, only the
data objects associated with the user, product or key will be returned, without the ReferencerType and its Id.
|
optional, false by default. |
v |
Method version. |
optional. by default, it's 1. |
Method 2 (key specific): https://api.cryptolens.io/api/data/ListDataObjectsToKey
Parameter |
Description |
Remarks |
ProductId |
the product id |
required |
Key |
the serial key string |
required |
Contains |
Shows only Data Objects where the name contains the following string.
|
optional, "" by default. |
v |
Method version. |
optional. by default, it's 1. |
Method 3 (machine code specific): https://api.cryptolens.io/api/data/ListDataObjectsToMachineCode
Parameter |
Description |
Remarks |
ProductId |
the product id |
required |
Key |
the serial key string |
required |
MachineCode |
the machine code |
required |
Contains |
Shows only Data Objects where the name contains the following string.
|
optional, "" by default. |
v |
Method version. |
optional. by default, it's 1. |
Results
Parameter |
Description |
Remarks |
dataObjects |
A list of data objects, where each data object has the structure shown under Data Object. |
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. |
Parameter |
Description |
Remarks |
ReferencerType |
Indicates if the data object is associated with a license key, a product or the entire user account.
User = 0,
Product = 1,
Key = 2.
|
optional, user (=0) by default. |
ReferencerId |
The id of the Referencer. It can either be an id to a product that you have or to a license key. When ReferencerType is
set to User, there is no need to set this value.
|
optional, 0 by default. |
Contains |
Shows only Data Objects where the name contains the following string.
|
optional, "" by default. |
ShowAll |
If set to true, all data objects will be returned, that is, both those associated with
your entire account, a specific product and a license key. In addition, each data object item will include
the ReferencerType and its Id. Otherwise, i.e. when set to false, only the
data objects associated with the user, product or key will be returned, without the ReferencerType and its Id.
|
optional, false by default. |
v |
Method version. |
optional. by default, it's 1. |
Results
Parameter |
Description |
Remarks |
dataObjects |
A list of data objects, where each data object has the structure shown under Data Object. |
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. |
Data Object
Parameter |
Description |
Remarks |
Id |
A unique identification number for the Data Object. |
always included. |
Name |
The name of the data object. Max 10 characters.
|
always included. |
StringValue |
A string value (text) to store. Max 10000 characters. |
always included. |
IntValue |
An int value (int32) to store. |
always included. |
ReferencerType |
Indicates if the data object is associated with a license key, a product or the entire user account.
User = 0,
Product = 1,
Key = 2.
|
returned only when ShowAll is set to true. |
ReferencerId |
The id of the Referencer. It can either be an id to a product that you have or to a license key.
|
returned only when ShowAll is set to true. |
Example results
{"dataObjects":[{"id":4,"name":"cust_name","stringValue":"Artem","intValue":0},{"id":5,"name":"location","stringValue":"Sweden","intValue":0}],"result":0,"message":null}
{"dataObjects":[{"referencerId":2,"referencerType":0, "id":4,"name":"cust_name","stringValue":"Artem","intValue":0},{"referencerId":1234,"referencerType":2, "id":5,"name":"location","stringValue":"Sweden","intValue":0}],"result":0,"message":null}
Remarks
-
When accessing the key specific methods (using productId and the key string),
you need to either disable key lock (set it to zero) or set it to a negative number,
in the same way you would have done if you would have used KeyLock.
We recommend to set the KeyLock to -1 when creating the access token.
Errors
Error |
Access denied. |
The input parameters were incorrect. |
Not enough permission. |
Not enough permission and/or product not found. |
Not enough permission and/or key not found. |
Incorrect 'ReferencerType'. It can either be 0 (for a User), 1 (for a Product) and 2 (for a Key). |
Not enough permission and/or machine code not found. |