Memory item fields:
- 'aliasid' — memory item identifier used for passing to Licensing API functions;
- 'name' — memory item name;
- 'description' — memory item description;
- 'accesstype' — memory access type (0 — read and write, 1 — read only, 2 — write only);
- 'readpassword' — password for reading a memory item;
- 'writepassword' — password for writing to a memory item;
- 'maxaccesserrors' — maximum number of incorrect attempts to access a memory item by password before it is blocked (5 attempts by default);
- 'draft' — flag that determines whether the item can be edited. If the memory item is added to at least one product, the property automatically becomes true;
- 'size' — memory item size in bytes (can be equal to 0, then the total memory size is calculated from the sum of the memory sizes of individual parameters; if it set to other value than 0, then the total memory size of individual parameters cannot exceed the specified value);
- 'action' — the operation to perform when placing a memory item into a license to which a memory item with the same 'aliasid' has already been added. Available values: 0 — set, 1 — overwrite, 2 — delete.
Fields of memory item parameters:
- 'name' — parameter name;
- 'description' — parameter description;
- 'offset' — parameter offset in the memory item;
- 'size' — parameter memory size in bytes;
- 'data' — binary data of size parameter 'size', represented as a base64 string;
- 'dataType' — parameter data type, determines how the data field is interpreted. Possible values: 0 - binary (hex editor is required), 1 - numeric (4 bytes), 2 - string (UTF-8);
- 'editeallowed' — determines whether binary data of the parameter can be edited in the order.
Create a memory item
Authorization is required. RAW JSON input parameters:
{
"aliasId": 37,
"name": "mylicense",
"description": "mylicense",
"accessType": 1,
"readPassword": 123,
"wirtePassword": 456,
"maxaccesserrors": 5
"size": 100,
"action": 1
"crmId": "",
"refId": ""
}
POST /v1.0/memoryitems
Returns the memoryitem:
{
"memoryitem": {
"_id": 1,
"accesstype": 1,
"action": 1,
"aliasid": 37,
"crmid": "",
"description": "mylicense",
"name": "mylicense",
"readpassword": 123,
"refid": "",
"size": 100,
"writepassword": 0,
"maxaccesserrors": 5,
"draft": false,
}
}
Create a memory item with parameters
Authorization is required. RAW JSON input parameters:
{
"aliasId": 26,
"name": "item_with_params",
"description": "item_with_params",
"accessType": 0,
"readPassword": 123,
"writePassword": 456,
"size": 50,
"action": 0,
"crmId": "",
"refId": "",
"params":[
{
"name": "param1",
"description": "param1",
"offset": 0,
"size": 8,
"editAllowed": true,
"data": "111XWFlgYWI=",
"dataType": 0
},
{
"name": "param2",
"description": "param2",
"offset": 8,
"size": 8,
"editAllowed": true,
"data": "111XWFlgYWI=",
"dataType": 0
}
]
}
POST /v1.0/memoryitems/params
Returns the memoryitem:
{
"memoryitem": {
"_id": 10180,
"accesstype": 0,
"action": 0,
"aliasid": 26,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "item_with_params",
"draft": true,
"maxaccesserrors": 5,
"name": "item_with_params",
"params": [
{
"_id": 10225,
"data": "111XWFlgYWI=",
"datatype": 0,
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 0,
"size": 8
},
{
"_id": 10226,
"data": "111XWFlgYWI=",
"datatype": 0,
"description": "param2",
"editallowed": true,
"name": "param2",
"offset": 8,
"size": 8
}
],
"readpassword": 123,
"refid": "",
"size": 50,
"totalparams_size": 16,
"writepassword": 456
}
}
Get a list of memory items (and their parameters)
Authorization is required. There are no input parameters.
GET /v1.0/memoryitems
The query can be sorted by aliasid, name (by default) and pagination.
Returns memoryitems array:
{
"memoryitems": [
{
"_id": 3,
"accesstype": 1,
"action": 1,
"aliasid": 37,
"crmid": "",
"description": "mylicense",
"name": "mylicense",
"params": [
{
"_id": 2,
"data": "VVZXWFlgYWJj",
"datatype": 0,
"description": "param_first",
"editallowed": true,
"name": "param_first",
"offset": 0,
"size": 9
}
],
"readpassword": 123,
"refid": "",
"size": 100,
"totalparams_size": 9,
"writepassword": 0,
"maxaccesserrors": 5,
"draft": false,
}
]
}
Get a memory item (and its parameters) by ID
Authorization is required. There are no input parameters.
GET /v1.0/memoryitems/{id}
Returns the memoryitem element:
{
"memoryitem":
{
"_id": 3,
"accesstype": 1,
"action": 1,
"aliasid": 37,
"crmid": "",
"description": "mylicense",
"name": "mylicense",
"params": [
{
"_id": 2,
"data": "VVZXWFlgYWJj",
"datatype": 0,
"description": "param_first",
"editallowed": true,
"name": "param_first",
"offset": 0,
"size": 9
}
],
"readpassword": 123,
"refid": "",
"size": 100,
"totalparams_size": 9,
"writepassword": 0,
"maxaccesserrors": 5,
"draft": false,
}
}
Receive products that include a memory item
Authorization is required. There are no input parameters.
GET /v1.0/memoryitems/{id}/products
Returns the memoryitem element:
{
"memoryitem": {
"_id": 4,
"accesstype": 0,
"action": 1,
"aliasid": 100,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "mi100",
"maxaccesserrors": 5,
"draft": false,
"name": "mi100",
"params": [
{
"_id": 4,
"data": "VVZXWFlgYWI=",
"datatype": 0,
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 0,
"size": 8
},
{
"_id": 5,
"data": "OOOXWFlgYWI=",
"datatype": 0,
"description": "param2",
"editallowed": true,
"name": "param2",
"offset": 8,
"size": 8
},
{
"_id": 6,
"data": "bbbXWFlgYWI=",
"datatype": 0,
"description": "param3",
"editallowed": true,
"name": "param3",
"offset": 16,
"size": 8
}
],
"products": [
{
"_id": 10302,
"accesscode_id": 18,
"archivationdate": 0,
"archived": false,
"binding": {
"CAN_REPLACE_CPU": false,
"CAN_REPLACE_DVD": false,
"CAN_REPLACE_HDD": false,
"CAN_REPLACE_MAC": false,
"CAN_REPLACE_MOTHERBOARD": false,
"CAN_REPLACE_OS": false,
"CPU": true,
"DVD": false,
"HDD": true,
"MAC": true,
"MOTHERBOARD": true,
"OS": false
},
"binding_maxhardwarechangenumber": 0,
"binding_scheme": 0,
"crmid": "",
"description": "",
"flags": 0,
"hardwarebindingscheme": 0,
"licensetype": 0,
"memoryitems": [
{
"_id": 4,
"accesstype": 0,
"action": 1,
"aliasid": 100,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "mi100",
"maxaccesserrors": 5,
"draft": false,
"name": "mi100",
"params": [
{
"_id": 4,
"data": "VVZXWFlgYWI=",
"datatype": 0,
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 0,
"size": 8
},
{
"_id": 5,
"data": "OOOXWFlgYWI=",
"datatype": 0,
"description": "param2",
"editallowed": true,
"name": "param2",
"offset": 8,
"size": 8
},
{
"_id": 6,
"data": "bbbXWFlgYWI=",
"datatype": 0,
"description": "param3",
"editallowed": true,
"name": "param3",
"offset": 16,
"size": 8
}
],
"readpassword": 123,
"refid": "",
"size": 100,
"totalparams_size": 24,
"writepassword": 0
}
],
"modification": 0,
"name": "with_memory",
"productnumber": 12362,
"refid": "",
"status": 1
}
],
"readpassword": 123,
"refid": "",
"size": 100,
"totalparams_size": 24,
"writepassword": 0
}
}
Move a memory item to and from the archive
Authorization is required. RAW JSON input parameters:
1 |
|
PUT /v1.0/memoryitems/{id}/changearchivestatus
Returns the memoryitem element:
{
"memoryitem": {
"_id": 4,
"accesstype": 0,
"action": 1,
"aliasid": 100,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "mi100",
"maxaccesserrors": 5,
"draft": false,
"name": "mi100",
"params": [
{
"_id": 4,
"data": "VVZXWFlgYWI=",
"datatype": 0,
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 0,
"size": 8
},
{
"_id": 5,
"data": "OOOXWFlgYWI=",
"datatype": 0,
"description": "param2",
"editallowed": true,
"name": "param2",
"offset": 8,
"size": 8
},
{
"_id": 6,
"data": "bbbXWFlgYWI=",
"datatype": 0,
"description": "param3",
"editallowed": true,
"name": "param3",
"offset": 16,
"size": 8
}
],
"readpassword": 123,
"refid": "",
"size": 100,
"totalparams_size": 24,
"writepassword": 0
}
}
Update fields of a memory item
Authorization is required. RAW JSON input parameters:
{
"aliasid": 37,
"description": "mylicense1",
"accessType": 0,
"readPassword": 43,
"writePassword": 11,
"maxaccesserrors": 10
"size": 150,
"action": 0,
"crmId": "",
"refId": ""
}
PUT /v1.0/memoryitems/{id}
Returns the memoryitem:
{
"memoryitem": {
"_id": 1,
"accesstype": 0,
"action": 0,
"aliasid": 37,
"crmid": "",
"description": "mylicense1",
"name": "mylicense",
"readpassword": 43,
"refid": "",
"size": 150,
"writepassword": 11,
"maxaccesserrors": 10,
"draft": false
}
}
Delete a memory item
Authorization is required. There are no input parameters.
DELETE /v1.0/memoryitems/{id}
Get the next alias of a memory item
Authorization is required. There are no input parameters.
GET /v1.0/nextmemoryitemid
{
"nextmemoryitemid": 38
}
Add a memory item parameter
Authorization is required. RAW JSON input parameters:
{
"name": "param1",
"description": "param1",
"offset": 0,
"size": 10,
"editAllowed": true,
"data": "VVZXWFlgYWJjZA==",
"dataType": 0
}
POST /v1.0/memoryitems/{id}/params
Returns param:
{
"param": {
"_id": 1,
"data": "VVZXWFlgYWJjZA==",
"datatype": 0,
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 0,
"size": 10
}
}
Update a memory item parameter
Authorization is required. RAW JSON input parameters:
{
"name": "param_first",
"description": "param_first",
"offset": 0,
"size": 9,
"editAllowed": true,
"data": "VVZXWFlgYWJj==",
"dataType": 0,
}
PUT /v1.0/memoryitems/{id}/params/{paramid}
Returns param:
{
"param": {
"_id": 1,
"data": "VVZXWFlgYWJj",
"datatype": 0,
"description": "param_first",
"editallowed": true,
"name": "param_first",
"offset": 0,
"size": 9
}
}
Delete a memory item parameter
Authorization is required. There are no input parameters.
DELETE /v1.0/memoryitems/{id}/params/{paramid}